- Cal3D 0.11 API Reference -

Public Member Functions | List of all members
CalMesh Class Reference

Public Member Functions

 CalMesh (CalCoreMesh *pCoreMesh)
 Constructs the mesh instance.
 
 ~CalMesh ()
 Destructs the mesh instance.
 
CalCoreMeshgetCoreMesh ()
 Provides access to the core mesh.
 
const CalCoreMeshgetCoreMesh () const
 Provides access to the core mesh.
 
CalSubmeshgetSubmesh (int id)
 Provides access to a submesh.
 
const CalSubmeshgetSubmesh (int id) const
 Provides access to a submesh.
 
int getSubmeshCount () const
 Returns the number of submeshes.
 
std::vector< CalSubmesh * > & getVectorSubmesh ()
 Returns the submesh vector.
 
const std::vector< CalSubmesh * > & getVectorSubmesh () const
 Returns the submesh vector.
 
void setLodLevel (float lodLevel)
 Sets the LOD level.
 
void setMaterialSet (int setId)
 Sets the material set.
 
void setModel (CalModel *pModel)
 Sets the model.
 
void disableInternalData ()
 Disable internal data (and thus springs system)
 

Constructor & Destructor Documentation

◆ CalMesh()

CalMesh::CalMesh ( CalCoreMesh * pCoreMesh)

Constructs the mesh instance.

This function is the default constructor of the mesh instance.

◆ ~CalMesh()

CalMesh::~CalMesh ( )

Destructs the mesh instance.

This function is the destructor of the mesh instance.

Member Function Documentation

◆ getCoreMesh() [1/2]

CalCoreMesh * CalMesh::getCoreMesh ( )

Provides access to the core mesh.

This function returns the core mesh on which this mesh instance is based on.

Returns
One of the following values:
  • a pointer to the core mesh
  • 0 if an error happened

◆ getCoreMesh() [2/2]

const CalCoreMesh * CalMesh::getCoreMesh ( ) const

Provides access to the core mesh.

This function returns the core mesh on which this mesh instance is based on.

Returns
One of the following values:
  • a pointer to the core mesh
  • 0 if an error happened

◆ getSubmesh() [1/2]

CalSubmesh * CalMesh::getSubmesh ( int id)

Provides access to a submesh.

This function returns the submesh with the given ID.

Parameters
idThe ID of the submesh that should be returned.
Returns
One of the following values:
  • a pointer to the submesh
  • 0 if an error happened

◆ getSubmesh() [2/2]

const CalSubmesh * CalMesh::getSubmesh ( int id) const

Provides access to a submesh.

This function returns the submesh with the given ID.

Parameters
idThe ID of the submesh that should be returned.
Returns
One of the following values:
  • a pointer to the submesh
  • 0 if an error happened

◆ getSubmeshCount()

int CalMesh::getSubmeshCount ( ) const

Returns the number of submeshes.

This function returns the number of submeshes in the mesh instance.

Returns
The number of submeshes.

◆ getVectorSubmesh() [1/2]

std::vector< CalSubmesh * > & CalMesh::getVectorSubmesh ( )

Returns the submesh vector.

This function returns the vector that contains all submeshes of the mesh instance.

Returns
A reference to the submesh vector.

◆ getVectorSubmesh() [2/2]

const std::vector< CalSubmesh * > & CalMesh::getVectorSubmesh ( ) const

Returns the submesh vector.

This function returns the vector that contains all submeshes of the mesh instance.

Returns
A reference to the submesh vector.

◆ setLodLevel()

void CalMesh::setLodLevel ( float lodLevel)

Sets the LOD level.

This function sets the LOD level of the mesh instance.

Parameters
lodLevelThe LOD level in the range [0.0, 1.0].

◆ setMaterialSet()

void CalMesh::setMaterialSet ( int setId)

Sets the material set.

This function sets the material set of the mesh instance.

Parameters
setIdThe ID of the material set.

◆ setModel()

void CalMesh::setModel ( CalModel * pModel)

Sets the model.

This function sets the model to which the mesh instance is attached to.

Parameters
pModelThe model to which the mesh instance should be attached to.

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

Generated by The Cal3D Team with Doxygen 1.10.0