- Cal3D 0.11 API Reference -

Public Member Functions | List of all members
CalCoreModel Class Reference

Public Member Functions

 CalCoreModel (const std::string &name)
 Constructs the core model instance.
 
 CalCoreModel (const CalCoreModel &inOther)
 Constructs a copy of a core model instance.
 
 ~CalCoreModel ()
 Destructs the core model instance.
 
Cal::UserData getUserData ()
 Provides access to the user data.
 
const Cal::UserData getUserData () const
 Provides access to the user data.
 
void setUserData (Cal::UserData userData)
 Stores user data.
 
const std::string & getName () const
 Returns the name.
 
void setName (const char *inName)
 Changes the name.
 
void scale (float factor)
 Scale the core model.
 
int getNumCoreAnimations () const
 
int addCoreAnimation (CalCoreAnimation *pCoreAnimation)
 Adds a core animation.
 
bool removeCoreAnimation (int id)
 
CalCoreAnimationgetCoreAnimation (int coreAnimationId)
 Provides access to a core animation.
 
const CalCoreAnimationgetCoreAnimation (int coreAnimationId) const
 Provides access to a core animation.
 
bool removeCoreAnimatedMorph (int id)
 
int getCoreAnimationCount () const
 Returns the number of core animations.
 
int loadCoreAnimation (const std::string &strFilename)
 Loads a core animation.
 
int loadCoreAnimation (void *buffer, const std::string &strAnimationName)
 
int loadCoreAnimation (const std::string &strFilename, const std::string &strAnimationName)
 Loads a core animation and bind it to a name.
 
int loadCoreAnimation (void *buffer)
 Loads a core animation.
 
int unloadCoreAnimation (const std::string &name)
 Delete the resources used by the named core animation.
 
int unloadCoreAnimation (int coreAnimationId)
 Delete the resources used by a core animation.
 
bool saveCoreAnimation (const std::string &strFilename, int coreAnimationId) const
 Saves a core animation.
 
bool addAnimationName (const std::string &strAnimationName, int coreAnimationId)
 Creates or overwrites a string-to-animation ID mapping.
 
int getCoreAnimationId (const std::string &strAnimationName) const
 Retrieves the ID of the animation referenced by a string.
 
int addCoreAnimatedMorph (CalCoreAnimatedMorph *pCoreAnimatedMorph)
 Adds a core animated morph (different from a morph animation).
 
CalCoreAnimatedMorphgetCoreAnimatedMorph (int coreAnimatedMorphId)
 Provides access to a core morph animation.
 
const CalCoreAnimatedMorphgetCoreAnimatedMorph (int coreAnimatedMorphId) const
 
int getCoreAnimatedMorphId (const std::string &strAnimatedMorphName) const
 Retrieves the ID of the animated morph referenced by a string.
 
int getNumCoreAnimatedMorphs () const
 
int getCoreMorphAnimationCount () const
 
int loadCoreAnimatedMorph (const std::string &strFilename)
 Loads a core animatedMorph.
 
int loadCoreAnimatedMorph (const std::string &strFilename, const std::string &strAnimatedMorphName)
 
int loadCoreAnimatedMorph (void *buffer, unsigned int bufferLength)
 
int loadCoreAnimatedMorph (void *buffer, unsigned int bufferLength, const std::string &strAnimatedMorphName)
 
int unloadCoreAnimatedMorph (const std::string &name)
 Delete the resources used by the named core animated morph.
 
int unloadCoreAnimatedMorph (int coreAnimatedMorphId)
 Delete the resources used by a core animated orph.
 
bool saveCoreAnimatedMorph (const std::string &strFilename, int coreAnimatedMorphId) const
 Saves a core animated morph.
 
bool addAnimatedMorphName (const std::string &strAnimatedMorphName, int coreAnimatedMorphId)
 
int addCoreMaterial (CalCoreMaterial *pCoreMaterial)
 Adds a core material.
 
void cloneCoreMaterials ()
 Replace each core material by a copy.
 
bool createInternal (const std::string &strName)
 
bool createWithName (char const *strName)
 
bool createCoreMaterialThread (int coreMaterialThreadId)
 Creates a core material thread.
 
int getCoreAnimationMaxId ()
 
CalCoreMaterialgetCoreMaterial (int coreMaterialId)
 Provides access to a core material.
 
const CalCoreMaterialgetCoreMaterial (int coreMaterialId) const
 Provides access to a core material.
 
int getCoreMaterialCount () const
 Returns the number of core materials.
 
int getCoreMaterialId (int coreMaterialThreadId, int coreMaterialSetId) const
 Returns a specified core material ID.
 
int loadCoreMaterial (const std::string &strFilename)
 Loads a core material.
 
int loadCoreMaterial (void *buffer, const std::string &strMaterialName)
 
int loadCoreMaterial (const std::string &strFilename, const std::string &strMaterialName)
 Loads a core material and bind it to a name.
 
int loadCoreMaterial (void *buffer)
 Loads a core material.
 
int unloadCoreMaterial (const std::string &name)
 Delete the resources used by the named core material.
 
int unloadCoreMaterial (int coreMaterialId)
 Delete the resources used by a core material.
 
bool saveCoreMaterial (const std::string &strFilename, int coreMaterialId) const
 Saves a core material.
 
bool setCoreMaterialId (int coreMaterialThreadId, int coreMaterialSetId, int coreMaterialId)
 Sets a core material ID.
 
bool addMaterialName (const std::string &strMaterialName, int coreMaterialId)
 Creates or overwrites a string-to-core-material ID mapping.
 
int getCoreMaterialId (const std::string &strMaterialName) const
 Retrieves the ID of the core material referenced by a string.
 
int addCoreMesh (CalCoreMesh *pCoreMesh)
 Adds a core mesh.
 
void replaceCoreMesh (int coreMeshId, CalCoreMesh *pCoreMesh)
 Replaces a core mesh.
 
CalCoreMeshgetCoreMesh (int coreMeshId)
 Provides access to a core mesh.
 
const CalCoreMeshgetCoreMesh (int coreMeshId) const
 Provides access to a core mesh.
 
int getCoreMeshCount () const
 Returns the number of core meshes.
 
int loadCoreMesh (const std::string &strFilename)
 Loads a core mesh.
 
int loadCoreMesh (void *buffer, const std::string &strMeshName)
 
int loadCoreMesh (const std::string &strFilename, const std::string &strMeshName)
 Loads a core mesh and bind it to a name.
 
int loadCoreMesh (void *buffer)
 Loads a core mesh.
 
int unloadCoreMesh (const std::string &name)
 Delete the resources used by the named core mesh.
 
int unloadCoreMesh (int coreMeshId)
 Delete the resources used by a core mesh.
 
bool saveCoreMesh (const std::string &strFilename, int coreMeshId) const
 Saves a core mesh.
 
bool addMeshName (const std::string &strMeshName, int coreMeshId)
 Creates or overwrites a string-to-core-mesh ID mapping.
 
int getCoreMeshId (const std::string &strMeshName) const
 Retrieves the ID of the core mesh referenced by a string.
 
CalCoreSkeletongetCoreSkeleton ()
 Provides access to the core skeleton.
 
const CalCoreSkeletongetCoreSkeleton () const
 Provides access to the core skeleton.
 
bool loadCoreSkeleton (const std::string &strFilename)
 Loads the core skeleton.
 
bool loadCoreSkeleton (void *buffer)
 Loads the core skeleton.
 
bool saveCoreSkeleton (const std::string &strFilename) const
 Saves the core skeleton.
 
void setCoreSkeleton (CalCoreSkeleton *pCoreSkeleton)
 Sets the core skeleton.
 
void addBoneName (const std::string &strBoneName, int boneId)
 Creates or overwrites a string-to-boneId mapping.
 
int getBoneId (const std::string &strBoneName) const
 Retrieves the ID of the bone referenced by a string.
 
void setCoreMeshManagementOn (bool p)
 
bool getCoreMeshManagementOn ()
 
void setCoreAnimationManagementOn (bool p)
 
bool getCoreAnimationManagementOn ()
 

Constructor & Destructor Documentation

◆ CalCoreModel() [1/2]

CalCoreModel::CalCoreModel ( const std::string & name)

Constructs the core model instance.

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

◆ CalCoreModel() [2/2]

CalCoreModel::CalCoreModel ( const CalCoreModel & inOther)

Constructs a copy of a core model instance.

This function is the copy constructor of the core model instance.

◆ ~CalCoreModel()

CalCoreModel::~CalCoreModel ( )

Destructs the core model instance.

This function is the destructor of the core model instance.

Member Function Documentation

◆ addAnimationName()

bool CalCoreModel::addAnimationName ( const std::string & strAnimationName,
int coreAnimationId )

Creates or overwrites a string-to-animation ID mapping.

This function makes an animation ID reference-able by a string name. Note that we don't verify that the ID is valid because the animation may be added later. Also, if there is already a helper with this name, it will be overwritten without warning.

Parameters
strAnimationNameThe string that will be associated with the ID.
coreAnimationIdThe ID number of the animation to be referenced by the string.

◆ addBoneName()

void CalCoreModel::addBoneName ( const std::string & strBoneName,
int boneId )

Creates or overwrites a string-to-boneId mapping.

This function makes a bone ID reference-able by a string name.

Parameters
strBoneNameThe string that will be associated with the ID.
boneIdThe ID number of the bone that will be referenced by the string.

◆ addCoreAnimatedMorph()

int CalCoreModel::addCoreAnimatedMorph ( CalCoreAnimatedMorph * pCoreAnimatedMorph)

Adds a core animated morph (different from a morph animation).

Loads a core animated morph (different from a morph animation), and adds it to the model instance. The model instance will free the loaded core animated more when the model instance is freed.

Parameters
pCoreAnimationA pointer to the core animated morph that should be added.
Returns
One of the following values:
  • the assigned animation ID of the added core animated morph
  • -1 if an error happend

◆ addCoreAnimation()

int CalCoreModel::addCoreAnimation ( CalCoreAnimation * pCoreAnimation)

Adds a core animation.

This function adds a core animation to the core model instance.

Parameters
pCoreAnimationA pointer to the core animation that should be added.
Returns
  • the assigned animation ID of the added core animation

◆ addCoreMaterial()

int CalCoreModel::addCoreMaterial ( CalCoreMaterial * pCoreMaterial)

Adds a core material.

This function adds a core material to the core model instance.

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

◆ addCoreMesh()

int CalCoreModel::addCoreMesh ( CalCoreMesh * pCoreMesh)

Adds a core mesh.

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

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

◆ addMaterialName()

bool CalCoreModel::addMaterialName ( const std::string & strMaterialName,
int coreMaterialId )

Creates or overwrites a string-to-core-material ID mapping.

This function makes a core material ID reference-able by a string name. Note that we don't verify that the ID is valid because the material may be added later. Also, if there is already a helper with this name, it will be overwritten without warning.

Parameters
strMaterialNameThe string that will be associated with the ID.
coreMaterialIdThe core ID number of the material to be referenced by the string.

◆ addMeshName()

bool CalCoreModel::addMeshName ( const std::string & strMeshName,
int coreMeshId )

Creates or overwrites a string-to-core-mesh ID mapping.

This function makes a core mesh ID reference-able by a string name. Note that we don't verify that the ID is valid because the mesh may be added later. Also, if there is already a helper with this name, it will be overwritten without warning.

Parameters
strMeshNameThe string that will be associated with the ID.
coreMeshIdThe core ID number of the mesh to be referenced by the string.

◆ createCoreMaterialThread()

bool CalCoreModel::createCoreMaterialThread ( int coreMaterialThreadId)

Creates a core material thread.

This function creates a new core material thread with the given ID.

Parameters
coreMaterialThreadIdThe ID of the core material thread that should be created.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ getBoneId()

int CalCoreModel::getBoneId ( const std::string & strBoneName) const

Retrieves the ID of the bone referenced by a string.

This function returns a bone ID

Parameters
strBoneNameA string that is associated with a bone ID number.
Returns
Returns:
  • -1 if there is no bone ID associated with the input string
  • the ID number of the bone asssociated with the input string

◆ getCoreAnimatedMorph()

CalCoreAnimatedMorph * CalCoreModel::getCoreAnimatedMorph ( int coreAnimatedMorphId)

Provides access to a core morph animation.

This function returns the core morph animation with the given ID.

Parameters
coreAnimatedMorphIdThe ID of the core morph animation that should be returned.
Returns
One of the following values:
  • a pointer to the core morph animation
  • 0 if an error happend

◆ getCoreAnimatedMorphId()

int CalCoreModel::getCoreAnimatedMorphId ( const std::string & name) const

Retrieves the ID of the animated morph referenced by a string.

This function returns an animated morph ID

Parameters
nameA string that is associated with an anim morph ID number.
Returns
Returns:
  • -1 if there is no anim morph ID associated with the input string
  • the ID number of the anim morph asssociated with the input string

◆ getCoreAnimation() [1/2]

CalCoreAnimation * CalCoreModel::getCoreAnimation ( int coreAnimationId)

Provides access to a core animation.

This function returns the core animation with the given ID.

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

◆ getCoreAnimation() [2/2]

const CalCoreAnimation * CalCoreModel::getCoreAnimation ( int coreAnimationId) const

Provides access to a core animation.

This function returns the core animation with the given ID.

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

◆ getCoreAnimationCount()

int CalCoreModel::getCoreAnimationCount ( ) const

Returns the number of core animations.

This function returns the number of core animations in the core model instance.

Returns
The number of core animations.

◆ getCoreAnimationId()

int CalCoreModel::getCoreAnimationId ( const std::string & strAnimationName) const

Retrieves the ID of the animation referenced by a string.

This function returns an animation ID

Parameters
strAnimationNameA string that is associated with an anim ID number.
Returns
Returns:
  • -1 if there is no anim ID associated with the input string
  • the ID number of the anim asssociated with the input string

◆ getCoreMaterial() [1/2]

CalCoreMaterial * CalCoreModel::getCoreMaterial ( int coreMaterialId)

Provides access to a core material.

This function returns the core material with the given ID.

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

◆ getCoreMaterial() [2/2]

const CalCoreMaterial * CalCoreModel::getCoreMaterial ( int coreMaterialId) const

Provides access to a core material.

This function returns the core material with the given ID.

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

◆ getCoreMaterialCount()

int CalCoreModel::getCoreMaterialCount ( ) const

Returns the number of core materials.

This function returns the number of core materials in the core model instance.

Returns
The number of core materials.

◆ getCoreMaterialId() [1/2]

int CalCoreModel::getCoreMaterialId ( const std::string & strMaterialName) const

Retrieves the ID of the core material referenced by a string.

This function returns a core material ID

Parameters
strMaterialNameA string that is associated with a core material ID number.
Returns
Returns:
  • -1 if there is no core material ID associated with the input string
  • the core ID number of the material associated with the input string

◆ getCoreMaterialId() [2/2]

int CalCoreModel::getCoreMaterialId ( int coreMaterialThreadId,
int coreMaterialSetId ) const

Returns a specified core material ID.

This function returns the core material ID for a specified core material thread / core material set pair.

Parameters
coreMaterialThreadIdThe ID of the core material thread.
coreMaterialSetIdThe ID of the core material set.
Returns
One of the following values:
  • the ID of the core material
  • -1 if an error happened

◆ getCoreMesh() [1/2]

CalCoreMesh * CalCoreModel::getCoreMesh ( int coreMeshId)

Provides access to a core mesh.

This function returns the core mesh with the given ID.

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

◆ getCoreMesh() [2/2]

const CalCoreMesh * CalCoreModel::getCoreMesh ( int coreMeshId) const

Provides access to a core mesh.

This function returns the core mesh with the given ID.

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

◆ getCoreMeshCount()

int CalCoreModel::getCoreMeshCount ( ) const

Returns the number of core meshes.

This function returns the number of core meshes in the core model instance.

Returns
The number of core meshes.

◆ getCoreMeshId()

int CalCoreModel::getCoreMeshId ( const std::string & strMeshName) const

Retrieves the ID of the core mesh referenced by a string.

This function returns a core mesh ID

Parameters
strMeshNameA string that is associated with a core mesh ID number.
Returns
Returns:
  • -1 if there is no core mesh ID associated with the input string
  • the core ID number of the mesh asssociated with the input string

◆ getCoreSkeleton() [1/2]

CalCoreSkeleton * CalCoreModel::getCoreSkeleton ( )

Provides access to the core skeleton.

This function returns the core skeleton.

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

◆ getCoreSkeleton() [2/2]

const CalCoreSkeleton * CalCoreModel::getCoreSkeleton ( ) const

Provides access to the core skeleton.

This function returns the core skeleton.

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

◆ getName()

const std::string & CalCoreModel::getName ( ) const

Returns the name.

This function returns the name of the core model instance.

Returns
The name as string.

◆ getUserData() [1/2]

Cal::UserData CalCoreModel::getUserData ( )

Provides access to the user data.

This function returns the user data stored in the core model instance.

Returns
The user data stored in the core model instance.

◆ getUserData() [2/2]

const Cal::UserData CalCoreModel::getUserData ( ) const

Provides access to the user data.

This function returns the user data stored in the core model instance.

Returns
The user data stored in the core model instance.

◆ loadCoreAnimatedMorph()

int CalCoreModel::loadCoreAnimatedMorph ( const std::string & strFilename)

Loads a core animatedMorph.

This function loads a core animatedMorph from a file.

Parameters
strFilenameThe file from which the core animatedMorph should be loaded from.
Returns
One of the following values:
  • the assigned ID of the loaded core animation
  • -1 if an error happened

◆ loadCoreAnimation() [1/3]

int CalCoreModel::loadCoreAnimation ( const std::string & strFilename)

Loads a core animation.

This function loads a core animation from a file.

Parameters
strFilenameThe file from which the core animation should be loaded from.
Returns
One of the following values:
  • the assigned ID of the loaded core animation
  • -1 if an error happened

◆ loadCoreAnimation() [2/3]

int CalCoreModel::loadCoreAnimation ( const std::string & strFilename,
const std::string & strAnimationName )

Loads a core animation and bind it to a name.

This function loads a core animation from a file. It is equivalent to calling addAnimName(strAnimationName, loadCoreAnimation(strFilename)). If strAnimationName is already associated to a coreAnimationId because of a previous call to addAnimName, the same coreAnimationId will be used.

Parameters
strFilenameThe file from which the core animation should be loaded from.
strAnimationNameA string that is associated with an anim ID number.
Returns
One of the following values:
  • the assigned ID of the loaded core animation
  • -1 if an error happened

◆ loadCoreAnimation() [3/3]

int CalCoreModel::loadCoreAnimation ( void * buffer)

Loads a core animation.

This function loads a core animation from a buffer.

Parameters
bufferThe buffer from which the core animation should be loaded.
Returns
One of the following values:
  • the assigned ID of the loaded core animation
  • -1 if an error happened

◆ loadCoreMaterial() [1/3]

int CalCoreModel::loadCoreMaterial ( const std::string & strFilename)

Loads a core material.

This function loads a core material from a file.

Parameters
strFilenameThe file from which the core material should be loaded from.
Returns
One of the following values:
  • the assigned ID of the loaded core material
  • -1 if an error happened

◆ loadCoreMaterial() [2/3]

int CalCoreModel::loadCoreMaterial ( const std::string & strFilename,
const std::string & strMaterialName )

Loads a core material and bind it to a name.

This function loads a core material from a file. It is equivalent to calling addMaterialName(strMaterialName, loadCoreMaterial(strFilename)). If strMaterialName is already associated to a coreMaterialId because of a previous call to addMaterialName, the same coreMaterialId will be used.

Parameters
strFilenameThe file from which the core material should be loaded from.
strMaterialNameA string that is associated with an anim ID number.
Returns
One of the following values:
  • the assigned ID of the loaded core material
  • -1 if an error happened

◆ loadCoreMaterial() [3/3]

int CalCoreModel::loadCoreMaterial ( void * buffer)

Loads a core material.

This function loads a core material from a buffer.

Parameters
bufferThe buffer from which the core material should be loaded.
Returns
One of the following values:
  • the assigned ID of the loaded core material
  • -1 if an error happened

◆ loadCoreMesh() [1/3]

int CalCoreModel::loadCoreMesh ( const std::string & strFilename)

Loads a core mesh.

This function loads a core mesh from a file.

Parameters
strFilenameThe file from which the core mesh should be loaded from.
Returns
One of the following values:
  • the assigned ID of the loaded core mesh
  • -1 if an error happened

◆ loadCoreMesh() [2/3]

int CalCoreModel::loadCoreMesh ( const std::string & strFilename,
const std::string & strMeshName )

Loads a core mesh and bind it to a name.

This function loads a core mesh from a file. It is equivalent to calling addMeshName(strMeshName, loadCoreMesh(strFilename)). If strMeshName is already associated to a coreMeshId because of a previous call to addMeshName, the same coreMeshId will be used.

Parameters
strFilenameThe file from which the core mesh should be loaded from.
strMeshNameA string that is associated with an anim ID number.
Returns
One of the following values:
  • the assigned ID of the loaded core mesh
  • -1 if an error happened

◆ loadCoreMesh() [3/3]

int CalCoreModel::loadCoreMesh ( void * buffer)

Loads a core mesh.

This function loads a core mesh from a buffer.

Parameters
bufferThe buffer from which the core mesh should be loaded.
Returns
One of the following values:
  • the assigned ID of the loaded core mesh
  • -1 if an error happened

◆ loadCoreSkeleton() [1/2]

bool CalCoreModel::loadCoreSkeleton ( const std::string & strFilename)

Loads the core skeleton.

This function loads the core skeleton from a file.

Parameters
strFilenameThe file from which the core skeleton should be loaded from.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ loadCoreSkeleton() [2/2]

bool CalCoreModel::loadCoreSkeleton ( void * buffer)

Loads the core skeleton.

This function loads the core skeleton from a buffer.

Parameters
bufferThe buffer from which the core skeleton should be loaded.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ replaceCoreMesh()

void CalCoreModel::replaceCoreMesh ( int coreMeshId,
CalCoreMesh * pCoreMesh )

Replaces a core mesh.

This function replaces a core mesh in the core model instance. - JWWalker

Parameters
coreMeshIdThe ID of the core mesh that should be replaced.
pCoreMeshA pointer to the core mesh that should be added.

◆ saveCoreAnimatedMorph()

bool CalCoreModel::saveCoreAnimatedMorph ( const std::string & strFilename,
int coreAnimatedMorphId ) const

Saves a core animated morph.

This function saves a core animated morph to a file.

Parameters
strFilenameThe file to which the core animated morph should be saved to.
coreAnimatedMorphIdThe ID of the core animated morph that should be saved.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ saveCoreAnimation()

bool CalCoreModel::saveCoreAnimation ( const std::string & strFilename,
int coreAnimationId ) const

Saves a core animation.

This function saves a core animation to a file.

Parameters
strFilenameThe file to which the core animation should be saved to.
coreAnimationIdThe ID of the core animation that should be saved.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ saveCoreMaterial()

bool CalCoreModel::saveCoreMaterial ( const std::string & strFilename,
int coreMaterialId ) const

Saves a core material.

This function saves a core material to a file.

Parameters
strFilenameThe file to which the core material should be saved to.
coreMaterialIdThe ID of the core material that should be saved.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ saveCoreMesh()

bool CalCoreModel::saveCoreMesh ( const std::string & strFilename,
int coreMeshId ) const

Saves a core mesh.

This function saves a core mesh to a file.

Parameters
strFilenameThe file to which the core mesh should be saved to.
coreMeshIdThe ID of the core mesh that should be saved.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ saveCoreSkeleton()

bool CalCoreModel::saveCoreSkeleton ( const std::string & strFilename) const

Saves the core skeleton.

This function saves the core skeleton to a file.

Parameters
strFilenameThe file to which the core skeleton should be saved to.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ scale()

void CalCoreModel::scale ( float factor)

Scale the core model.

This function rescale all data that are in the core model instance

Parameters
factorA float with the scale factor

◆ setCoreMaterialId()

bool CalCoreModel::setCoreMaterialId ( int coreMaterialThreadId,
int coreMaterialSetId,
int coreMaterialId )

Sets a core material ID.

This function sets a core material ID for a core material thread / core material set pair.

Parameters
coreMaterialThreadIdThe ID of the core material thread.
coreMaterialSetIdThe ID of the core maetrial set.
coreMaterialIdThe ID of the core maetrial.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ setCoreSkeleton()

void CalCoreModel::setCoreSkeleton ( CalCoreSkeleton * pCoreSkeleton)

Sets the core skeleton.

This function sets the core skeleton of the core model instance..

Parameters
pCoreSkeletonThe core skeleton that should be set.

◆ setName()

void CalCoreModel::setName ( const char * inName)

Changes the name.

This function sets the name of the core model instance.

Parameters
Thename as string.

◆ setUserData()

void CalCoreModel::setUserData ( Cal::UserData userData)

Stores user data.

This function stores user data in the core model instance.

Parameters
userDataThe user data that should be stored.

◆ unloadCoreAnimatedMorph() [1/2]

int CalCoreModel::unloadCoreAnimatedMorph ( const std::string & name)

Delete the resources used by the named core animated morph.

The name must be associated with a valid core animated morph Id with the function getAnimatedMorphId. The caller must ensure that the corresponding is not referenced anywhere otherwise unpredictable results will occur.

Parameters
nameThe symbolic name of the core animated morph to unload.
Returns
One of the following values:
  • the core ID of the unloaded core animated morph
  • -1 if an error happened

◆ unloadCoreAnimatedMorph() [2/2]

int CalCoreModel::unloadCoreAnimatedMorph ( int coreAnimatedMorphId)

Delete the resources used by a core animated orph.

The caller must ensure that the corresponding is not referenced anywhere otherwise unpredictable results will occur.

Parameters
coreAnimatedMorphIdThe ID of the core animated morph that should be unloaded.
Returns
One of the following values:
  • the core ID of the unloaded core animated morph
  • -1 if an error happened

◆ unloadCoreAnimation() [1/2]

int CalCoreModel::unloadCoreAnimation ( const std::string & name)

Delete the resources used by the named core animation.

The name must be associated with a valid core animation Id with the function getAnimationId. The caller must ensure that the corresponding is not referenced anywhere otherwise unpredictable results will occur.

Parameters
nameThe symbolic name of the core animation to unload.
Returns
One of the following values:
  • the core ID of the unloaded core animation
  • -1 if an error happened

◆ unloadCoreAnimation() [2/2]

int CalCoreModel::unloadCoreAnimation ( int coreAnimationId)

Delete the resources used by a core animation.

The caller must ensure that the corresponding is not referenced anywhere otherwise unpredictable results will occur.

Parameters
coreAnimationIdThe ID of the core animation that should be unloaded.
Returns
One of the following values:
  • the core ID of the unloaded core animation
  • -1 if an error happened

◆ unloadCoreMaterial() [1/2]

int CalCoreModel::unloadCoreMaterial ( const std::string & name)

Delete the resources used by the named core material.

The name must be associated with a valid core material Id with the function getMaterialId. The caller must ensure that the corresponding is not referenced anywhere otherwise unpredictable results will occur.

Parameters
nameThe symbolic name of the core material to unload.
Returns
One of the following values:
  • the core ID of the unloaded core material
  • -1 if an error happened

◆ unloadCoreMaterial() [2/2]

int CalCoreModel::unloadCoreMaterial ( int coreMaterialId)

Delete the resources used by a core material.

The caller must ensure that the corresponding is not referenced anywhere otherwise unpredictable results will occur.

Parameters
coreMaterialIdThe ID of the core material that should be unloaded.
Returns
One of the following values:
  • the core ID of the unloaded core material
  • -1 if an error happened

◆ unloadCoreMesh() [1/2]

int CalCoreModel::unloadCoreMesh ( const std::string & name)

Delete the resources used by the named core mesh.

The name must be associated with a valid core mesh Id with the function getMeshId. The caller must ensure that the corresponding is not referenced anywhere otherwise unpredictable results will occur.

Parameters
nameThe symbolic name of the core mesh to unload.
Returns
One of the following values:
  • the core ID of the unloaded core mesh
  • -1 if an error happened

◆ unloadCoreMesh() [2/2]

int CalCoreModel::unloadCoreMesh ( int coreMeshId)

Delete the resources used by a core mesh.

The caller must ensure that the corresponding is not referenced anywhere otherwise unpredictable results will occur.

Parameters
coreMeshIdThe ID of the core mesh that should be unloaded.
Returns
One of the following values:
  • the core ID of the unloaded core mesh
  • -1 if an error happened

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

Generated by The Cal3D Team with Doxygen 1.10.0