VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Attributes
makVrv::DtIntersector Class Referenceabstract

DtIntersector is an abstract class that provides the interface for requesting intersections with the scene graph.

Inheritance diagram for makVrv::DtIntersector:
Inheritance graph
[legend]

Classes

struct  CachedPick
 

Public Types

enum  IntersectProperties {
  AllNodes = 0, PickableNodes = 1, SupportNodes = 2, NodesThatReceivesShadows = 4,
  NodesThatCastsShadows = 8, OsgEarthTerrainSkin = 16, TerrainPatchInsetNotOsgEarth = 32
}
 
enum  DynamicOceanProperties { DynamicOceanPropertyMsl = 0, DynamicOceanPropertyWaves = 1, DynamicOceanPropertyIgnore = 2 }
 
typedef std::vector
< DtIntersectorResult > 
DtIntersections
 

Public Member Functions

 DtIntersector (DtDe &de, DtModelSetId modelSet)
 
virtual ~DtIntersector ()
 
virtual void setDynamicOceanProperties (DynamicOceanProperties properties)
 
virtual void slot_setDynamicOceanProperties (int type, bool onOff)
 
virtual DynamicOceanProperties dynamicOceanProperties () const
 
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) const =0
 
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) const =0
 
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) const =0
 
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) const =0
 
virtual bool pick (DtChannel &channel, double mx, double my, DtIntersectorResult &intersection, IntersectProperties properties=AllNodes, std::vector< DtElementID > *ignoreList=0)=0
 
virtual bool pickAll (DtChannel *channel, double mx, double my, DtIntersections &intersections, IntersectProperties properties=AllNodes, std::vector< DtElementID > *ignoreList=0)=0
 
virtual DtModelSetId modelSet (void) const
 
virtual void setDefaultMaxClamp (double maximumIsectorLength)
 
virtual double defaultMaxClamp () const
 

Protected Attributes

DtDe & myDe
 
DynamicOceanProperties myDynamicOceanProperties
 
CachedPick myLastPick
 
bool myLastPickSucceeded
 
DtIntersectorResult myLastResult
 
double myDefaultMaxClamp
 
const DtModelSetId myModelSet
 
DtSignalConnectionManager myConnections
 

Member Typedef Documentation

A vector of DtIntersectionRecords.

Member Enumeration Documentation

The IntersectProperties enum is a flag set that indicates the types of nodes to be considered for intersections.

Enumerator
AllNodes 
PickableNodes 
SupportNodes 
NodesThatReceivesShadows 
NodesThatCastsShadows 
OsgEarthTerrainSkin 
TerrainPatchInsetNotOsgEarth 
Enumerator
DynamicOceanPropertyMsl 
DynamicOceanPropertyWaves 
DynamicOceanPropertyIgnore 

Constructor & Destructor Documentation

makVrv::DtIntersector::DtIntersector ( DtDe &  de,
DtModelSetId  modelSet 
)

CTOR.

virtual makVrv::DtIntersector::~DtIntersector ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtIntersector::setDynamicOceanProperties ( DynamicOceanProperties  properties)
virtual

If an ocean layer exists, determine if it should be ignored, use mean sea level, or wave height.

virtual void makVrv::DtIntersector::slot_setDynamicOceanProperties ( int  type,
bool  onOff 
)
virtual

Only connected for 3D Model Set Connected to DtDeSharedStateSignaler signal_oceanWaveIntersectionsEnabledChanged.

virtual DynamicOceanProperties makVrv::DtIntersector::dynamicOceanProperties ( ) const
virtual

Return the current dynamic ocean properties.

virtual bool makVrv::DtIntersector::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 
) const
pure virtual

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. It is recommended that you set the isector length to something more specific if possible, like the altitude of the observer + a constant, for example; or, for osgEarth databases, useHighLod=true, which will also eliminate the problem.

Return values
falseif no intersection was found (and the isect record is NOT set).

Implemented in makVrv::DtOsgIntersector.

virtual bool makVrv::DtIntersector::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 
) const
pure virtual

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.

Return values
falseif no intersection was found (and the isect record list has size 0).

Implemented in makVrv::DtOsgIntersector.

virtual bool makVrv::DtIntersector::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 
) const
pure virtual

find first intersection along segment x,y,z to end_x, end_y, end_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

Return values
falseif no intersection was found (and the isect record is NOT set).

Implemented in makVrv::DtOsgIntersector.

virtual bool makVrv::DtIntersector::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 
) const
pure virtual

find all intersections along segment x,y,z to end_x, end_y, end_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

Return values
falseif no intersection was found (and the isect record list has size 0).

Implemented in makVrv::DtOsgIntersector.

virtual bool makVrv::DtIntersector::pick ( DtChannel &  channel,
double  mx,
double  my,
DtIntersectorResult &  intersection,
IntersectProperties  properties = AllNodes,
std::vector< DtElementID > *  ignoreList = 0 
)
pure virtual

Find the object (if any) under the mouse mx, my are in window coordinates; cx, cy, cz are returned in database coordinates.

Return values
falseif no intersection was found (and the isect record is NOT set).

Implemented in makVrv::DtOsgIntersector.

virtual bool makVrv::DtIntersector::pickAll ( DtChannel *  channel,
double  mx,
double  my,
DtIntersections &  intersections,
IntersectProperties  properties = AllNodes,
std::vector< DtElementID > *  ignoreList = 0 
)
pure virtual

Find all the objects (if any) under the mouse mx, my are in window coordinates.

Return values
falseif no intersection was found (and the isect record list has size 0).

Implemented in makVrv::DtOsgIntersector.

virtual void makVrv::DtIntersector::setDefaultMaxClamp ( double  maximumIsectorLength)
virtual

For intersectors where no maximum length can be specified, or when no length is provided, VR-Vantage uses the bounding radius of the sceneRoot specified or implied. For earth terrains especially, it makes sense to put an upper bound on this. By default, that boundary is the earth's ~diameter - 12.742e+6. This method allows you to expand that (perhaps you intentionally want to intersect the terrain on the other side of the earth, for instance)

virtual double makVrv::DtIntersector::defaultMaxClamp ( ) const
virtual

For intersectors where no maximum length can be specified, or when no length is provided, VR-Vantage uses the bounding radius of the sceneRoot specified or implied. For earth terrains especially, it makes sense to put an upper bound on this. By default, that boundary is the earth's ~diameter - 12.742e+6. This method allows you to expand that (perhaps you intentionally want to intersect the terrain on the other side of the earth, for instance)

virtual DtModelSetId makVrv::DtIntersector::modelSet ( void  ) const
virtual

Member Data Documentation

DtDe& makVrv::DtIntersector::myDe
protected
DynamicOceanProperties makVrv::DtIntersector::myDynamicOceanProperties
protected
CachedPick makVrv::DtIntersector::myLastPick
protected
bool makVrv::DtIntersector::myLastPickSucceeded
protected
DtIntersectorResult makVrv::DtIntersector::myLastResult
protected
double makVrv::DtIntersector::myDefaultMaxClamp
protected
const DtModelSetId makVrv::DtIntersector::myModelSet
protected
DtSignalConnectionManager makVrv::DtIntersector::myConnections
protected

Auto-disconnects on destruction; avoids singleton lookups in the DTOR.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)