VR-Forces 4.0.4 Class Documentation
Classes | Public Types | Public Member Functions | Protected Attributes
makVrv::DtIntersector Class Reference

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

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

List of all members.

Classes

struct  CachedPick
 CachedPick is a container class for the information to cache a pick request. More...

Public Types

enum  IntersectProperties {
  AllNodes = 0, PickableNodes = 1, SupportNodes = 2, NodesThatReceivesShadows = 4,
  NodesThatCastsShadows = 8
}
 The IntersectProperties enum is a flag set that indicates the. More...
typedef std::vector
< DtIntersectorResult
DtIntersections
 A vector of DtIntersectionRecords.

Public Member Functions

 DtIntersector (DtDe &de)
 CTOR.
virtual ~DtIntersector ()
 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)=0
 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)=0
 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)=0
 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)=0
 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)=0
 Find the object (if any) under the mouse mx, my are in window coordinates; cx, cy, cz are returned in database coordinates.
virtual bool pickAll (DtChannel *channel, double mx, double my, DtIntersections &intersections, IntersectProperties properties=AllNodes, std::vector< DtElementID > *ignoreList=0)=0
 Find all the objects (if any) under the mouse mx, my are in window coordinates.

Protected Attributes

DtDemyDe
CachedPick myLastPick
bool myLastPickSucceeded
DtIntersectorResult myLastResult

Detailed Description

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


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 

Constructor & Destructor Documentation

CTOR.

DTOR.


Member Function Documentation

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 
) [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 
) [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 
) [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 
) [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.


Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)