VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVrvIntersector Class Reference

Detailed Description

This class provides terrain intersection, ray casting, and screen picking functionality using the VRV rendering engine. It handles coordinate transformations between local and network (geocentric) coordinate systems and supports various types of intersection queries against the 3D scene.

#include <vrvIntersector.h>

Inheritance diagram for makVre::DtVrvIntersector:
[legend]

Public Member Functions

 DtVrvIntersector (makVrv::DtDe &de)
 
virtual ~DtVrvIntersector () override
 
virtual bool elevationAt (DtVector point, double &result) override
 
virtual bool terrainIntersectionAt (DtVector point, DtVector &result) override
 
virtual bool getIntersection (DtVector start, DtVector end, DtVector &result, std::vector< makVrv::DtElementID > *ignoreId=0) override
 
virtual bool getIntersection (DtVector start, DtTaitBryan ori, DtVector &result, std::vector< makVrv::DtElementID > *ignoreId=0) override
 
virtual bool screenRayCast (float x, float y, DtVector &result) override
 
virtual bool screenRayCast (float x, float y, DtVector &result, makVrv::DtElementID &id, makVrv::DtIntersector::IntersectProperties props=makVrv::DtIntersector::SupportNodes, std::vector< makVrv::DtElementID > *ignoreId=0, const std::string &window="", const std::string &channel="")
 
- Public Member Functions inherited from makVre::DtIntersector
 DtIntersector ()
 
virtual ~DtIntersector ()
 

Protected Attributes

makVrv::DtDe & myDe
 
makVrv::DtIntersector * myIntersector
 

Constructor & Destructor Documentation

◆ DtVrvIntersector()

makVre::DtVrvIntersector::DtVrvIntersector ( makVrv::DtDe & de)

Constructor that initializes with a reference to the display engine.

Parameters
deReference to the VRV display engine

Creates a VRV intersector for the 3D model set and initializes internal state.

References de().

◆ ~DtVrvIntersector()

virtual makVre::DtVrvIntersector::~DtVrvIntersector ( )
overridevirtual

Virtual destructor to properly clean up resources.

Deletes the internal VRV intersector object.

Member Function Documentation

◆ elevationAt()

virtual bool makVre::DtVrvIntersector::elevationAt ( DtVector point,
double & result )
overridevirtual

Gets the terrain elevation at a specific point.

Parameters
pointThe point in geocentric coordinates to query (only lat/lon are used)
resultThe resulting elevation in meters
Returns
True if the elevation was successfully determined, false otherwise

Determines the terrain elevation at the specified geocentric point by casting a ray downward from a high altitude and finding the intersection with the terrain. The result is returned as an altitude value in meters.

Implements makVre::DtIntersector.

◆ terrainIntersectionAt()

virtual bool makVre::DtVrvIntersector::terrainIntersectionAt ( DtVector point,
DtVector & result )
overridevirtual

Gets the terrain intersection point at a specific location.

Parameters
pointThe point in geocentric coordinates to query (only lat/lon are used)
resultThe resulting intersection point in geocentric coordinates
Returns
True if an intersection was found, false otherwise

Casts a ray downward from a high altitude at the specified lat/lon and returns the geocentric coordinates of the intersection with the terrain.

Implements makVre::DtIntersector.

◆ getIntersection() [1/2]

virtual bool makVre::DtVrvIntersector::getIntersection ( DtVector start,
DtVector end,
DtVector & result,
std::vector< makVrv::DtElementID > * ignoreId = 0 )
overridevirtual

Gets the first intersection between two points.

Parameters
startThe starting point in geocentric coordinates
endThe ending point in geocentric coordinates
resultThe resulting intersection point in geocentric coordinates
ignoreIdOptional list of element IDs to ignore during intersection testing
Returns
True if an intersection was found, false otherwise

Tests for an intersection along the line segment between start and end, returning the first intersection point encountered with pickable nodes.

Implements makVre::DtIntersector.

◆ getIntersection() [2/2]

virtual bool makVre::DtVrvIntersector::getIntersection ( DtVector start,
DtTaitBryan ori,
DtVector & result,
std::vector< makVrv::DtElementID > * ignoreId = 0 )
overridevirtual

Gets the first intersection along a ray from a point in a direction.

Parameters
startThe starting point in geocentric coordinates
oriThe orientation defining the ray direction
resultThe resulting intersection point in geocentric coordinates
ignoreIdOptional list of element IDs to ignore during intersection testing
Returns
True if an intersection was found, false otherwise

Tests for an intersection along a ray defined by a start point and orientation, returning the first intersection point encountered with pickable nodes.

Implements makVre::DtIntersector.

◆ screenRayCast() [1/2]

virtual bool makVre::DtVrvIntersector::screenRayCast ( float x,
float y,
DtVector & result )
overridevirtual

Performs a ray cast from screen coordinates.

Parameters
xThe normalized x screen coordinate (0.0 to 1.0, left to right)
yThe normalized y screen coordinate (0.0 to 1.0, top to bottom)
resultThe resulting intersection point in geocentric coordinates
Returns
True if an intersection was found, false otherwise

Projects a ray from the camera through the specified screen coordinates and returns the first intersection with pickable nodes in the scene.

Implements makVre::DtIntersector.

◆ screenRayCast() [2/2]

virtual bool makVre::DtVrvIntersector::screenRayCast ( float x,
float y,
DtVector & result,
makVrv::DtElementID & id,
makVrv::DtIntersector::IntersectProperties props = makVrv::DtIntersector::SupportNodes,
std::vector< makVrv::DtElementID > * ignoreId = 0,
const std::string & window = "",
const std::string & channel = "" )
virtual

Extended screen ray casting with additional control options.

Parameters
xThe normalized x screen coordinate (0.0 to 1.0, left to right)
yThe normalized y screen coordinate (0.0 to 1.0, top to bottom)
resultThe resulting intersection point in geocentric coordinates
idOutput parameter that receives the element ID of the intersected object
propsProperties that control which types of nodes to test against
ignoreIdOptional list of element IDs to ignore during intersection testing
windowOptional window name to use for picking (defaults to current)
channelOptional channel name to use for picking (defaults to current)
Returns
True if an intersection was found, false otherwise

Extended version of screenRayCast that provides additional control over the intersection test, including which types of nodes to test against, specific windows and channels to use, and retrieving the element ID of the intersected object.

Member Data Documentation

◆ myDe

makVrv::DtDe& makVre::DtVrvIntersector::myDe
protected

Reference to the VRV display engine.

◆ myIntersector

makVrv::DtIntersector* makVre::DtVrvIntersector::myIntersector
protected

Pointer to the internal VRV intersector implementation.


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