Mesh


Vocabulary
raylib

Class description
Holds the vertex data and VAO/VBO for a 3D mesh.

Fields
vertexCountintNumber of vertices stored in arrays
triangleCountintNumber of triangles stored (indexed or not)
_verticesfloat*Vertex position (XYZ - 3 components per vertex)
_texcoordsfloat*Vertex texture coordinates (UV - 2 components per vertex)
_texcoords2float*Vertex second texture coordinates (useful for lightmaps)
_normalsfloat*Vertex normals (XYZ - 3 components per vertex)
tangentsfloat*Vertex tangents (XYZW - 4 components per vertex)
colorsuchar*Vertex colors (RGBA - 4 components per vertex)
indicesushort*Vertex indices (in case vertex data comes indexed)
animVerticesfloat*Animated vertex positions (after bones transformations)
animNormalsfloat*Animated normals (after bones transformation)
boneIdsuchar*Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skining)
boneWeightsfloat*Vertex bone weight, up to 4 bones influence by vertex (skinning)
vaoIduintOpenGL Vertex Array Object id
vboIduint*OpenGL Vertex Buffer Objects id (7 types of vertex data)


Definition


STRUCT: Mesh
{ vertexCount int initial: 0 }
{ triangleCount int initial: 0 } { _vertices float* }
{ _texcoords float* } { _texcoords2 float* }
{ _normals float* } { tangents float* } { colors uchar* }
{ indices ushort* } { animVertices float* }
{ animNormals float* } { boneIds uchar* }
{ boneWeights float* } { vaoId uint initial: 0 }
{ vboId uint* } ;


Methods