Vertex format information. More...
#include <kanzi/core.ui/graphics3d/graphics_enums.hpp>
Public Member Functions | |
| void | expandForShapeCount (unsigned int shapeCount) |
| Expand the vertex format for given shape count. | |
| MeshVertexFormat ()=default | |
| Default constructor. | |
| MeshVertexFormat (const MeshVertexFormat &other)=default | |
| Copy constructor. | |
| MeshVertexFormat (MeshVertexFormat &&other)=default | |
| Move constructor. | |
| MeshVertexFormat (unsigned int vertexAttributeCount) | |
| Default constructor. | |
| MeshVertexFormat & | operator= (const MeshVertexFormat &other)=default |
| Copy operator. | |
| MeshVertexFormat & | operator= (MeshVertexFormat &&other)=default |
| Move operator. | |
| void | updateSizesAndOffsets () |
| Update sizes and offsets based on existing attributes. | |
| void | updateSizesAndOffsetsInterleaved () |
| Update sizes and offsets based on existing attributes. | |
| void | updateStrides (unsigned int strideBytes) |
| Override the calculated vertex size with a larger stride. | |
| ~MeshVertexFormat ()=default | |
| Destructor. | |
Public Attributes | |
| vector< MeshVertexAttribute > | attributes |
| Vertex attributes. | |
| unsigned int | instanceSize |
| Per-instance size. | |
| unsigned int | vertexSize |
| Per-vertex size. | |
Vertex format information.
|
explicitdefault |
Default constructor.
|
default |
Destructor.
Default constructor.
| vertexAttributeCount | Initial size for vertex attribute array. |
|
default |
Copy constructor.
| other | Source object. |
|
default |
Move constructor.
| other | Source object. |
Expand the vertex format for given shape count.
All information the vertex format must be for exactly one shape before calling this function.
| shapeCount | Number of shapes. |
| void kanzi::MeshVertexFormat::updateSizesAndOffsets | ( | ) |
Update sizes and offsets based on existing attributes.
Kanzi calls this function after either loading the vertex from KZB format or generating it manually in code.
| void kanzi::MeshVertexFormat::updateSizesAndOffsetsInterleaved | ( | ) |
Update sizes and offsets based on existing attributes.
Kanzi calls this function after either loading the vertex from KZB format or generating it manually in code.
Override the calculated vertex size with a larger stride.
Use this when vertex data is padded beyond the packed format size.
| strideBytes | Explicit vertex size in bytes. Must be at least the packed vertexSize. |
|
default |
Copy operator.
| other | Source object. |
|
default |
Move operator.
| other | Source object. |
| vector<MeshVertexAttribute> kanzi::MeshVertexFormat::attributes |
Vertex attributes.