19 #include <osgUtil/IntersectVisitor>
22 #include <osgUtil/LineSegmentIntersector>
24 #include <matrix/vlVector.h>
39 class DtOsgIntersectionVisitor;
108 virtual bool findNearestIntersectionToPoint(
double x,
double y,
double z,
109 double vx,
double vy,
double vz,
112 std::vector<DtElementID>* ignoreList=0,
113 bool returnTriangle=
false,
114 double maxIsectorLength=-1.,
bool useHighLod=
false );
123 virtual bool findAllIntersectionsThroughPoint(
double x,
double y,
double z,
126 std::vector<DtElementID>* ignoreList=0,
bool sort=
true,
bool useHighLod=
false );
134 virtual bool findFirstIntersectWithLineSegment(
135 double x,
double y,
double z,
double end_x,
double end_y,
double end_z,
138 std::vector<DtElementID>* ignoreList=0,
bool useHighLod=
false);
146 virtual bool findAllIntersectWithLineSegment(
147 double x,
double y,
double z,
double end_x,
double end_y,
double end_z,
150 std::vector<DtElementID>* ignoreList=0,
bool sort=
true,
bool useHighLod=
false );
157 virtual bool pick(
DtChannel& channel,
double mx,
double my,
160 std::vector<DtElementID>* ignoreList=0);
166 virtual bool pickAll(
DtChannel* channel,
double mx,
double my,
168 std::vector<DtElementID>* ignoreList=0);
212 virtual bool findNearestIntersection(
double x,
double y,
double z,
217 double maxIsectorLength=-1.0,
bool useHighLod=
false );
232 virtual bool findIntersectionsThroughPoint(
double x,
double y,
double z,
233 double vx,
double vy,
double vz,
238 double maxIsectorLength=-1.0,
bool sort=
true,
bool useHighLod=
false );
245 virtual bool intersectLineSegmentWithScene(
double x,
double y,
double z,
246 double end_x,
double end_y,
double end_z,
251 bool returnHitTriangle=
false,
bool useHighLod=
false );
258 virtual bool intersectLineSegmentWithScene(
double x,
double y,
double z,
259 double end_x,
double end_y,
double end_z,
264 bool returnHitTriangle=
false,
bool sort=
true,
bool useHighLod=
false );
268 virtual bool pick( osgViewer::View& view,
double mx,
double my,
272 bool returnHitTriangle=
false );
276 virtual bool pick( osgViewer::View& view,
double mx,
double my,
280 bool returnHitTriangle=
false );
284 static osg::Node::NodeMask nodeMaskFromIntersectProperties(
287 static bool anyNodeInNodePath(std::list<osg::Node*>* n,
288 osg::NodePath
const& path);
295 virtual bool calcEndpointsFromDirectionAndLength(
double x,
double y,
296 double z,
double vx,
double vy,
double vz,
double length,
300 void getExcludeNodesFromIgnoreList( std::vector<DtUniqueID>* ignoreList,
305 osg::Vec3d worldIntersectPoint(
const osgUtil::Hit& hit );
307 osg::Vec3d worldIntersectPoint(
308 const osgUtil::LineSegmentIntersector::Intersection& hit );
310 osg::Vec3d localToWorld(
const osg::Vec3& local,
const osg::Matrix& localToWorld );
312 bool findIdFromNodePath(
const osg::NodePath& nodePath,
DtUniqueID&
id );
316 osg::Camera * getActiveCamera(osgViewer::View& view);
324 const osgUtil::LineSegmentIntersector::Intersection& hit,
325 bool returnHitTriangle ) ;
329 void doLineSegmentIntersections(
330 osgUtil::IntersectionVisitor& collisionVisitor,
334 bool processLineSegmentIntersection(
335 osgUtil::LineSegmentIntersector::Intersections& hitList,
340 bool processLineSegmentIntersection(
const osg::Vec3d& testPoint,
341 osgUtil::LineSegmentIntersector::Intersections& hitList,
346 bool processLineSegmentIntersection(
const osg::Vec3d& testPoint,
347 osgUtil::LineSegmentIntersector::Intersections& hitList,
352 bool processPickIntersection(
353 osgUtil::LineSegmentIntersector::Intersections& hitList,
358 bool processPickIntersection(
359 osgUtil::LineSegmentIntersector::Intersections& hitList,
369 bool shouldInstanceIntersect(osg::Node::NodeMask nodeMask);
389 return diffA.length2() < diffB.length2();
IntersectProperties
The IntersectProperties enum is a flag set that indicates the.
Definition: DtIntersector.h:135
DtOsgIntersectorSorter(const osg::Vec3d &reference)
Definition: DtOsgIntersector.h:381
std::vector< DtSceneRoot > DtSceneRootList
A list of DtOsgRenderer::SceneRoots.
Definition: DtSceneRoot.h:117
int myModelSet
Definition: DtOsgIntersector.h:372
DtOsgIntersectVisitor checks to see if it is visiting a a DtTerrainPatchGroup and if so...
Definition: DtOsgIntersectionVisitor.h:27
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
bool operator()(const DtOsgIntersectorResult &a, const DtOsgIntersectorResult &b)
Definition: DtOsgIntersector.h:384
Contains makVrv:DtOsgIntersector class.
DtIntersector is an abstract class that provides the interface for requesting intersections with the ...
Definition: DtIntersector.h:129
Contains makVrv:DtOsgNodeTraversalFlags class.
DtOsgIntersector is the OSG-specific implementation of the DtIntersector class.
Definition: DtOsgIntersector.h:82
DtOsgIntersectorResult is the OSG-specific implementation of DtIntersectorResult; it is a container c...
Definition: DtOsgIntersector.h:62
osg::Vec3d myReference
Definition: DtOsgIntersector.h:392
Descriptor for a single intersection result.
Definition: DtIntersector.h:33
std::vector< DtOsgIntersectorResult > DtOsgIntersections
Note that even with intersection debug drawing enabled, these OSG-specific functions do not result in...
Definition: DtOsgIntersector.h:189
std::vector< DtIntersectorResult > DtIntersections
A vector of DtIntersectionRecords.
Definition: DtIntersector.h:154
double y
y coordinate, in database coordinates of the intersection
Definition: DtIntersector.h:69
std::vector< osg::Vec3 > myHitTriangle
Definition: DtOsgIntersector.h:72
static const unsigned int FlagAllOn
Nodemask bitflag definitions.
Definition: DtOsgNodeTraversalFlags.h:19
osg::Matrixd myLocalToWorld
Definition: DtOsgIntersector.h:75
The abstract Channel Class.
Definition: DtChannel.h:29
Contains makVrv:DtIntersector, makVrv:DtIntersectorLineSegment, and makVrv:DtIntersectorResult classe...
double z
z coordinate, in database coordinates of the intersection
Definition: DtIntersector.h:72
DtOsgItersectorExclusions is a list of osg nodes from the scene graph and a list of element IDs to ex...
Definition: DtOsgIntersector.h:50
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
std::list< DtUniqueID > myExcludeIds
Definition: DtOsgIntersector.h:53
DT_DLL_vrfutil bool intersection(const DtRailSegment *currentSegment, const DtRailSegment *nextSegment)
Given two segments, determine if where they meet is an intersection or just a bend in the road...
Abstract creator base class.
Definition: DtOsgIntersector.h:397
double x
x coordinate, in database coordinates of the intersection
Definition: DtIntersector.h:66
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Abstract creator base class.
Definition: DtIntersector.h:387
Contains makVrv::DtOsgRenderer class.
std::list< osg::Node * > myExcludeNodes
Definition: DtOsgIntersector.h:54
DtOsgIntersectorSorter provides an operator for comparing the the distances between 2 osg::vectors an...
Definition: DtOsgIntersector.h:378