14 #ifndef OSGUTIL_POLYTOPEINTERSECTOR
15 #define OSGUTIL_POLYTOPEINTERSECTOR 1
17 #include <osgUtil/IntersectionVisitor>
32 AllDims = (DimZero | DimOne | DimTwo)
54 numIntersectionPoints(0),
59 if (distance < rhs.
distance)
return true;
60 if (rhs.
distance < distance)
return false;
63 if (nodePath < rhs.
nodePath)
return true;
64 if (rhs.
nodePath < nodePath )
return false;
68 enum { MaxNumIntesectionPoints=6 };
77 Vec3_type intersectionPoints[MaxNumIntesectionPoints];
85 inline Intersections&
getIntersections() {
return _parent ? _parent->_intersections : _intersections; }
95 inline void setDimensionMask(
unsigned int dimensionMask) { _dimensionMask = dimensionMask; }
110 virtual bool enter(
const osg::Node& node);
112 virtual void leave();
116 virtual void reset();
unsigned int _dimensionMask
mask which dimensions should be checked
virtual bool containsIntersections()
osg::Plane _referencePlane
plane to use for sorting intersections
T * clone(const T *t, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
unsigned int numIntersectionPoints
osg::Plane::Vec3_type Vec3_type
void setDimensionMask(unsigned int dimensionMask)
void insertIntersection(const Intersection &intersection)
Intersections _intersections
std::set< Intersection > Intersections
Vec3_type localIntersectionPoint
center of all intersection points
osg::ref_ptr< osg::RefMatrix > matrix
A plane class. It can be used to represent an infinite plane.
Intersection getFirstIntersection()
PolytopeIntersector * _parent
double maxDistance
maximum distance of intersection points from reference plane
const osg::Plane & getReferencePlane() const
double distance
distance from reference plane
unsigned int getDimensionMask() const
Intersections & getIntersections()
unsigned int primitiveIndex
primitive index
osg::ref_ptr< osg::Drawable > drawable
std::vector< Node * > NodePath
Shader generator framework.
void setReferencePlane(const osg::Plane &plane)