Mesh
Inherited: None
Description
Public Methods
void |
batchMesh (Mesh & mesh, const Matrix4 * transform = nullptr) |
Vector4Vector & |
bones () |
bound () const |
|
void |
clear () |
Vector4Vector & |
colors () |
Material * |
defaultMaterial (int sub = 0) const |
int |
indexCount (int sub) const |
int |
indexStart (int sub) const |
IndexVector & |
indices () |
bool |
isDynamic () const |
bool |
isEmpty () const |
void |
makeDynamic () |
Vector3Vector & |
normals () |
void |
recalcBounds () |
void |
|
void |
setBones (const Vector4Vector & bones) |
void |
setBound (const AABBox & box) |
void |
setColors (const Vector4Vector & colors) |
void |
setDefaultMaterial (Material * material, int sub = 0) |
void |
setIndices (const IndexVector & indices) |
void |
setNormals (const Vector3Vector & normals) |
void |
setSubMesh (int offset, int sub) |
void |
setTangents (const Vector3Vector & tangents) |
void |
setUv0 (const Vector2Vector & uv0) |
void |
setUv1 (const Vector2Vector & uv1) |
void |
setVertices (const Vector3Vector & vertices) |
void |
setWeights (const Vector4Vector & weights) |
int |
subMeshCount () const |
Vector3Vector & |
tangents () |
Vector2Vector & |
uv0 () |
Vector2Vector & |
uv1 () |
Vector3Vector & |
vertices () |
Vector4Vector & |
weights () |
Static Methods
None
Methods Description
Merges current with provided mesh. In the case of the transform, the matrix is not nullptr it will be applied to mesh before merging.
Vector4Vector & Mesh::bones ()
Returns an array of bones for vertices for the particular Lod.
See also setBones().
AABBox Mesh::bound () const
Returns bounding box for the Mesh.
See also setBound().
void Mesh::clear ()
Removes all mesh data.
Vector4Vector & Mesh::colors ()
Returns an array of colors for vertices for the particular Mesh.
See also setColors().
Material * Mesh::defaultMaterial (int sub = 0) const
Returns a default material for the sub mesh.
See also setDefaultMaterial().
int Mesh::indexCount (int sub) const
Returns index count for the sub mesh.
int Mesh::indexStart (int sub) const
Returns starting point index for the sub mesh.
IndexVector & Mesh::indices ()
Returns an array of mesh indices for the particular Mesh.
See also setIndices().
bool Mesh::isDynamic () const
Returns true in case of mesh can by changed at the runtime; otherwise returns false.
bool Mesh::isEmpty () const
Returns false if mesh structure is empty; otherwise returns true.
void Mesh::makeDynamic ()
Marks mesh as dynamic that means it’s can be changed at the runtime.
Vector3Vector & Mesh::normals ()
Returns an array of mesh normals for the particular Lod.
See also setNormals().
void Mesh::recalcBounds ()
Generates bound box according new geometry.
void Mesh::recalcNormals ()
Recalculates the normals of the Mesh from the triangles and vertices.
void Mesh::setBones (Vector4Vector & bones)
Sets an array of bones for vertices for the particular Lod.
See also *bones*().
void Mesh::setBound (AABBox & box)
Sets new bounding box for the Mesh.
See also bound().
void Mesh::setColors (Vector4Vector & colors)
Sets an array of colors for vertices for the particular Mesh.
See also *colors*().
void Mesh::setDefaultMaterial (Material * material, int sub = 0)
Sets a default material for the sub mesh.
See also defaultMaterial().
void Mesh::setIndices (IndexVector & indices)
Sets an array of mesh indices for the particular Mesh.
See also *indices*().
void Mesh::setNormals (Vector3Vector & normals)
Sets an array of mesh normals for the particular Lod.
See also *normals*().
void Mesh::setSubMesh (int offset, int sub)
Sets a base vertex offset for the sub mesh.
void Mesh::setTangents (Vector3Vector & tangents)
Sets an array of mesh tangents for the particular Lod.
See also *tangents*().
void Mesh::setUv0 (Vector2Vector & uv0)
Sets an array of mesh uv0 (base) texture coordinates for the particular Lod.
See also *uv0*().
void Mesh::setUv1 (Vector2Vector & uv1)
Sets an array of mesh uv1 texture coordinates for the particular Lod.
See also *uv1*().
void Mesh::setVertices (Vector3Vector & vertices)
Sets an array of mesh vertices for the particular Lod.
See also *vertices*().
void Mesh::setWeights (Vector4Vector & weights)
Sets an array of bone weights for the particular Lod.
See also *weights*().
int Mesh::subMeshCount () const
Returns the number of sub-meshes inside the Mesh.
Vector3Vector & Mesh::tangents ()
Returns an array of mesh tangents for the particular Lod.
See also setTangents().
Vector2Vector & Mesh::uv0 ()
Returns an array of mesh uv0 (base) texture coordinates for the particular Lod.
See also setUv0().
Vector2Vector & Mesh::uv1 ()
Returns an array of mesh uv1 texture coordinates for the particular Lod.
See also setUv1().
Vector3Vector & Mesh::vertices ()
Returns an array of mesh vertices for the particular Lod.
See also setVertices().
Vector4Vector & Mesh::weights ()
Returns an array of bone weights for the particular Mesh.
See also setWeights().