This struct defines a triangle mesh in the model. More...
#include "Model_cmdl.hpp"
Classes | |
struct | TriangleT |
A single triangle. More... | |
struct | VertexT |
A single vertex. More... | |
struct | WeightT |
A weight is a fixed position in the coordinate system of a joint. More... | |
Public Types | |
enum | TangentSpaceMethodT { HARD, GLOBAL, SM_GROUPS } |
The methods that can be used to generate the tangent-space axes at the vertices of a mesh. More... | |
Public Member Functions | |
MeshT () | |
The default constructor. More... | |
bool | AreGeoDups (unsigned int Vertex1Nr, unsigned int Vertex2Nr) const |
Determines whether the two vertices with array indices Vertex1Nr and Vertex2Nr are geometrical duplicates of each other. More... | |
std::string | GetTSMethod () const |
Returns a string representation of the TSMethod enum member. More... | |
void | SetTSMethod (const std::string &m) |
Sets the TSMethod enum member by string. More... | |
Public Attributes | |
std::string | Name |
Name of this mesh. More... | |
MaterialT * | Material |
The material of this mesh. More... | |
MatSys::RenderMaterialT * | RenderMaterial |
The render material used to render this mesh. More... | |
TangentSpaceMethodT | TSMethod |
How to generate the tangent-space axes at the vertices of this mesh? For meshes with normal-maps, the method should match the one that was used in the program that created the normal-maps. More... | |
bool | CastShadows |
Should this mesh cast shadows? More... | |
ArrayT< TriangleT > | Triangles |
List of triangles this mesh consists of. More... | |
ArrayT< VertexT > | Vertices |
List of vertices this mesh consists of. More... | |
ArrayT< WeightT > | Weights |
List of weights that are attached to the skeleton (hierarchy of bones/joints). More... | |
This struct defines a triangle mesh in the model.
A mesh essentially consists of a list of triangles whose vertices are composed of weighted positions that are attached to the joints of the model.
The methods that can be used to generate the tangent-space axes at the vertices of a mesh.
|
inline |
The default constructor.
bool CafuModelT::MeshT::AreGeoDups | ( | unsigned int | Vertex1Nr, |
unsigned int | Vertex2Nr | ||
) | const |
Determines whether the two vertices with array indices Vertex1Nr and Vertex2Nr are geometrical duplicates of each other.
Two distinct vertices are geometrical duplicates of each other if (a) they have the same NumWeights and the same FirstWeightIdx, or (b) they have the same NumWeights and the referred weights have the same contents. The two vertices may in general have different uv-coordinates, which are not considered for the geodup property. Note that if Vertex1Nr==Vertex2Nr, true is returned (case (a) above).
Vertex1Nr | Array index of first vertex. |
Vertex2Nr | Array index of second vertex. |
std::string CafuModelT::MeshT::GetTSMethod | ( | ) | const |
Returns a string representation of the TSMethod enum member.
void CafuModelT::MeshT::SetTSMethod | ( | const std::string & | m | ) |
Sets the TSMethod enum member by string.
The given string should be one of the strings returned by GetTSMethod(). If the string does not match a known method, TSMethod is set to GLOBAL.
m | The method to set TSMethod to. |
bool CafuModelT::MeshT::CastShadows |
Should this mesh cast shadows?
MaterialT* CafuModelT::MeshT::Material |
The material of this mesh.
std::string CafuModelT::MeshT::Name |
Name of this mesh.
MatSys::RenderMaterialT* CafuModelT::MeshT::RenderMaterial |
The render material used to render this mesh.
TangentSpaceMethodT CafuModelT::MeshT::TSMethod |
How to generate the tangent-space axes at the vertices of this mesh? For meshes with normal-maps, the method should match the one that was used in the program that created the normal-maps.
List of weights that are attached to the skeleton (hierarchy of bones/joints).