dtAnim::Cal3DLoader Class Reference

Loads a animation definition file and returns a valid CalModel. More...

#include <cal3dloader.h>

List of all members.

Public Member Functions

 Cal3DLoader ()
bool Load (const std::string &filename, Cal3DModelData *&data_in)
 Load an animated entity definition file and return the Cal3DModelWrapper.
void PurgeAllCaches ()
 empty all containers of CalCoreModels and the stored textures

Protected Member Functions

virtual ~Cal3DLoader ()


Detailed Description

Loads a animation definition file and returns a valid CalModel.

Caches the CalCoreModel defined by the file to make it faster to create additional instances of CalModels. If you call Load() with the same filename twice, it actually only loads once.


Constructor & Destructor Documentation

dtAnim::Cal3DLoader::Cal3DLoader (  ) 

dtAnim::Cal3DLoader::~Cal3DLoader (  )  [protected, virtual]


Member Function Documentation

bool dtAnim::Cal3DLoader::Load ( const std::string &  filename,
Cal3DModelData *&  data_in 
)

Load an animated entity definition file and return the Cal3DModelWrapper.

Will use the Delta3D search paths to find the supplied filename.

Will create a new Cal3DModelWrapper, but you're responsible for deleting it.

Note:
The animations are named with their filenames by default, or by an optional name attribute in the .xml file.
Returns:
A fully defined CalModel wrapped by a Cal3DModelWrapper. RefPtr could be not valid (wrapper->valid()==false) if the file didn't load correctly.
See also:
SetDataFilePathList()
Exceptions:
SAXParseException If the file wasn't formatted correctly

void dtAnim::Cal3DLoader::PurgeAllCaches (  ) 

empty all containers of CalCoreModels and the stored textures

Use if you want to completely start over with no history of previous animated entities that have been created.

This will allow you to reload files for a second time.

Note:
: currently this will remove reference to all created osg Textures as well, which might cause the texture to be deleted.


http://www.delta3d.org
2.0.0 generated 14 Feb 2008