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) | |
| Copy constructor. | |
| MeshVertexFormat (MeshVertexFormat &&other) | |
| Move constructor. | |
| MeshVertexFormat (unsigned int vertexAttributeCount) | |
| Default constructor. | |
| MeshVertexFormat & | operator= (const MeshVertexFormat &other) |
| Copy operator. | |
| MeshVertexFormat & | operator= (MeshVertexFormat &&other) |
| Move operator. | |
| void | updateSizesAndOffsets () |
| Update sizes and offsets based on existing attributes. | |
| void | updateStrides () |
| Update strides based on vertex and instance sizes. | |
| void | updateStrides (unsigned int strideBytes) |
| Set stride explicitly and update the attribute strides. | |
| ~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. |
|
inline |
Copy constructor.
| other | Source object. |
|
inline |
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.
|
inline |
Update strides based on vertex and instance sizes.
This function is not part of updateSizesAndOffsets() since manual stride setting may overriden calculated size.
Set stride explicitly and update the attribute strides.
|
inline |
Copy operator.
| other | Source object. |
|
inline |
Move operator.
| other | Source object. |
| vector<MeshVertexAttribute> kanzi::MeshVertexFormat::attributes |
Vertex attributes.