Simple |
ArrayStride gets or sets an integer that specifies how many VertexBufferArray elements define one Vertex.
When SimpleMesh is created with standard vertex buffer structs like PositionNormalTexture, then the ArrayStride should be set to 1 because on PositionNormalTexture element (one element in array) defines all the data needed to describe one Vertex.
When SimpleMesh is created with basic types like float or byte, then more then one array element is needed to define one Vertex. For example if SimpleMesh is defined as SimpleMesh<float> (with float values) and one Vertex data contains position, normal and texture, then the ArrayStride should be 3 + 3 + 2 = 8 (8 float values represent one Vertex). When using byte, the ArrayStride should be set to (3 + 3 + 2) * 4 = 32 (32 bytes for one Vertex; 1 float = 4 bytes)
This value must be changed before the SimpleMesh is initialized. If the value is changed after that, the RecreateMesh(Boolean, Boolean, Boolean) must be called.
Default value is 1.