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

The DtCachedIntersectorsContainer class contains instances of cached intersectors of different model sets.

Public Member Functions

virtual ~DtCachedIntersectorsContainer ()
 
virtual DtCachedIntersectorfindIntersector (DtModelSetId modelSet)
 
virtual void registerModelSet (DtModelSetId modelSet)
 
virtual bool modelSetRegistered (DtModelSetId modelSet) const
 
virtual void setShareIntersectionResults (bool)
 
virtual bool shareIntersectionResults () const
 
virtual void setCacheIsPermanent (bool)
 
virtual bool cacheIsPermanent () const
 
virtual void setCacheLimit (int)
 
virtual int cacheLimit () const
 
virtual void setCacheClearTime (double)
 
virtual double cacheClearTime () const
 

Public Attributes

friend DtCachedIntersectorsContainerCreator
 

Protected Member Functions

virtual void onPostTick ()
 
 DtCachedIntersectorsContainer (DtDe &de)
 

Protected Attributes

DtDemyDe
 
std::unordered_map
< DtModelSetId,
DtCachedIntersector * > 
myIntersectors
 
bool myCacheIsPermanent
 
double myClearTime
 
double myLastClearTime
 
int myCacheLimit
 
DtIntersectorCachemyCache
 

Constructor & Destructor Documentation

virtual makVrv::DtCachedIntersectorsContainer::~DtCachedIntersectorsContainer ( )
virtual
makVrv::DtCachedIntersectorsContainer::DtCachedIntersectorsContainer ( DtDe de)
protected

Member Function Documentation

virtual DtCachedIntersector* makVrv::DtCachedIntersectorsContainer::findIntersector ( DtModelSetId  modelSet)
virtual

Get a intersector for a particular model set.

virtual void makVrv::DtCachedIntersectorsContainer::registerModelSet ( DtModelSetId  modelSet)
virtual

Register a model set and create an unique intersector for it. If the model set is already registered, does nothing. This method is not thread safe.

virtual bool makVrv::DtCachedIntersectorsContainer::modelSetRegistered ( DtModelSetId  modelSet) const
virtual

Is a model set registered? (and hence an intersector exists for it>)

virtual void makVrv::DtCachedIntersectorsContainer::setShareIntersectionResults ( bool  )
virtual

Set to have results shared or specific for model set. If shared will use a pointer allocated and managed by this class. If by specific model set, each model set will have it's own cache. The default is to share.

virtual bool makVrv::DtCachedIntersectorsContainer::shareIntersectionResults ( ) const
virtual
virtual void makVrv::DtCachedIntersectorsContainer::setCacheIsPermanent ( bool  )
virtual

Sets whether or not cache is permanent. If it is, can optionally set the size of the cache (default is 1000 points). If not permanent, then the time to clear out can be set (default is every tick). Enter time in number of milliseconds.

virtual bool makVrv::DtCachedIntersectorsContainer::cacheIsPermanent ( ) const
virtual

Returns whether or not cache is permenant.

virtual void makVrv::DtCachedIntersectorsContainer::setCacheLimit ( int  )
virtual

Sets the limit on the number of items that can be in the cache.

virtual int makVrv::DtCachedIntersectorsContainer::cacheLimit ( ) const
virtual

Returns the limit on the cache.

virtual void makVrv::DtCachedIntersectorsContainer::setCacheClearTime ( double  )
virtual

Sets the time (in milliseconds) to clear out the cache. Default is to clear each tick.

virtual double makVrv::DtCachedIntersectorsContainer::cacheClearTime ( ) const
virtual

Returns the cache clear time.

virtual void makVrv::DtCachedIntersectorsContainer::onPostTick ( )
protectedvirtual

Will check to see if cache needs to be cleared.

Member Data Documentation

friend makVrv::DtCachedIntersectorsContainer::DtCachedIntersectorsContainerCreator
DtDe& makVrv::DtCachedIntersectorsContainer::myDe
protected
std::unordered_map<DtModelSetId, DtCachedIntersector*> makVrv::DtCachedIntersectorsContainer::myIntersectors
protected
bool makVrv::DtCachedIntersectorsContainer::myCacheIsPermanent
protected
double makVrv::DtCachedIntersectorsContainer::myClearTime
protected
double makVrv::DtCachedIntersectorsContainer::myLastClearTime
protected
int makVrv::DtCachedIntersectorsContainer::myCacheLimit
protected
DtIntersectorCache* makVrv::DtCachedIntersectorsContainer::myCache
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)