VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Attributes
makVrv::DtModelInfo Class Reference

DtModelInfo is a mapping of a 'model' name to a 'model' id A 'model' can have a number of lods. An 'lod' has an id.

Public Member Functions

 DtModelInfo ()
 
virtual ~DtModelInfo ()
 
virtual void setNameAndId (const std::string &modelName, int id)
 
virtual const std::string & modelName (void) const
 
virtual int id (void) const
 
virtual const DtLodIdlodId (int lodId) const
 
virtual bool insertLodEntryAndLod (int lodId)
 
virtual int currNextLodId (void) const
 
virtual void printInfo (void) const
 
virtual int numOfEntries (void) const
 
virtual void setRange (float startVal, float endVal)
 
float startVal (void) const
 
float endVal (void) const
 
bool rangeValid (void) const
 
virtual void setModelDefName (const std::string &modelDef)
 
virtual const std::string & modelDefName (void) const
 

Protected Types

typedef
tbb::concurrent_unordered_map
< int, DtLodId
LodIdToDtLodId
 

Protected Attributes

std::string myModelName
 
std::string myModelDefName
 
int myId
 
tbb::atomic< intmyNextLodId
 
LodIdToDtLodId myLodIdToDtLodId
 
float myStartVal
 
float myEndVal
 

Member Typedef Documentation

typedef tbb::concurrent_unordered_map<int, DtLodId> makVrv::DtModelInfo::LodIdToDtLodId
protected

Constructor & Destructor Documentation

makVrv::DtModelInfo::DtModelInfo ( )

CTOR.

virtual makVrv::DtModelInfo::~DtModelInfo ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtModelInfo::setNameAndId ( const std::string &  modelName,
int  id 
)
virtual

Set up the mapping.

virtual const std::string& makVrv::DtModelInfo::modelName ( void  ) const
virtual

Get the model name.

virtual int makVrv::DtModelInfo::id ( void  ) const
virtual

Get the model id.

virtual const DtLodId& makVrv::DtModelInfo::lodId ( int  lodId) const
virtual

Get the lod with id equaling lodId.

virtual bool makVrv::DtModelInfo::insertLodEntryAndLod ( int  lodId)
virtual

Insert an lod (implicitly an id) This method is thread safe.

The calls to insertLodEntryAndLod can come from different threads and in any order. The atomic and the map together maintain the mapping of the lod id coming from the call to the actual internal DtLodId whose id is generated using the atomic below. The id of DtLodId and the keys for the map may or may not match. The DtLodIds always start from zero and are monotonically increasing The reason for this is this class is typically used by the Indirect rendering engine/GPU directly, and the bookkeeping needed makes this mandatory

virtual int makVrv::DtModelInfo::currNextLodId ( void  ) const
virtual

For internal use/debugging.

virtual void makVrv::DtModelInfo::printInfo ( void  ) const
virtual

For internal use/debugging.

virtual int makVrv::DtModelInfo::numOfEntries ( void  ) const
virtual

For internal use/debugging.

virtual void makVrv::DtModelInfo::setRange ( float  startVal,
float  endVal 
)
virtual

Top level min/max range for a model This will get combined with the lod(s) within the model like so: final lod range: ( max(startVal, lodStartVal) , min(endVal, lodEndVal) )

float makVrv::DtModelInfo::startVal ( void  ) const

Top level min/max range for a model This will get combined with the lod(s) within the model like so: final lod range: ( max(startVal, lodStartVal) , min(endVal, lodEndVal) )

float makVrv::DtModelInfo::endVal ( void  ) const

Top level min/max range for a model This will get combined with the lod(s) within the model like so: final lod range: ( max(startVal, lodStartVal) , min(endVal, lodEndVal) )

bool makVrv::DtModelInfo::rangeValid ( void  ) const

Top level min/max range for a model This will get combined with the lod(s) within the model like so: final lod range: ( max(startVal, lodStartVal) , min(endVal, lodEndVal) )

virtual void makVrv::DtModelInfo::setModelDefName ( const std::string &  modelDef)
virtual

set/get model def name, if any

virtual const std::string& makVrv::DtModelInfo::modelDefName ( void  ) const
virtual

set/get model def name, if any

Member Data Documentation

std::string makVrv::DtModelInfo::myModelName
protected
std::string makVrv::DtModelInfo::myModelDefName
protected
int makVrv::DtModelInfo::myId
protected
tbb::atomic<int> makVrv::DtModelInfo::myNextLodId
protected

The calls to insertLodEntryAndLod can come from different threads and in any order. The atomic and the map together maintain the mapping of the lod id coming from outside to the actual DtLodId whose id is generated using the atomic below. The id of DtLodId and the keys for the map may or may not match.

LodIdToDtLodId makVrv::DtModelInfo::myLodIdToDtLodId
protected
float makVrv::DtModelInfo::myStartVal
protected
float makVrv::DtModelInfo::myEndVal
protected

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

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)