VR-Forces 4.6.1 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 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. More...

Public Member Functions

 DtModelInfo ()
 CTOR.
virtual ~DtModelInfo ()
 DTOR.
virtual void setNameAndId (const std::string &modelName, int id)
 Set up the mapping.
virtual const std::string & modelName (void) const
 Get the model name.
virtual int id (void) const
 Get the model id.
virtual const DtLodIdlodId (int lodId) const
 Get the lod with id equaling lodId.
virtual bool insertLodEntryAndLod (int lodId)
 Insert an lod (implicitly an id) This method is thread safe.
virtual int currNextLodId (void) const
 For internal use/debugging.
virtual void printInfo (void) const
virtual int numOfEntries (void) const

Protected Types

typedef
tbb::concurrent_unordered_map
< int, DtLodId
LodIdToDtLodId

Protected Attributes

std::string myModelName
int myId
tbb::atomic< intmyNextLodId
 The calls to insertLodEntryAndLod can come from different threads and in any order.
LodIdToDtLodId myLodIdToDtLodId

Detailed Description

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

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
virtual int makVrv::DtModelInfo::numOfEntries ( void  ) const
virtual

Member Data Documentation

std::string makVrv::DtModelInfo::myModelName
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

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)