VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
makVrv::DtIndirectModelsContainer Class Reference

class for holding an indirect geometry registrar (which holds the information about how to draw models) and handling the adding/registering the model to the registrar More...

Public Member Functions

virtual ~DtIndirectModelsContainer ()
 destructor More...
 
virtual bool getModelNode (const std::string &modelName, const osg::Node *&modelNode, int &modelId, float minRange=-1, float maxRange=-1, osgDB::Options *options=0)
 Get the model node after reading the file, and the id for a model name(file) and cache it if does not exist. More...
 
virtual bool addModelNodeIfNeeded (const osg::Node *modelNode, int &modelId, const std::string &modelNameSuffix, bool cullFaceEnabled=true, const DtIndirectPolygonOffset &polygonOffset=DtIndirectPolygonOffset(0.0f, 0.0f))
 Add the model node (if not added already), with id as modelId. More...
 
virtual void registerModelWithRegistrar (const osg::Node *modelNode, const std::string &modelName, const DtModelInfo &modelInfo, bool cullFaceEnabled=true, const DtIndirectPolygonOffset &polygonOffset=DtIndirectPolygonOffset(0.0f, 0.0f))
 register a new model with DtIndirectGeometryRegistrar More...
 
virtual
DtIndirectGeometryRegistrar
registrar (void)
 access the registrar More...
 

Protected Types

typedef boost::unordered_map
< std::string, osg::ref_ptr
< const osg::Node > > 
MapMarkerNameToModelNode
 
typedef
tbb::concurrent_unordered_map
< std::string, DtModelInfo
ModelsToModelInfo
 

Protected Member Functions

 DtIndirectModelsContainer (DtDe &de, DtIndirectTextureCollectionPolicyFactory &indirectTextureCollectionPolicyFactory, DtIndirectGeometryRegistrarCreator &indirectGeomRegistrarCreator, DtAggregatedGeometryCreator &aggregatedGeometryCreator, DtIndirectGeometryAggregatorCreator &indirectGeometryAggregatorCreator, DtCoreGlBufferCreator &coreGlBufferCreator)
 protected. only creator can create More...
 
bool checkGeometriesOk (const osg::Node *modelNode, const std::string &modelName)
 whether at least one geometry under modelNode has vertices (and hence can be supported) More...
 

Protected Attributes

DtIndirectTextureCollectionPolicymyTextureCollectionPolicy
 
osg::ref_ptr
< DtIndirectGeometryRegistrar
myIndirectGeometryRegistrar
 
MapMarkerNameToModelNode myMapMarkerNameToModelNode
 
Threading::Mutex myMapMarkerNameToModelNodeMutex
 
ModelsToModelInfo myModelsToModelInfo
 
tbb::atomic< intmyNextModelId
 
DtDemyDe
 

Private Member Functions

 DtIndirectModelsContainer ()
 Default Constructor not implemented. More...
 
 DtIndirectModelsContainer (const DtIndirectModelsContainer &other)
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtIndirectModelsContaineroperator= (const DtIndirectModelsContainer &other)
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Friends

class DtIndirectModelsContainerCreator
 

Detailed Description

class for holding an indirect geometry registrar (which holds the information about how to draw models) and handling the adding/registering the model to the registrar

Member Typedef Documentation

typedef boost::unordered_map<std::string, osg::ref_ptr< const osg::Node > > makVrv::DtIndirectModelsContainer::MapMarkerNameToModelNode
protected
typedef tbb::concurrent_unordered_map<std::string, DtModelInfo> makVrv::DtIndirectModelsContainer::ModelsToModelInfo
protected

Constructor & Destructor Documentation

virtual makVrv::DtIndirectModelsContainer::~DtIndirectModelsContainer ( )
virtual

destructor

makVrv::DtIndirectModelsContainer::DtIndirectModelsContainer ( DtDe de,
DtIndirectTextureCollectionPolicyFactory indirectTextureCollectionPolicyFactory,
DtIndirectGeometryRegistrarCreator indirectGeomRegistrarCreator,
DtAggregatedGeometryCreator aggregatedGeometryCreator,
DtIndirectGeometryAggregatorCreator indirectGeometryAggregatorCreator,
DtCoreGlBufferCreator coreGlBufferCreator 
)
protected

protected. only creator can create

makVrv::DtIndirectModelsContainer::DtIndirectModelsContainer ( )
private

Default Constructor not implemented.

makVrv::DtIndirectModelsContainer::DtIndirectModelsContainer ( const DtIndirectModelsContainer other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

DtIndirectModelsContainer& makVrv::DtIndirectModelsContainer::operator= ( const DtIndirectModelsContainer other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

virtual bool makVrv::DtIndirectModelsContainer::getModelNode ( const std::string &  modelName,
const osg::Node *&  modelNode,
int modelId,
float  minRange = -1,
float  maxRange = -1,
osgDB::Options *  options = 0 
)
virtual

Get the model node after reading the file, and the id for a model name(file) and cache it if does not exist.

if the model name is being read for the first time minRange, maxRange are the additional top level start and end values that will modulate all the lods within the model Return the cached node and model id, if it exists. Will return false if the model file cannot be read (and modelNode and modelId will be 0).

virtual bool makVrv::DtIndirectModelsContainer::addModelNodeIfNeeded ( const osg::Node *  modelNode,
int modelId,
const std::string &  modelNameSuffix,
bool  cullFaceEnabled = true,
const DtIndirectPolygonOffset polygonOffset = DtIndirectPolygonOffset(0.0f, 0.0f) 
)
virtual

Add the model node (if not added already), with id as modelId.

virtual void makVrv::DtIndirectModelsContainer::registerModelWithRegistrar ( const osg::Node *  modelNode,
const std::string &  modelName,
const DtModelInfo modelInfo,
bool  cullFaceEnabled = true,
const DtIndirectPolygonOffset polygonOffset = DtIndirectPolygonOffset(0.0f, 0.0f) 
)
virtual

register a new model with DtIndirectGeometryRegistrar

virtual DtIndirectGeometryRegistrar* makVrv::DtIndirectModelsContainer::registrar ( void  )
virtual

access the registrar

bool makVrv::DtIndirectModelsContainer::checkGeometriesOk ( const osg::Node *  modelNode,
const std::string &  modelName 
)
protected

whether at least one geometry under modelNode has vertices (and hence can be supported)

Friends And Related Function Documentation

friend class DtIndirectModelsContainerCreator
friend

Member Data Documentation

DtIndirectTextureCollectionPolicy* makVrv::DtIndirectModelsContainer::myTextureCollectionPolicy
protected
osg::ref_ptr<DtIndirectGeometryRegistrar> makVrv::DtIndirectModelsContainer::myIndirectGeometryRegistrar
protected
MapMarkerNameToModelNode makVrv::DtIndirectModelsContainer::myMapMarkerNameToModelNode
protected
Threading::Mutex makVrv::DtIndirectModelsContainer::myMapMarkerNameToModelNodeMutex
protected
ModelsToModelInfo makVrv::DtIndirectModelsContainer::myModelsToModelInfo
protected
tbb::atomic<int> makVrv::DtIndirectModelsContainer::myNextModelId
protected
DtDe& makVrv::DtIndirectModelsContainer::myDe
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)