- Cal3D 0.11 API Reference -

Public Types | Public Member Functions | Protected Member Functions | List of all members
CalCoreMesh Class Reference
Inheritance diagram for CalCoreMesh:
cal3d::RefCounted

Public Types

typedef std::vector< CalCoreSubmesh * > CalCoreSubmeshVector
 

Public Member Functions

 CalCoreMesh ()
 Constructs the core mesh instance.
 
unsigned int size ()
 
int addCoreSubmesh (CalCoreSubmesh *pCoreSubmesh)
 Adds a core submesh.
 
CalCoreSubmeshgetCoreSubmesh (int id)
 Provides access to a core submesh.
 
const CalCoreSubmeshgetCoreSubmesh (int id) const
 Provides access to a core submesh.
 
void removeCoreSubmesh (int submeshID)
 Removes a core submesh.
 
int getCoreSubmeshCount () const
 Returns the number of core submeshes.
 
void reserve (int submeshes)
 
std::vector< CalCoreSubmesh * > & getVectorCoreSubmesh ()
 Returns the core submesh vector.
 
const std::vector< CalCoreSubmesh * > & getVectorCoreSubmesh () const
 Returns the core submesh vector.
 
int addAsMorphTarget (CalCoreMesh *pCoreMesh)
 add a CalCoreMesh as MorphId
 
int getMorphTargetId (std::string const &morphTargetName)
 retrieve MorphId from MorphTargetName
 
bool hasMorphTargets ()
 return true if submeshes have morphTargets
 
void scale (float factor)
 Scale the Mesh.
 
void setFilename (const std::string &filename)
 Set the name of the file in which the core mesh is stored, if any.
 
const std::string & getFilename (void) const
 Get the name of the file in which the core mesh is stored, if any.
 
void setName (const std::string &name)
 Set the symbolic name of the core mesh.
 
const std::string & getName (void) const
 Get the symbolic name the core mesh.
 
- Public Member Functions inherited from cal3d::RefCounted
int getRefCount () const
 

Protected Member Functions

 ~CalCoreMesh ()
 Destructs the core mesh instance.
 
- Protected Member Functions inherited from cal3d::RefCounted
virtual ~RefCounted ()
 Protected so users of refcounted classes don't use std::auto_ptr or the delete operator.
 

Constructor & Destructor Documentation

◆ ~CalCoreMesh()

CalCoreMesh::~CalCoreMesh ( )
protected

Destructs the core mesh instance.

This function is the destructor of the core mesh instance.

◆ CalCoreMesh()

CalCoreMesh::CalCoreMesh ( )

Constructs the core mesh instance.

This function is the default constructor of the core mesh instance.

Member Function Documentation

◆ addAsMorphTarget()

int CalCoreMesh::addAsMorphTarget ( CalCoreMesh * pCoreMesh)

add a CalCoreMesh as MorphId

Adds a core submesh.

This function adds a core mesh as a blend target. It adds appropriate CalCoreSubMorphTargets to each of the core sub meshes.

Parameters
pCoreMeshA pointer to the core mesh that shoulb become a blend target.
morphTargetA string to be assigned as the morph target's name
Returns
One of the following values:
  • the assigned morph target ID of the added blend target
  • -1 if an error happened

different than IMVU: blendvertex store only deltas

store morphid as a mesh attribute

◆ addCoreSubmesh()

int CalCoreMesh::addCoreSubmesh ( CalCoreSubmesh * pCoreSubmesh)

Adds a core submesh.

This function adds a core submesh to the core mesh instance.

Parameters
pCoreSubmeshA pointer to the core submesh that should be added.
Returns
One of the following values:
  • the assigned submesh ID of the added core submesh
  • -1 if an error happened

◆ getCoreSubmesh() [1/2]

CalCoreSubmesh * CalCoreMesh::getCoreSubmesh ( int id)

Provides access to a core submesh.

This function returns the core submesh with the given ID.

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

◆ getCoreSubmesh() [2/2]

const CalCoreSubmesh * CalCoreMesh::getCoreSubmesh ( int id) const

Provides access to a core submesh.

This function returns the core submesh with the given ID.

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

◆ getCoreSubmeshCount()

int CalCoreMesh::getCoreSubmeshCount ( ) const

Returns the number of core submeshes.

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

Returns
The number of core submeshes.

◆ getFilename()

const std::string & CalCoreMesh::getFilename ( void ) const

Get the name of the file in which the core mesh is stored, if any.

Returns
One of the following values:
  • empty string if the mesh was not stored in a file
  • the path of the file

◆ getMorphTargetId()

int CalCoreMesh::getMorphTargetId ( std::string const & morphTargetName)

retrieve MorphId from MorphTargetName

Set the name of the file in which the core mesh is stored, if any.

Parameters
filenameThe path of the file.

◆ getName()

const std::string & CalCoreMesh::getName ( void ) const

Get the symbolic name the core mesh.

Returns
One of the following values:
  • empty string if the mesh was no associated to a symbolic name
  • the symbolic name

◆ getVectorCoreSubmesh() [1/2]

std::vector< CalCoreSubmesh * > & CalCoreMesh::getVectorCoreSubmesh ( )

Returns the core submesh vector.

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

Returns
A reference to the core submesh vector.

◆ getVectorCoreSubmesh() [2/2]

const std::vector< CalCoreSubmesh * > & CalCoreMesh::getVectorCoreSubmesh ( ) const

Returns the core submesh vector.

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

Returns
A reference to the core submesh vector.

◆ removeCoreSubmesh()

void CalCoreMesh::removeCoreSubmesh ( int submeshID)

Removes a core submesh.

This function removes a core submesh from the core mesh instance.

Parameters
submeshID of the core submesh that should be removed.

◆ scale()

void CalCoreMesh::scale ( float factor)

Scale the Mesh.

This function rescale all the data that are in the core mesh instance.

Parameters
factorA float with the scale factor

◆ setFilename()

void CalCoreMesh::setFilename ( const std::string & filename)

Set the name of the file in which the core mesh is stored, if any.

Parameters
filenameThe path of the file.

◆ setName()

void CalCoreMesh::setName ( const std::string & name)

Set the symbolic name of the core mesh.

Parameters
nameA symbolic name.

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

Generated by The Cal3D Team with Doxygen 1.10.0