MeshVertexAttribute describes how Kanzi stores mesh vertex and instance data in memory. More...
#include <kanzi/core.ui/graphics3d/graphics_enums.hpp>
Public Member Functions | |
MeshVertexAttribute () | |
Constructor. | |
MeshVertexAttribute (string_view name, Semantic semantic, unsigned int semanticIndex, GraphicsDataType dataType, unsigned int dimension, unsigned int offset) | |
Constructor. | |
Public Member Functions inherited from kanzi::VertexAttribute | |
VertexAttribute ()=default | |
Constructor. | |
VertexAttribute (string_view name, Semantic semantic, unsigned int semanticIndex) | |
Constructor. | |
Public Attributes | |
GraphicsDataType | dataType |
Attribute data type. | |
unsigned int | dimension |
Attribute dimension. | |
unsigned int | divisor |
Attribute divisor. | |
unsigned int | offset |
Attribute offset. This equals to offset of previous attribute + the size of it. | |
unsigned int | stride |
Attribute stride. | |
Public Attributes inherited from kanzi::VertexAttribute | |
string | name |
Name of the attribute. Not currently used. | |
Semantic | semantic |
Attribute semantic. | |
unsigned int | semanticIndex |
Semantic index. | |
Additional Inherited Members | |
Public Types inherited from kanzi::VertexAttribute | |
enum | Semantic { SemanticPosition , SemanticNormal , SemanticTangent , SemanticTextureCoordinate , SemanticColor , SemanticWeight , SemanticMatrixPalette , SemanticBitangent , SemanticCount , SemanticCustom , SemanticInvalid } |
Specifies the available vertex attributes. More... | |
MeshVertexAttribute describes how Kanzi stores mesh vertex and instance data in memory.
Since MeshVertexAttribute is derived from VertexAttribute, it has a name, a semantic, and a semantic index. Each mesh attribute also has:
Together these specify how vertex data is formatted in memory.
Instance attributes are similar to vertex attributes, but have a divisor set to a non-zero value, and are shared by all vertices of an instance. The divisor value indicates how many instances share the same attribute values. Value 1 means that every instance gets a new value. Value 2 means that two instances share the values and every other instance gets new values, and so on.
|
inlineexplicit |
Constructor.
|
inlineexplicit |
Constructor.
name | Name of vertex attribute. |
semantic | Semantic of vertex attribute. |
semanticIndex | Semantic index of vertex attribute. |
dataType | Datatype of vertex attribute. |
dimension | Dimension of vertex attribute. |
offset | Offset of vertex attribute. |
|
friend |
|
friend |
|
friend |
GraphicsDataType kanzi::MeshVertexAttribute::dataType |
Attribute data type.
Attribute offset. This equals to offset of previous attribute + the size of it.
Attribute divisor.
Value 0 for vertex attributes, 1+ for instance attributes.