VR-Forces 4.7 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 Member Functions | Protected Attributes
makVrv::DtIntersectorCache Class Reference

the Intersector Cache class. More...

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 p, DtIntersector::DynamicOceanProperties op, double x, double y, double z, DtIntersector::DtIntersections &)
 Retrieve the cache results of a single point intersection test.
virtual void addCachedPointResult (DtIntersector::IntersectProperties p, DtIntersector::DynamicOceanProperties op, double x, double y, double z, const DtIntersector::DtIntersections &)
 Add the results of a single point intersection text.
virtual bool cachedLineResult (DtIntersector::IntersectProperties p, DtIntersector::DynamicOceanProperties op, 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 (DtIntersector::IntersectProperties p, DtIntersector::DynamicOceanProperties op, 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.

Constructor & Destructor Documentation

makVrv::DtIntersectorCache::DtIntersectorCache ( )

CTOR.

virtual makVrv::DtIntersectorCache::~DtIntersectorCache ( )
virtual

DTOR.

Member Function Documentation

void makVrv::DtIntersectorCache::setCacheLimit ( int  )

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

0 or less means that there is no limit

int makVrv::DtIntersectorCache::cacheLimit ( ) const
virtual bool makVrv::DtIntersectorCache::cachedPointResult ( DtIntersector::IntersectProperties  p,
DtIntersector::DynamicOceanProperties  op,
double  x,
double  y,
double  z,
DtIntersector::DtIntersections  
)
virtual

Retrieve the cache results of a single point intersection test.

virtual void makVrv::DtIntersectorCache::addCachedPointResult ( DtIntersector::IntersectProperties  p,
DtIntersector::DynamicOceanProperties  op,
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  p,
DtIntersector::DynamicOceanProperties  op,
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 ( DtIntersector::IntersectProperties  p,
DtIntersector::DynamicOceanProperties  op,
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 )
protectedvirtual
virtual void makVrv::DtIntersectorCache::updateCache ( PointCache::iterator &  )
protectedvirtual
virtual void makVrv::DtIntersectorCache::removeFromCache ( )
protectedvirtual

Removes least used item from cache.

Member Data Documentation

PointCache makVrv::DtIntersectorCache::myPointCache
protected
CacheEntries makVrv::DtIntersectorCache::myCacheEntries
protected
unsigned int makVrv::DtIntersectorCache::myCacheLimit
protected
unsigned int makVrv::DtIntersectorCache::myTotalCacheSize
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)