Added Intersector::get/setEpsilon(double) to allow users to control what epsilon is used by the LineSegmentIntersector when doing testing of itersections with bounding boxes

This commit is contained in:
Robert Osfield
2013-07-31 13:11:49 +00:00
parent 9c9939e5d4
commit 364e2765e7
2 changed files with 21 additions and 14 deletions

View File

@@ -84,11 +84,18 @@ class Intersector : public osg::Referenced
inline bool reachedLimit() { return _intersectionLimit == LIMIT_ONE && containsIntersections(); }
protected:
/** Set Epsilon value, where supported is used in numerical comparisons to workaround number precisions issues.*/
inline void setEpsilon(double epsilon) { _epsilon = epsilon; }
CoordinateFrame _coordinateFrame;
/** Get Epsilon value.*/
inline double getEpsilon() const { return _epsilon; }
protected:
CoordinateFrame _coordinateFrame;
IntersectionLimit _intersectionLimit;
unsigned int _disabledCount;
unsigned int _disabledCount;
double _epsilon;
};