#include <sc_store.h>

Inheritance diagram for SC::Store::BaseMesh:
SC::Store::Mesh

Public Member Functions

 BaseMesh ()
 
 BaseMesh (const BaseMesh &other)=delete
 
 BaseMesh (BaseMesh &&other)=default
 
BaseMeshoperator= (const BaseMesh &other)=delete
 
BaseMeshoperator= (BaseMesh &&other)=default
 
 ~BaseMesh ()=default
 

Public Attributes

uint32_t normal_count
 The number of Normal elements in the normals array. More...
 
Normal const * normals
 An array of normals. More...
 
uint32_t point_count
 The number of Point elements in the points array. More...
 
Point const * points
 An array of points. More...
 
uint32_t rgba32_count
 The number of RGBA32 elements in the rgba32s array. More...
 
RGBA32 const * rgba32s
 An array of RGBA32 color values. More...
 
uint32_t uv_count
 The number of UV elements in the uvs array. More...
 
UV const * uvs
 An array of UV points. More...
 

Detailed Description

The BaseMesh class is used to define a Mesh as its base class.

It contains indexable properties common to all meshes.

Definable properties are points, normals, UV parameters, and RGBA32 colors along with their corresponding counts. Each of these attributes is given by a user-supplied array pointer that is NOT owned by the base mesh. The pointers must remain valid until the mesh is inserted into the database.

These properties are not directly used to represent geometry. Instead, they are indexed by mesh elements in order to define actual geometry.

The BaseMesh is movable but not copyable.

Constructor & Destructor Documentation

◆ ~BaseMesh()

SC::Store::BaseMesh::~BaseMesh ( )
default

◆ BaseMesh() [1/3]

SC::Store::BaseMesh::BaseMesh ( )

BaseMesh is inherited by the Mesh class. This constructor shouldn't be called directly.

◆ BaseMesh() [2/3]

SC::Store::BaseMesh::BaseMesh ( const BaseMesh other)
delete

◆ BaseMesh() [3/3]

SC::Store::BaseMesh::BaseMesh ( BaseMesh &&  other)
default

Member Function Documentation

◆ operator=() [1/2]

BaseMesh& SC::Store::BaseMesh::operator= ( const BaseMesh other)
delete

◆ operator=() [2/2]

BaseMesh& SC::Store::BaseMesh::operator= ( BaseMesh &&  other)
default

Member Data Documentation

◆ normal_count

uint32_t SC::Store::BaseMesh::normal_count

The number of Normal elements in the normals array.

A normals array with the elements { 0.0f, -1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f } would have a normal_count of 2.

◆ normals

Normal const* SC::Store::BaseMesh::normals

An array of normals.

Each normal is constructed with a three-element float array. For example:

SC::Store::Normal normals[] = {
{ 0.0f, -1.0f, 0.0f },
{ 0.0f, 0.0f, 1.0f },
};

◆ point_count

uint32_t SC::Store::BaseMesh::point_count

The number of Point elements in the points array.

A points array with the elements { 0.0f, 0.0f, 1.0f }, { 1.0f, 0.0f, 1.0f } would have a point_count of 2.

◆ points

Point const* SC::Store::BaseMesh::points

An array of points.

Each point is constructed with a three-element float array. For example:

SC::Store::Point points[] = {
{ 0.0f, 0.0f, 1.0f },
{ 1.0f, 0.0f, 1.0f },
};

◆ rgba32_count

uint32_t SC::Store::BaseMesh::rgba32_count

The number of RGBA32 elements in the rgba32s array.

An rgba32s array with the elements { RGBA32(255, 0, 0, 255), RGBA32(255, 0, 0, 128) } would have an rgba32_count of 2.

◆ rgba32s

RGBA32 const* SC::Store::BaseMesh::rgba32s

An array of RGBA32 color values.

Each RGBA32 object is constructed with a four-element array of 8-bit integers (0–255). For example:

SC::Store::RGBA32 rgba[] = {
RGBA32(255, 0, 0, 255),
RGBA32(255, 0, 0, 128),
};

◆ uv_count

uint32_t SC::Store::BaseMesh::uv_count

The number of UV elements in the uvs array.

A uvs array with the elements { 0.0f, 0.0f }, { 1.0f, 0.0f } would have a uv_count of 2.

◆ uvs

UV const* SC::Store::BaseMesh::uvs

An array of UV points.

Each UV is constructed with a two-element float array. For example:

SC::Store::UV uvs[] = {
{ 0.0f, -1.0f },
{ 0.0f, 0.0f },
};