UmbraMesh struct

3D triangle mesh.

A mesh consists of a set of vertices, and a set of triangles that refers to the vertices by index.

Derived classes

struct Umbra::Mesh
3D triangle mesh.

Public variables

const UmbraFloat3* vertices
Array of vertex positions.
const UmbraFloat3* normals
Array of vertex normals.
const UmbraFloat3* tangents
Array of vertex tangents.
const UmbraFloat2* texCoords
Array of texture coordinates.
const UmbraFloat4* colors
Array of vertex colors.
const UmbraInt3* triangles
Array of triangles.
const UmbraTriangleFlags* triangleFlags
Array of per-triangle flags.
uint32_t vertexCount
Size of vertices.
uint32_t triangleCount
Size of triangles.

Variable details

const UmbraFloat3* UmbraMesh::normals

Array of vertex normals.

Must either be the same size as vertices, or NULL.

const UmbraFloat3* UmbraMesh::tangents

Array of vertex tangents.

Must either be the same size as vertices, or NULL.

const UmbraFloat2* UmbraMesh::texCoords

Array of texture coordinates.

Must either be the same size as vertices, or NULL. Must be provided when using textures.

const UmbraFloat4* UmbraMesh::colors

Array of vertex colors.

Must either be the same size as vertices, or NULL.

const UmbraInt3* UmbraMesh::triangles

Array of triangles.

A triangle is represented by three integers, which are used as indices into the vertex data arrays.

const UmbraTriangleFlags* UmbraMesh::triangleFlags

Array of per-triangle flags.

Must either by the same size as vertices, or NULL.