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, Textures2D > CoreMaterialId2Textures2D
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.
Textures2D * getTextures2D (const std::string &strFilename)
Textures2D * getTextures2D (int materialId)
 Returns the texture associated to a material.
void setMeshName2Filename (const Name2Filename &meshName2Filename)
 Sets the mesh name to mesh filename map.
const Name2Filename & getMeshName2Filename (void)
 Returns the mesh name to file mesh name map.
bool SubUsingMeshId (int coreMeshId)
bool AddUsingMeshId (int coreMeshId)
std::vector< MeshDescription > & getCommonMeshes ()
const std::map< std::string,
MeshDescription > & 
getMeshes () const
SlotDescription * getSlotFromTypeAndName (const std::string &slotType, const std::string &slotName)
void addIncompatibility (const std::string &mesh1, const std::string &mesh2)
 Adds an incompatibility between two meshes.
bool isIncompatible (const std::string &mesh1, const std::string &mesh2)
 Tells if two meshes are incompatible Two incompatibles meshes mean they cannot be shown together.
const std::map< std::string,
SlotBank > & 
getSlots () const

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< MeshDescription > _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
std::map< std::string, std::vector<
std::string > > 
_incompatiblityEntries
bool _collisionDefault
int _version
osg::NotifySeverity _notify

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::map<int, Textures2D > osgCal::CoreModel::CoreMaterialId2Textures2D
 

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

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

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

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


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

void osgCal::CoreModel::addIncompatibility (  const std::string &  mesh1,
const std::string &  mesh2
) 
 

Adds an incompatibility between two meshes.

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

void osgCal::CoreModel::garbageCollect (  void   ) 
 

Cleans and releases dead objects.

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

Returns the cal3d core model associated with osgCal CoreModel.

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

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

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

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

Returns the mesh name to file mesh name map.

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

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

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

Returns the texture associated to a material.

Parameters:
materialId the Id of the material

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

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

bool osgCal::CoreModel::isIncompatible (  const std::string &  mesh1,
const std::string &  mesh2
) 
 

Tells if two meshes are incompatible Two incompatibles meshes mean they cannot be shown together.

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

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

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

Sets the mesh name to mesh filename map.

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

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


Friends And Related Function Documentation

friend class ReaderWriterXFG [friend]
 


Member Data Documentation

CalCoreModel osgCal::CoreModel::_calCoreModel [protected]
 

Cal3d core model.

bool osgCal::CoreModel::_collisionDefault [protected]
 

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

bool osgCal::CoreModel::_configurable
 

CoreMaterialId2Textures2D osgCal::CoreModel::_coreMaterialId2Textures [protected]
 

Material Id to associated texture map.

std::map<std::string, std::vector<std::string> > osgCal::CoreModel::_incompatiblityEntries [protected]
 

std::map<std::string,LayerDescription> osgCal::CoreModel::_layers
 

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

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

Name2Filename osgCal::CoreModel::_meshName2Filename [protected]
 

Mesh name to mesh filename map.

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

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

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

std::map<std::string,ParameterDescription> osgCal::CoreModel::_parameters
 

std::string osgCal::CoreModel::_path
 

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

int osgCal::CoreModel::_version [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Feb 9 23:43:05 2006 for osgCal by  doxygen 1.4.6