![]() |
VR-Forces 5.0.2 Developer's Guide
|
the Intersector Cache class. Use to store intersection and intersection results. Can only be used to cache intersection results (line or point)
Public Member Functions | |
| DtIntersectorCache () | |
| virtual | ~DtIntersectorCache () |
| void | setCacheLimit (int) |
| int | cacheLimit () const |
| virtual bool | cachedPointResult (DtIntersector::IntersectProperties p, DtIntersector::DynamicOceanProperties op, double x, double y, double z, DtIntersector::DtIntersections &) |
| virtual void | addCachedPointResult (DtIntersector::IntersectProperties p, DtIntersector::DynamicOceanProperties op, double x, double y, double z, const DtIntersector::DtIntersections &) |
| 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 &) |
| 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 &) |
| virtual void | clear () |
Protected Types | |
| typedef std::pair < DtIntersector::DtIntersections, int > | PointInformation |
| typedef boost::unordered_map < std::size_t, PointInformation > | PointCache |
| typedef std::vector< std::size_t > | KeyVector |
| typedef std::map< int, KeyVector > | CacheEntries |
Protected Member Functions | |
| virtual void | addToCache (const DtIntersectorCacheKey &) |
| virtual void | updateCache (PointCache::iterator &) |
| virtual void | removeFromCache () |
Protected Attributes | |
| PointCache | myPointCache |
| CacheEntries | myCacheEntries |
| unsigned int | myCacheLimit |
| unsigned int | myTotalCacheSize |
|
protected |
In a single point cache, there is only one map that contains all possible end points.
|
protected |
|
protected |
Use the ordered map to ensure least used gets taken away first.
|
protected |
| makVrv::DtIntersectorCache::DtIntersectorCache | ( | ) |
CTOR.
|
virtual |
DTOR.
| 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 |
Retrieve the cache results of a single point intersection test.
|
virtual |
Add the results of a single point intersection text.
|
virtual |
Retrieve cached results of a line intersection test.
|
virtual |
Add results of a line intersection test.
|
virtual |
Clear out all results.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Removes least used item from cache.
|
protected |
|
protected |