Public Member Functions |
| | DtOsgIntersector (DtDe &de, int modelSet) |
| | CTOR.
|
| virtual | ~DtOsgIntersector () |
| | DTOR.
|
| virtual bool | findNearestIntersectionToPoint (double x, double y, double z, double vx, double vy, double vz, DtIntersectorResult &intersection, IntersectProperties properties=AllNodes, std::vector< DtElementID > *ignoreList=0, bool returnTriangle=false, double maxIsectorLength=-1., bool useHighLod=false) |
| | Find the nearest scene intersection from a point (x,y,z) along a vector(vx,vy,vz) The useHighLod argument tells the intersector that if the terrain is an osgEarth terrain, don't settle for whatever is paged in; get the highest LOD from the map server for this location and use that Note that if maxIsectorLength is not set, the default is the diameter of the database, which for large (and especially geocentric) databases and world databases, may be too large to get adequate precision when trying to interect small (high resolution) triangles.
|
| virtual bool | findAllIntersectionsThroughPoint (double x, double y, double z, double vx, double vy, double vz, DtIntersections &intersections, IntersectProperties properties=AllNodes, std::vector< DtElementID > *ignoreList=0, bool sort=true, bool useHighLod=false) |
| | Return a list of all intersections along the line passing through <x,y,z> and directed by <vx, vy, vz> The useHighLod argument tells the intersector that if the terrain is an osgEarth terrain, don't settle for whatever is paged in; get the highest LOD from the map server for this location and use that.
|
| virtual bool | findFirstIntersectWithLineSegment (double x, double y, double z, double end_x, double end_y, double end_z, DtIntersectorResult &intersection, IntersectProperties properties=AllNodes, std::vector< DtElementID > *ignoreList=0, bool useHighLod=false) |
| | find first intersection along segment x,y,z to end_x, end_y, end_z.
|
| virtual bool | findAllIntersectWithLineSegment (double x, double y, double z, double end_x, double end_y, double end_z, DtIntersections &intersections, IntersectProperties properties=AllNodes, std::vector< DtElementID > *ignoreList=0, bool sort=true, bool useHighLod=false) |
| | find all intersections along segment x,y,z to end_x, end_y, end_z.
|
| virtual bool | pick (DtChannel &channel, double mx, double my, DtIntersectorResult &intersection, IntersectProperties properties=AllNodes, std::vector< DtElementID > *ignoreList=0) |
| | Find the object (if any) under the mouse mx, my are in window coordinates.
|
| virtual bool | pickAll (DtChannel *channel, double mx, double my, DtIntersections &intersections, IntersectProperties properties=AllNodes, std::vector< DtElementID > *ignoreList=0) |
| | Find all the objects (if any) under the mouse mx, my are in window coordinates.
|
| virtual bool | findNearestIntersection (double x, double y, double z, double vx, double vy, double vz, DtOsgIntersectorResult &intersection, const DtSceneRootList &intersectionRoots, osg::Node::NodeMask mask=DtOsgNodeFlags::FlagAllOn, DtOsgItersectorExclusions *excludeNodeList=0, bool returnHitTriangle=false, double maxIsectorLength=-1.0, bool useHighLod=false) |
| | Find the nearest intersection from a point (x,y,z) along a vector(vx,vy,vz) stored in a collision point (cx,cy,cz) with normal (normal_x, normal_y, normal_z)
|
| virtual bool | findIntersectionsThroughPoint (double x, double y, double z, double vx, double vy, double vz, DtOsgIntersector::DtOsgIntersections &intersections, const DtSceneRootList &intersectionRoots, osg::Node::NodeMask mask=DtOsgNodeFlags::FlagAllOn, DtOsgItersectorExclusions *exclusions=0, bool returnHitTriangle=false, double maxIsectorLength=-1.0, bool sort=true, bool useHighLod=false) |
| | intersect the scene with a line segment going through (x,y,z), directed by <vx, vy,vz>, and large enough to cover the entire sceneGraph, and return all intersections The useHighLod argument tells the intersector that if the terrain is an osgEarth terrain, don't settle for whatever is paged in; get the highest LOD from the map server for this location and use that Note that if maxIsectorLength is not set, the default is the diameter of the database, which for large (and especially geocentric) databases and world databases, may be too large to get adequate precision when trying to interect small (high resolution) triangles.
|
| virtual bool | intersectLineSegmentWithScene (double x, double y, double z, double end_x, double end_y, double end_z, DtOsgIntersectorResult &intersection, const DtSceneRootList &intersectionRoots, osg::Node::NodeMask mask=DtOsgNodeFlags::FlagAllOn, DtOsgItersectorExclusions *excludeNodeList=0, bool returnHitTriangle=false, bool useHighLod=false) |
| | intersect the scene with a (directed) line segment and return the intersection closest to the initial (x,y,z) The useHighLod argument tells the intersector that if the terrain is an osgEarth terrain, don't settle for whatever is paged in; get the highest LOD from the map server for this location and use that
|
| virtual bool | intersectLineSegmentWithScene (double x, double y, double z, double end_x, double end_y, double end_z, DtOsgIntersector::DtOsgIntersections &intersections, const DtSceneRootList &intersectionRoots, osg::Node::NodeMask mask=DtOsgNodeFlags::FlagAllOn, DtOsgItersectorExclusions *excludeNodeList=0, bool returnHitTriangle=false, bool sort=true, bool useHighLod=false) |
| | intersect the scene with a (directed) line segment and return all intersections The useHighLod argument tells the intersector that if the terrain is an osgEarth terrain, don't settle for whatever is paged in; get the highest LOD from the map server for this location and use that
|
| virtual bool | pick (osgViewer::View &view, double mx, double my, DtOsgIntersectorResult &intersection, osg::Node::NodeMask mask=DtOsgNodeFlags::FlagAllOn, DtOsgItersectorExclusions *excludeNodeList=0, bool returnHitTriangle=false) |
| | returns the element id of the object under the mouse (mx, my) if one exists
|
| virtual bool | pick (osgViewer::View &view, double mx, double my, DtOsgIntersector::DtOsgIntersections &intersections, osg::Node::NodeMask mask=DtOsgNodeFlags::FlagAllOn, DtOsgItersectorExclusions *excludeNodeList=0, bool returnHitTriangle=false) |
| | returns the element ids of the objects under the mouse (mx, my) if any exists
|
| | DtIntersector (DtDe &de) |
| | CTOR.
|
| virtual | ~DtIntersector () |
| | DTOR.
|
| virtual void | setDynamicOceanProperties (DynamicOceanProperties properties) |
| | If an ocean layer exists, determine if it should be ignored, use mean sea level, or wave height.
|
| DynamicOceanProperties | dynamicOceanProperties () const |
| | Return the current dynamic ocean properties.
|
Protected Member Functions |
| virtual float | distanceToResult2 (double x, double y, double z, DtOsgIntersectorResult &result) |
| | returns the square of the distance from x, y, z to the intersector result
|
| virtual bool | calcEndpointsFromDirectionAndLength (double x, double y, double z, double vx, double vy, double vz, double length, const DtSceneRootList &intersectionRoots, DtVector &startPoint, DtVector &endPoint) const |
| void | getExcludeNodesFromIgnoreList (std::vector< DtUniqueID > *ignoreList, DtOsgItersectorExclusions &exclusions) |
| osg::Vec3d | worldIntersectPoint (const osgUtil::Hit &hit) |
| | Convert a Vec3 from local to world coordinates, maximizing precision.
|
| osg::Vec3d | worldIntersectPoint (const osgUtil::LineSegmentIntersector::Intersection &hit) |
| osg::Vec3d | localToWorld (const osg::Vec3 &local, const osg::Matrix &localToWorld) |
| bool | findIdFromNodePath (const osg::NodePath &nodePath, DtUniqueID &id) |
| osg::Camera * | getActiveCamera (osgViewer::View &view) |
| void | updateInstanceIntersectElementId (DtOsgIntersectorResult &result) |
| | When an instance intersection occurs, update the result.id to point to the corresponding element id.
|
| bool | fillResultFromHit (DtOsgIntersectorResult &result, const osgUtil::LineSegmentIntersector::Intersection &hit, bool returnHitTriangle) |
| void | doLineSegmentIntersections (osgUtil::IntersectionVisitor &collisionVisitor, const DtSceneRootList &intersectionRoots, osg::Node::NodeMask mask) |
| | Get the intersection of a line segment with the part of the sceneGraph under instersectRoot.
|
| bool | processLineSegmentIntersection (osgUtil::LineSegmentIntersector::Intersections &hitList, DtOsgItersectorExclusions *excludeNodeList, bool returnHitTriangle, DtOsgIntersectorResult &intersection) |
| | returns the first intersection in the hitList (not necessarily the closest)
|
| bool | processLineSegmentIntersection (const osg::Vec3d &testPoint, osgUtil::LineSegmentIntersector::Intersections &hitList, DtOsgItersectorExclusions *excludeNodeList, bool returnHitTriangle, DtOsgIntersectorResult &intersection) |
| | returns the intersection closest to the specified test point
|
| bool | processLineSegmentIntersection (const osg::Vec3d &testPoint, osgUtil::LineSegmentIntersector::Intersections &hitList, DtOsgItersectorExclusions *excludeNodeList, bool returnHitTriangle, DtOsgIntersector::DtOsgIntersections &intersections, bool sort) |
| | returns all intersections in the hit list
|
| bool | processPickIntersection (osgUtil::LineSegmentIntersector::Intersections &hitList, DtOsgItersectorExclusions *excludeNodeList, bool returnHitTriangle, DtOsgIntersectorResult &intersection) |
| | returns the first pick in the hit list (closest? I think so)
|
| bool | processPickIntersection (osgUtil::LineSegmentIntersector::Intersections &hitList, DtOsgItersectorExclusions *excludeNodeList, bool returnHitTriangle, DtOsgIntersector::DtOsgIntersections &intersections) |
| | returns all the objects picked
|
| void | setupCollisionVisitor (bool useHighLod, DtOsgIntersectionVisitor &visitor) |
| | Set the flags used bt the collision visitor for handling special cases like osgEarth and dynamic ocean.
|
| bool | shouldInstanceIntersect (osg::Node::NodeMask nodeMask) |
| | Determine if an instanced intersection should be tested (see bugs 54019, 54050)
|
DtOsgIntersector is the OSG-specific implementation of the DtIntersector class.
It provides a variety of methods for finding intersections with the OSG scene graph.