14#ifndef OSGUTIL_POLYTOPEINTERSECTOR
15#define OSGUTIL_POLYTOPEINTERSECTOR 1
113#ifdef OSG_USE_DEPRECATED_API
115 DimZero = POINT_PRIMITIVES,
116 DimOne = LINE_PRIMITIVES,
117 DimTwo = TRIANGLE_PRIMITIVES,
118 AllDims = ALL_PRIMITIVES
122 inline void setDimensionMask(
unsigned int mask) { setPrimitiveMask(mask); }
125 inline unsigned int getDimensionMask()
const {
return getPrimitiveMask(); }
std::vector< Node * > NodePath
A vector of Nodes pointers which is used to describe the path from a root node to a descendant.
Definition Node:47
The osgUtil library provides general purpose utility classes such as update, cull and draw traverses,...
Definition NodeVisitor:25
Pure virtual base class for drawable geometry.
Definition Drawable:89
Base class for all internal nodes in the scene graph.
Definition Node:72
A plane class.
Definition Plane:34
Vec3d Vec3_type
Definition Plane:46
A Polytope class for representing convex clipping volumes made up of a set of planes.
Definition Polytope:26
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
CoordinateFrame
Definition IntersectionVisitor:38
Intersector(CoordinateFrame cf=MODEL, IntersectionLimit il=NO_LIMIT)
Definition IntersectionVisitor:53
IntersectionVisitor is used to testing for intersections with the scene, traversing the scene using g...
Definition IntersectionVisitor:152
osg::Plane _referencePlane
plane to use for sorting intersections
Definition PolytopeIntersector:149
@ TRIANGLE_PRIMITIVES
check for lines
Definition PolytopeIntersector:94
@ LINE_PRIMITIVES
check for points
Definition PolytopeIntersector:93
@ POINT_PRIMITIVES
Definition PolytopeIntersector:92
@ ALL_PRIMITIVES
check for triangles and other primitives like quad, polygons that can be decomposed into triangles
Definition PolytopeIntersector:95
PolytopeIntersector(CoordinateFrame cf, double xMin, double yMin, double xMax, double yMax)
Convenience constructor for supporting picking in WINDOW, or PROJECTION coordinates In WINDOW coordin...
virtual bool enter(const osg::Node &node)
std::set< Intersection > Intersections
Definition PolytopeIntersector:81
void setPrimitiveMask(unsigned int mask)
Set which Primitives should be tested for intersections.
Definition PolytopeIntersector:99
PolytopeIntersector(const osg::Polytope &polytope)
Construct a PolytopeIntersector using specified polytope in MODEL coordinates.
unsigned int _primitiveMask
mask which dimensions should be checked
Definition PolytopeIntersector:148
osg::Plane::Vec3_type Vec3_type
Definition PolytopeIntersector:47
void setReferencePlane(const osg::Plane &plane)
set the plane used to sort the intersections.
Definition PolytopeIntersector:109
unsigned int getPrimitiveMask() const
Get which Primitives should be tested for intersections.
Definition PolytopeIntersector:102
const osg::Polytope & getPolytope() const
Get the const Polytope used by the intersector.
Definition PolytopeIntersector:44
Intersection getFirstIntersection()
Definition PolytopeIntersector:87
Intersections _intersections
Definition PolytopeIntersector:151
const osg::Plane & getReferencePlane() const
Definition PolytopeIntersector:111
PolytopeIntersector * _parent
Definition PolytopeIntersector:144
osg::Polytope _polytope
Definition PolytopeIntersector:146
virtual bool containsIntersections()
Definition PolytopeIntersector:140
void insertIntersection(const Intersection &intersection)
Definition PolytopeIntersector:83
PolytopeIntersector(CoordinateFrame cf, const osg::Polytope &polytope)
Construct a PolytopeIntersector using specified polytope in specified coordinate frame.
virtual void intersect(osgUtil::IntersectionVisitor &iv, osg::Drawable *drawable)
osg::Polytope & getPolytope()
Get the Polytope used by the intersector.
Definition PolytopeIntersector:41
Intersections & getIntersections()
Definition PolytopeIntersector:85
virtual Intersector * clone(osgUtil::IntersectionVisitor &iv)
Definition PolytopeIntersector:50
Vec3_type localIntersectionPoint
center of all intersection points
Definition PolytopeIntersector:75
osg::ref_ptr< osg::RefMatrix > matrix
Definition PolytopeIntersector:74
unsigned int numIntersectionPoints
Definition PolytopeIntersector:76
@ MaxNumIntesectionPoints
Definition PolytopeIntersector:68
unsigned int primitiveIndex
primitive index
Definition PolytopeIntersector:78
double distance
distance from reference plane
Definition PolytopeIntersector:70
Vec3_type intersectionPoints[MaxNumIntesectionPoints]
Definition PolytopeIntersector:77
osg::NodePath nodePath
Definition PolytopeIntersector:72
double maxDistance
maximum distance of intersection points from reference plane
Definition PolytopeIntersector:71
osg::ref_ptr< osg::Drawable > drawable
Definition PolytopeIntersector:73
Intersection()
Definition PolytopeIntersector:51
#define OSGUTIL_EXPORT
Definition Export:40