class Mesh

book_4_sparkGenerated
code_blocksInput

Description

A mesh is a basic version of a Model, containing a set of vertices and indices which make up faces that make up a shape.

A set of meshes can be used to create a Model via the ModelBuilder class.

Members

Properties

Member NameSummary
IsValidIndicates whether the mesh is valid.
PrimitiveTypeSets the primitive type for this mesh.
MaterialSets material for this mesh.
BoundsSets AABB bounds for this mesh.
UvDensityUsed to calculate texture size for texture streaming.
HasIndexBufferWhether this mesh has an index buffer.
IndexCountNumber of indices this mesh has.
HasVertexBufferWhether this mesh has a vertex buffer.
VertexCountNumber of vertices this mesh has.

Methods

Static Methods

Member NameSummary
TriangulatePolygonTriangulates a polygon given a span of vertices.

Instance Methods

Member NameSummary
SetVertexRangeSets the range of vertices to be used.
SetIndexRangeSets the range of indices to be used.
CreateBuffersCreates vertex and index buffers.
CreateIndexBufferCreate an empty index buffer, it can be resized later.
SetIndexBufferDataSets data for the index buffer.
SetIndexBufferSizeSets the size of the index buffer.
LockIndexBufferLocks the index buffer for modification.
CreateVertexBufferCreates a vertex buffer with specified layout.
SetVertexBufferDataSets data for the vertex buffer.
SetVertexBufferSizeSets the size of the vertex buffer.
LockVertexBufferLocks the vertex buffer for modification.