VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
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

Classes

struct  ModelParams
 

Public Member Functions

virtual ~DtIndirectModelsContainer ()
 
virtual bool getModelNode (const std::string &modelName, const std::string &modelDefName, const osg::Node *&modelNode, int &modelId, const ModelParams &params, osgDB::Options *options)
 
virtual bool hasModelNode (const std::string &modelName) const
 
virtual const osg::Node * findModelNode (const std::string &modelName) const
 
virtual int findModelId (const std::string &modelName) const
 
virtual bool addModelNodeIfNeeded (osg::ref_ptr< const osg::Node > modelNode, int &modelId, const std::string &modelNameSuffix, bool cullFaceEnabled, const DtIndirectPolygonOffset &polygonOffset, bool daylightControlled)
 
virtual
DtIndirectGeometryRegistrar
registrar (void)
 

Public Attributes

friend DtIndirectModelsContainerCreator
 

Protected Types

typedef std::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, const DtIndirectLimitTextureStrategy &limitTextureStrategy)
 
bool checkGeometriesOk (const osg::Node *modelNode, const std::string &modelName) const
 

Protected Attributes

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

Private Member Functions

 DtIndirectModelsContainer ()=delete
 
 DtIndirectModelsContainer (const DtIndirectModelsContainer &other)=delete
 
DtIndirectModelsContaineroperator= (const DtIndirectModelsContainer &other)=delete
 

Member Typedef Documentation

typedef std::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,
const DtIndirectLimitTextureStrategy limitTextureStrategy 
)
protected

protected. only creator can create

makVrv::DtIndirectModelsContainer::DtIndirectModelsContainer ( )
privatedelete

Default Constructor not implemented.

makVrv::DtIndirectModelsContainer::DtIndirectModelsContainer ( const DtIndirectModelsContainer other)
privatedelete

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

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

Assignment Operator Not implemented – Assignment Not Allowed.

virtual bool makVrv::DtIndirectModelsContainer::getModelNode ( const std::string &  modelName,
const std::string &  modelDefName,
const osg::Node *&  modelNode,
int modelId,
const ModelParams params,
osgDB::Options *  options 
)
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::hasModelNode ( const std::string &  modelName) const
virtual

has a model node registered?

virtual const osg::Node* makVrv::DtIndirectModelsContainer::findModelNode ( const std::string &  modelName) const
virtual

find

virtual int makVrv::DtIndirectModelsContainer::findModelId ( const std::string &  modelName) const
virtual

find

virtual bool makVrv::DtIndirectModelsContainer::addModelNodeIfNeeded ( osg::ref_ptr< const osg::Node >  modelNode,
int modelId,
const std::string &  modelNameSuffix,
bool  cullFaceEnabled,
const DtIndirectPolygonOffset polygonOffset,
bool  daylightControlled 
)
virtual

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

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

access the registrar

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

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

Member Data Documentation

friend makVrv::DtIndirectModelsContainer::DtIndirectModelsContainerCreator
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)