![]() |
VR-Forces 4.0.4 Class Documentation
|
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, 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, KeyVector > | CacheEntries |
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 |
the Intersector Cache class.
Use to store intersection and intersection results. Can only be used to cache intersection results (line or point)
typedef std::pair<DtIntersector::DtIntersections, int> makVrv::DtIntersectorCache::PointInformation [protected] |
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] |
| virtual makVrv::DtIntersectorCache::~DtIntersectorCache | ( | ) | [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 bool makVrv::DtIntersectorCache::cachedPointResult | ( | DtIntersector::IntersectProperties | , |
| double | x, | ||
| double | y, | ||
| double | z, | ||
| DtIntersector::DtIntersections & | |||
| ) | [virtual] |
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.
PointCache makVrv::DtIntersectorCache::myPointCache [protected] |
unsigned int makVrv::DtIntersectorCache::myCacheLimit [protected] |
unsigned int makVrv::DtIntersectorCache::myTotalCacheSize [protected] |