MeshMaterialMapping Class Reference

Represent a mapping from a mesh's faces to indices of the material of that face. More...

#include <mesh_material_mapping.h>

Inheritance diagram for MeshMaterialMapping:

Object ReferenceCounted

List of all members.

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


Detailed Description

Represent a mapping from a mesh's faces to indices of the material of that face.

Constructor & Destructor Documentation

MeshMaterialMapping::MeshMaterialMapping (  ) 

A constructor that does nothing.

virtual MeshMaterialMapping::~MeshMaterialMapping (  )  [virtual]

A destructor that does nothing.


Member Function Documentation

virtual void MeshMaterialMapping::accept ( Visitor visitor  )  [virtual]

Accept a visitor.

Implements Object.

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.


Member Data Documentation

std::vector<int> MeshMaterialMapping::mappings [private]


The documentation for this class was generated from the following file:

Generated on Tue Sep 8 02:20:35 2009 for cglib by  doxygen 1.5.9