Mesh - Factor Documentation

Mesh


Vocabulary
raylib

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

Fields
vertexCount int Number of vertices stored in arrays
triangleCount int Number of triangles stored (indexed or not)
_vertices float * Vertex position (XYZ - 3 components per vertex)
_texcoords float * Vertex texture coordinates (UV - 2 components per vertex)
_texcoords2 float * Vertex second texture coordinates (useful for lightmaps)
_normals float * Vertex normals (XYZ - 3 components per vertex)
tangents float * Vertex tangents (XYZW - 4 components per vertex)
colors uchar * Vertex colors (RGBA - 4 components per vertex)
indices ushort * Vertex indices (in case vertex data comes indexed)
boneCount int Number of bones (MAX: 256 bones)
boneIds uchar * Vertex bone indices, up to 4 bones influence by vertex (skinning)
boneWeights float * Vertex bone weight, up to 4 bones influence by vertex (skinning)
animVertices float * Animated vertex positions (after bones transformations)
animNormals float * Animated normals (after bones transformations)
vaoId uint OpenGL Vertex Array Object id
vboId uint * OpenGL Vertex Buffer Objects id (default vertex data)


Definition
USING: alien.c-types classes.struct ;

IN: raylib

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


Methods
USING: classes.struct classes.struct.private kernel raylib ;

M: Mesh clone clone-underlying \ Mesh memory>struct ; inline


USING: accessors classes.struct combinators.smart raylib ;

M: Mesh struct-slot-values
{
[ vertexCount>> ]
[ triangleCount>> ]
[ _vertices>> ]
[ _texcoords>> ]
[ _texcoords2>> ]
[ _normals>> ]
[ tangents>> ]
[ colors>> ]
[ indices>> ]
[ boneCount>> ]
[ boneIds>> ]
[ boneWeights>> ]
[ animVertices>> ]
[ animNormals>> ]
[ vaoId>> ]
[ vboId>> ]
} cleave>array ; inline

AltStyle によって変換されたページ (->オリジナル) /