19 #include <osgUtil/LineSegmentIntersector>
20 #include <osgUtil/IntersectVisitor>
24 #include <matrix/vlVector.h>
41 class DtOsgIntersectionVisitor;
110 virtual bool findNearestIntersectionToPoint(
double x,
double y,
double z,
111 double vx,
double vy,
double vz,
114 std::vector<DtElementID>* ignoreList=0,
115 bool returnTriangle=
false,
116 double maxIsectorLength=-1.,
bool useHighLod=
false );
125 virtual bool findAllIntersectionsThroughPoint(
double x,
double y,
double z,
128 std::vector<DtElementID>* ignoreList=0,
bool sort=
true,
bool useHighLod=
false );
136 virtual bool findFirstIntersectWithLineSegment(
137 double x,
double y,
double z,
double end_x,
double end_y,
double end_z,
140 std::vector<DtElementID>* ignoreList=0,
bool useHighLod=
false);
148 virtual bool findAllIntersectWithLineSegment(
149 double x,
double y,
double z,
double end_x,
double end_y,
double end_z,
152 std::vector<DtElementID>* ignoreList=0,
bool sort=
true,
bool useHighLod=
false );
159 virtual bool pick(
DtChannel& channel,
double mx,
double my,
162 std::vector<DtElementID>* ignoreList=0);
168 virtual bool pickAll(
DtChannel* channel,
double mx,
double my,
170 std::vector<DtElementID>* ignoreList=0);
214 virtual bool findNearestIntersection(
double x,
double y,
double z,
219 double maxIsectorLength=-1.0,
bool useHighLod=
false );
234 virtual bool findIntersectionsThroughPoint(
double x,
double y,
double z,
235 double vx,
double vy,
double vz,
240 double maxIsectorLength=-1.0,
bool sort=
true,
bool useHighLod=
false );
247 virtual bool intersectLineSegmentWithScene(
double x,
double y,
double z,
248 double end_x,
double end_y,
double end_z,
253 bool returnHitTriangle=
false,
bool useHighLod=
false );
260 virtual bool intersectLineSegmentWithScene(
double x,
double y,
double z,
261 double end_x,
double end_y,
double end_z,
266 bool returnHitTriangle=
false,
bool sort=
true,
bool useHighLod=
false );
270 virtual bool pick( osgViewer::View& view,
double mx,
double my,
274 bool returnHitTriangle=
false );
278 virtual bool pick( osgViewer::View& view,
double mx,
double my,
282 bool returnHitTriangle=
false );
286 static osg::Node::NodeMask nodeMaskFromIntersectProperties(
289 static bool anyNodeInNodePath(std::list<osg::Node*>* n,
290 osg::NodePath
const& path);
297 virtual bool calcEndpointsFromDirectionAndLength(
double x,
double y,
298 double z,
double vx,
double vy,
double vz,
double length,
302 void getExcludeNodesFromIgnoreList( std::vector<DtUniqueID>* ignoreList,
307 osg::Vec3d worldIntersectPoint(
const osgUtil::Hit& hit );
309 osg::Vec3d worldIntersectPoint(
310 const osgUtil::LineSegmentIntersector::Intersection& hit );
312 osg::Vec3d localToWorld(
const osg::Vec3& local,
const osg::Matrix& localToWorld );
314 bool findIdFromNodePath(
const osg::NodePath& nodePath,
DtUniqueID&
id );
318 osg::Camera * getActiveCamera(osgViewer::View& view);
326 const osgUtil::LineSegmentIntersector::Intersection& hit,
327 bool returnHitTriangle ) ;
331 void doLineSegmentIntersections(
332 osgUtil::IntersectionVisitor& collisionVisitor,
336 bool processLineSegmentIntersection(
337 osgUtil::LineSegmentIntersector::Intersections& hitList,
342 bool processLineSegmentIntersection(
const osg::Vec3d& testPoint,
343 osgUtil::LineSegmentIntersector::Intersections& hitList,
348 bool processLineSegmentIntersection(
const osg::Vec3d& testPoint,
349 osgUtil::LineSegmentIntersector::Intersections& hitList,
354 bool processPickIntersection(
355 osgUtil::LineSegmentIntersector::Intersections& hitList,
360 bool processPickIntersection(
361 osgUtil::LineSegmentIntersector::Intersections& hitList,
371 bool shouldInstanceIntersect(osg::Node::NodeMask nodeMask);
391 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:383
std::vector< DtSceneRoot > DtSceneRootList
A list of DtOsgRenderer::SceneRoots.
Definition: DtSceneRoot.h:133
int myModelSet
Definition: DtOsgIntersector.h:374
DtOsgIntersectVisitor checks to see if it is visiting a a DtTerrainPatchGroup and if so...
Definition: DtOsgIntersectionVisitor.h:24
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
bool operator()(const DtOsgIntersectorResult &a, const DtOsgIntersectorResult &b)
Definition: DtOsgIntersector.h:386
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:84
DtOsgIntersectorResult is the OSG-specific implementation of DtIntersectorResult; it is a container c...
Definition: DtOsgIntersector.h:64
osg::Vec3d myReference
Definition: DtOsgIntersector.h:394
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:191
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:74
static const unsigned int FlagAllOn
Nodemask bitflag definitions.
Definition: DtOsgNodeTraversalFlags.h:19
osg::Matrixd myLocalToWorld
Definition: DtOsgIntersector.h:77
The abstract Channel Class.
Definition: DtChannel.h:30
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:52
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
std::list< DtUniqueID > myExcludeIds
Definition: DtOsgIntersector.h:55
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:399
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:56
DtOsgIntersectorSorter provides an operator for comparing the the distances between 2 osg::vectors an...
Definition: DtOsgIntersector.h:380