osgCal::CoreModel Class Reference

Core Model class that creates a templated core object. In order to create an animated model, a cal3d core model has to be created. Given this core model it is possible to instanciate it by creating a model which is in fact the real animated model and object which can be inserted into an osg graph. More...

List of all members.

Public Types

typedef std::vector
< osg::ref_ptr< osg::Texture2D > > 
Textures2D
typedef std::map< int, Textures2DCoreMaterialId2Textures2D
typedef std::map< std::string,
std::string > 
Name2Filename
typedef std::map< std::string,
std::string > 
MeshDescription
typedef std::map< std::string,
SlotDescription
SlotBank

Public Member Functions

 META_Object (osgCal, CoreModel)
 CoreModel ()
 CoreModel (const CoreModel &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
void setCollisionDefault (bool collisionDefault)
bool getCollisionDefault ()
void setVersion (int version)
int getVersion ()
CalCoreModel * getCalCoreModel (void)
 Returns the cal3d core model associated with osgCal CoreModel.
void garbageCollect (void)
 Cleans and releases dead objects.
Textures2DgetTextures2D (const std::string &strFilename)
Textures2DgetTextures2D (int materialId)
 Returns the texture associated to a material.
bool getTexturesNameFromMaterialID (int _coreMaterialId, std::vector< std::string > &_res)
void setMeshName2Filename (const Name2Filename &meshName2Filename)
 Sets the mesh name to mesh filename map.
const Name2FilenamegetMeshName2Filename (void)
 Returns the mesh name to file mesh name map.
bool SubUsingMeshId (int coreMeshId)
bool AddUsingMeshId (int coreMeshId)
const std::vector< std::string > & getCommonMeshes () const
const std::map< std::string,
MeshDescription > & 
getMeshes () const
SlotDescriptiongetSlotFromTypeAndName (const std::string &slotType, const std::string &slotName)
const std::map< std::string,
SlotBank > & 
getSlots () const
const std::string & getFilename () const
void setFilename (const std::string &fname)

Public Attributes

std::map< std::string,
ParameterDescription
_parameters
std::map< std::string,
LayerDescription
_layers
std::map< std::string, SlotBank_slots
std::map< std::string,
MeshDescription
_meshes
std::vector< std::string > _commonMeshes
std::map< std::string, Material_materials
std::map< std::string,
CalVector * > 
_name2Normal
std::string _path
bool _configurable

Protected Member Functions

virtual ~CoreModel ()

Protected Attributes

CalCoreModel _calCoreModel
 Cal3d core model.
CoreMaterialId2Textures2D _coreMaterialId2Textures
 Material Id to associated texture map.
Name2Filename _meshName2Filename
 Mesh name to mesh filename map.
std::map< int, int > _mReferenceCountCoreMeshIds
bool _collisionDefault
int _version
osg::NotifySeverity _notify
std::string _filename

Friends

class ReaderWriterXFG

Classes

struct  LayerDescription
struct  Material
struct  ParameterDescription
struct  SlotDescription


Detailed Description

Core Model class that creates a templated core object. In order to create an animated model, a cal3d core model has to be created. Given this core model it is possible to instanciate it by creating a model which is in fact the real animated model and object which can be inserted into an osg graph.

Member Typedef Documentation

typedef std::vector<osg::ref_ptr<osg::Texture2D> > osgCal::CoreModel::Textures2D

typedef std::map<std::string, std::string> osgCal::CoreModel::Name2Filename

typedef std::map<std::string,std::string> osgCal::CoreModel::MeshDescription

typedef std::map<std::string,SlotDescription> osgCal::CoreModel::SlotBank


Constructor & Destructor Documentation

osgCal::CoreModel::CoreModel (  ) 

osgCal::CoreModel::CoreModel ( const CoreModel ,
const osg::CopyOp &  copyop = osg::CopyOp::SHALLOW_COPY 
)

virtual osgCal::CoreModel::~CoreModel (  )  [protected, virtual]


Member Function Documentation

osgCal::CoreModel::META_Object ( osgCal  ,
CoreModel   
)

void osgCal::CoreModel::setCollisionDefault ( bool  collisionDefault  )  [inline]

bool osgCal::CoreModel::getCollisionDefault (  )  [inline]

void osgCal::CoreModel::setVersion ( int  version  )  [inline]

int osgCal::CoreModel::getVersion (  )  [inline]

CalCoreModel* osgCal::CoreModel::getCalCoreModel ( void   )  [inline]

Returns the cal3d core model associated with osgCal CoreModel.

void osgCal::CoreModel::garbageCollect ( void   ) 

Cleans and releases dead objects.

Textures2D* osgCal::CoreModel::getTextures2D ( const std::string &  strFilename  ) 

Returns a texture2D* given a texture filename

Parameters:
strFilename name of the texture file ( typically an image )
Remarks:
If texture has been already loaded by a previous call of this function, the stored texture2D pointed is returned

Textures2D* osgCal::CoreModel::getTextures2D ( int  materialId  ) 

Returns the texture associated to a material.

Parameters:
materialId the Id of the material

bool osgCal::CoreModel::getTexturesNameFromMaterialID ( int  _coreMaterialId,
std::vector< std::string > &  _res 
)

void osgCal::CoreModel::setMeshName2Filename ( const Name2Filename meshName2Filename  )  [inline]

Sets the mesh name to mesh filename map.

const Name2Filename& osgCal::CoreModel::getMeshName2Filename ( void   )  [inline]

Returns the mesh name to file mesh name map.

bool osgCal::CoreModel::SubUsingMeshId ( int  coreMeshId  ) 

bool osgCal::CoreModel::AddUsingMeshId ( int  coreMeshId  ) 

const std::vector<std::string>& osgCal::CoreModel::getCommonMeshes (  )  const [inline]

const std::map<std::string, MeshDescription>& osgCal::CoreModel::getMeshes (  )  const [inline]

SlotDescription* osgCal::CoreModel::getSlotFromTypeAndName ( const std::string &  slotType,
const std::string &  slotName 
) [inline]

const std::map<std::string,SlotBank>& osgCal::CoreModel::getSlots (  )  const [inline]

const std::string& osgCal::CoreModel::getFilename (  )  const [inline]

void osgCal::CoreModel::setFilename ( const std::string &  fname  )  [inline]


Friends And Related Function Documentation

friend class ReaderWriterXFG [friend]


Member Data Documentation

std::map<std::string,SlotBank> osgCal::CoreModel::_slots

std::vector<std::string> osgCal::CoreModel::_commonMeshes

std::map<std::string, Material> osgCal::CoreModel::_materials

std::map<std::string, CalVector*> osgCal::CoreModel::_name2Normal

CalCoreModel osgCal::CoreModel::_calCoreModel [protected]

Cal3d core model.

Material Id to associated texture map.

Mesh name to mesh filename map.

std::map<int,int> osgCal::CoreModel::_mReferenceCountCoreMeshIds [protected]

int osgCal::CoreModel::_version [protected]

osg::NotifySeverity osgCal::CoreModel::_notify [protected]

std::string osgCal::CoreModel::_filename [protected]


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

Generated on Mon Sep 1 14:21:25 2008 for osgCal by  doxygen 1.5.6