#include <mesh_material_mapping.h>
Public Member Functions | |
MeshMaterialMapping () | |
A constructor that does nothing. | |
virtual | ~MeshMaterialMapping () |
A destructor that does nothing. | |
int | get_face_count () const |
Return the number of faces of the associated mesh. | |
int | get_face_material_index (int face_index) const |
Return the index of the material of the face with the given index. | |
void | append_face_material_index (int material_index) |
Add a new material index. | |
virtual void | accept (Visitor *visitor) |
Accept a visitor. | |
Private Attributes | |
std::vector< int > | mappings |
MeshMaterialMapping::MeshMaterialMapping | ( | ) |
A constructor that does nothing.
virtual MeshMaterialMapping::~MeshMaterialMapping | ( | ) | [virtual] |
A destructor that does nothing.
virtual void MeshMaterialMapping::accept | ( | Visitor * | visitor | ) | [virtual] |
void MeshMaterialMapping::append_face_material_index | ( | int | material_index | ) |
Add a new material index.
The material index added will be associated with the face whose index is the number of material indices stored at the time of addition.
For example, the first material index added with the associated with Face 0. The second material index added will be associated with Face 1. And so on.
int MeshMaterialMapping::get_face_count | ( | ) | const |
Return the number of faces of the associated mesh.
The value returned by the method is equal to the number of material indices stored.
int MeshMaterialMapping::get_face_material_index | ( | int | face_index | ) | const |
Return the index of the material of the face with the given index.
std::vector<int> MeshMaterialMapping::mappings [private] |