VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
makVrv::DtCachedIntersector Class Reference

A Cached Intersector will first look at the local cache, and, if the local cache does not have the information, go to the DtIntersectorManager to get the result, and cache it. More...

Public Member Functions

 DtCachedIntersector (DtDe &de, int modelSet)
 CTOR.
virtual ~DtCachedIntersector ()
 DTOR.
virtual bool findNearestIntersectionToPoint (double x, double y, double z, double vx, double vy, double vz, DtIntersectorResult &intersection, DtIntersector::IntersectProperties properties=DtIntersector::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).
virtual bool findAllIntersectionsThroughPoint (double x, double y, double z, double vx, double vy, double vz, DtIntersector::DtIntersections &intersections, DtIntersector::IntersectProperties properties=DtIntersector::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, DtIntersector::IntersectProperties properties=DtIntersector::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, DtIntersector::DtIntersections &intersections, DtIntersector::IntersectProperties properties=DtIntersector::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, DtIntersector::IntersectProperties properties=DtIntersector::AllNodes, std::vector< DtElementID > *ignoreList=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, DtIntersector::DtIntersections &intersections, DtIntersector::IntersectProperties properties=DtIntersector::AllNodes, std::vector< DtElementID > *ignoreList=0)
 Find all the objects (if any) under the mouse mx, my are in window coordinates.
virtual void setSharedCache (DtIntersectorCache *)
 Sets a shared cache.
virtual void setCacheLimit (int)
 Sets the size of the cache.
virtual void clearCache ()
 Clears the intersection cache.
virtual void setDynamicOceanProperties (DtIntersector::DynamicOceanProperties properties)
 If an ocean layer exists, determine if it should be ignored, use mean sea level, or wave height.
virtual
DtIntersector::DynamicOceanProperties 
dynamicOceanProperties () const
 Get the current properties, so they may be restored if changed.

Protected Attributes

DtDemyDe
DtIntersectorCachemyCache
bool myCacheIsShared
int myModelSet
int myCacheLimit
DtIntersector::DynamicOceanProperties myDynamicOceanProperties

Detailed Description

A Cached Intersector will first look at the local cache, and, if the local cache does not have the information, go to the DtIntersectorManager to get the result, and cache it.

Constructor & Destructor Documentation

makVrv::DtCachedIntersector::DtCachedIntersector ( DtDe de,
int  modelSet 
)

CTOR.

virtual makVrv::DtCachedIntersector::~DtCachedIntersector ( )
virtual

DTOR.

Member Function Documentation

virtual bool makVrv::DtCachedIntersector::findNearestIntersectionToPoint ( double  x,
double  y,
double  z,
double  vx,
double  vy,
double  vz,
DtIntersectorResult intersection,
DtIntersector::IntersectProperties  properties = DtIntersector::AllNodes,
std::vector< DtElementID > *  ignoreList = 0,
bool  returnTriangle = false,
double  maxIsectorLength = -1.,
bool  useHighLod = false 
)
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).
virtual bool makVrv::DtCachedIntersector::findAllIntersectionsThroughPoint ( double  x,
double  y,
double  z,
double  vx,
double  vy,
double  vz,
DtIntersector::DtIntersections intersections,
DtIntersector::IntersectProperties  properties = DtIntersector::AllNodes,
std::vector< DtElementID > *  ignoreList = 0,
bool  sort = true,
bool  useHighLod = false 
)
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).
virtual bool makVrv::DtCachedIntersector::findFirstIntersectWithLineSegment ( double  x,
double  y,
double  z,
double  end_x,
double  end_y,
double  end_z,
DtIntersectorResult intersection,
DtIntersector::IntersectProperties  properties = DtIntersector::AllNodes,
std::vector< DtElementID > *  ignoreList = 0,
bool  useHighLod = false 
)
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).
virtual bool makVrv::DtCachedIntersector::findAllIntersectWithLineSegment ( double  x,
double  y,
double  z,
double  end_x,
double  end_y,
double  end_z,
DtIntersector::DtIntersections intersections,
DtIntersector::IntersectProperties  properties = DtIntersector::AllNodes,
std::vector< DtElementID > *  ignoreList = 0,
bool  sort = true,
bool  useHighLod = false 
)
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).
virtual bool makVrv::DtCachedIntersector::pick ( DtChannel channel,
double  mx,
double  my,
DtIntersectorResult intersection,
DtIntersector::IntersectProperties  properties = DtIntersector::AllNodes,
std::vector< DtElementID > *  ignoreList = 0 
)
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).
virtual bool makVrv::DtCachedIntersector::pickAll ( DtChannel channel,
double  mx,
double  my,
DtIntersector::DtIntersections intersections,
DtIntersector::IntersectProperties  properties = DtIntersector::AllNodes,
std::vector< DtElementID > *  ignoreList = 0 
)
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).
virtual void makVrv::DtCachedIntersector::setSharedCache ( DtIntersectorCache )
virtual

Sets a shared cache.

If NULL, then will allocate cache for this intersector

virtual void makVrv::DtCachedIntersector::setCacheLimit ( int  )
virtual

Sets the size of the cache.

virtual void makVrv::DtCachedIntersector::clearCache ( )
virtual

Clears the intersection cache.

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

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

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

Get the current properties, so they may be restored if changed.

Member Data Documentation

DtDe& makVrv::DtCachedIntersector::myDe
protected
DtIntersectorCache* makVrv::DtCachedIntersector::myCache
protected
bool makVrv::DtCachedIntersector::myCacheIsShared
protected
int makVrv::DtCachedIntersector::myModelSet
protected
int makVrv::DtCachedIntersector::myCacheLimit
protected
DtIntersector::DynamicOceanProperties makVrv::DtCachedIntersector::myDynamicOceanProperties
protected

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

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)