VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtIntersectorCache Class Reference

the Intersector Cache class. More...

List of all members.

Public Member Functions

 DtIntersectorCache ()
 CTOR.
virtual ~DtIntersectorCache ()
 DTOR.
void setCacheLimit (int)
 Sets the number of items than can be in the cache at any given time.
int cacheLimit () const
virtual bool cachedPointResult (DtIntersector::IntersectProperties, double x, double y, double z, DtIntersector::DtIntersections &)
 Retrieve the cache results of a single point intersection test.
virtual void addCachedPointResult (const DtIntersector::IntersectProperties &, double x, double y, double z, const DtIntersector::DtIntersections &)
 Add the results of a single point intersection text.
virtual bool cachedLineResult (DtIntersector::IntersectProperties, double x, double y, double z, double end_x, double end_y, double end_z, DtIntersector::DtIntersections &)
 Retrieve cached results of a line intersection test.
virtual void addCachedLineResult (const DtIntersector::IntersectProperties &, double x, double y, double z, double end_x, double end_y, double end_z, const DtIntersector::DtIntersections &)
 Add results of a line intersection test.
virtual void clear ()
 Clear out all results.

Protected Types

typedef std::pair
< DtIntersector::DtIntersections,
int > 
PointInformation
 In a single point cache, there is only one map that contains all possible end points.
typedef boost::unordered_map
< std::size_t,
PointInformation
PointCache
typedef std::vector< std::size_t > KeyVector
 Use the ordered map to ensure least used gets taken away first.
typedef std::map< int, KeyVectorCacheEntries

Protected Member Functions

virtual void addToCache (const DtIntersectorCacheKey &)
virtual void updateCache (PointCache::iterator &)
virtual void removeFromCache ()
 Removes least used item from cache.

Protected Attributes

PointCache myPointCache
CacheEntries myCacheEntries
unsigned int myCacheLimit
unsigned int myTotalCacheSize

Detailed Description

the Intersector Cache class.

Use to store intersection and intersection results. Can only be used to cache intersection results (line or point)


Member Typedef Documentation

In a single point cache, there is only one map that contains all possible end points.

typedef boost::unordered_map<std::size_t, PointInformation> makVrv::DtIntersectorCache::PointCache [protected]
typedef std::vector<std::size_t> makVrv::DtIntersectorCache::KeyVector [protected]

Use the ordered map to ensure least used gets taken away first.

typedef std::map<int, KeyVector> makVrv::DtIntersectorCache::CacheEntries [protected]

Constructor & Destructor Documentation

CTOR.

DTOR.


Member Function Documentation

Sets the number of items than can be in the cache at any given time.

0 or less means that there is no limit

Retrieve the cache results of a single point intersection test.

virtual void makVrv::DtIntersectorCache::addCachedPointResult ( const DtIntersector::IntersectProperties ,
double  x,
double  y,
double  z,
const DtIntersector::DtIntersections  
) [virtual]

Add the results of a single point intersection text.

virtual bool makVrv::DtIntersectorCache::cachedLineResult ( DtIntersector::IntersectProperties  ,
double  x,
double  y,
double  z,
double  end_x,
double  end_y,
double  end_z,
DtIntersector::DtIntersections  
) [virtual]

Retrieve cached results of a line intersection test.

virtual void makVrv::DtIntersectorCache::addCachedLineResult ( const DtIntersector::IntersectProperties ,
double  x,
double  y,
double  z,
double  end_x,
double  end_y,
double  end_z,
const DtIntersector::DtIntersections  
) [virtual]

Add results of a line intersection test.

virtual void makVrv::DtIntersectorCache::clear ( ) [virtual]

Clear out all results.

virtual void makVrv::DtIntersectorCache::addToCache ( const DtIntersectorCacheKey ) [protected, virtual]
virtual void makVrv::DtIntersectorCache::updateCache ( PointCache::iterator &  ) [protected, virtual]
virtual void makVrv::DtIntersectorCache::removeFromCache ( ) [protected, virtual]

Removes least used item from cache.


Member Data Documentation

unsigned int makVrv::DtIntersectorCache::myCacheLimit [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)