8 #ifndef CO_INTERSECTION_H
9 #define CO_INTERSECTION_H
26 #include <osgUtil/LineSegmentIntersector>
29 class IntersectionVisitor;
42 virtual bool canHandleDrawable(osg::Drawable *drawable)
const = 0;
43 virtual void intersect(osgUtil::IntersectionVisitor &iv,
coIntersector &is, osg::Drawable *drawable) = 0;
51 virtual Intersector* clone(osgUtil::IntersectionVisitor& iv)
override;
52 virtual void intersect(osgUtil::IntersectionVisitor& iv, osg::Drawable* drawable)
override;
54 void addHandler(osg::ref_ptr<IntersectionHandler> handler);
56 bool intersectAndClip(osg::Vec3d &s, osg::Vec3d &e,
const osg::BoundingBox &bb);
59 std::vector<osg::ref_ptr<IntersectionHandler>>
_handlers;
70 coIntersector *newIntersector(
const osg::Vec3 &start,
const osg::Vec3 &end);
72 void addHandler(osg::ref_ptr<IntersectionHandler> handler);
74 virtual const char *getClassName()
const;
75 virtual const char *getActionName()
const;
77 void isectAllNodes(
bool isectAll);
78 void forceIsectAllNodes(
bool isectAll);
81 static bool isVerboseIntersection();
84 virtual void intersect();
86 void intersect(
const osg::Matrix &mat,
bool mouseHit);
95 std::vector<std::vector<float> > elapsedTimes;
96 std::vector<osg::ref_ptr<IntersectionHandler>> handlers;
static int myFrame
Definition: coIntersection.h:92
Definition: coIntersection.h:37
Definition: coIntersection.h:46
virtual ~IntersectionHandler()
Definition: coIntersection.h:40
int numIsectAllNodes
Definition: coIntersection.h:79
Definition: coIntersection.h:62
static int myFrameIndex
Definition: coIntersection.h:91
float intersectionDist
value of the PointerAppearance.Intersection config var
Definition: coIntersection.h:89
std::vector< osg::ref_ptr< IntersectionHandler > > _handlers
Definition: coIntersection.h:59
Definition: vruiIntersection.h:23