|
VR-Engage
2.2
|
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>
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 |
| makVre::DtVrvIntersector::DtVrvIntersector | ( | makVrv::DtDe & | de | ) |
Constructor that initializes with a reference to the display engine.
| de | Reference to the VRV display engine |
Creates a VRV intersector for the 3D model set and initializes internal state.
References de().
|
overridevirtual |
Virtual destructor to properly clean up resources.
Deletes the internal VRV intersector object.
|
overridevirtual |
Gets the terrain elevation at a specific point.
| point | The point in geocentric coordinates to query (only lat/lon are used) |
| result | The resulting elevation in meters |
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.
|
overridevirtual |
Gets the terrain intersection point at a specific location.
| point | The point in geocentric coordinates to query (only lat/lon are used) |
| result | The resulting intersection point in geocentric coordinates |
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.
|
overridevirtual |
Gets the first intersection between two points.
| start | The starting point in geocentric coordinates |
| end | The ending point in geocentric coordinates |
| result | The resulting intersection point in geocentric coordinates |
| ignoreId | Optional list of element IDs to ignore during intersection testing |
Tests for an intersection along the line segment between start and end, returning the first intersection point encountered with pickable nodes.
Implements makVre::DtIntersector.
|
overridevirtual |
Gets the first intersection along a ray from a point in a direction.
| start | The starting point in geocentric coordinates |
| ori | The orientation defining the ray direction |
| result | The resulting intersection point in geocentric coordinates |
| ignoreId | Optional list of element IDs to ignore during intersection testing |
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.
|
overridevirtual |
Performs a ray cast from screen coordinates.
| x | The normalized x screen coordinate (0.0 to 1.0, left to right) |
| y | The normalized y screen coordinate (0.0 to 1.0, top to bottom) |
| result | The resulting intersection point in geocentric coordinates |
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.
|
virtual |
Extended screen ray casting with additional control options.
| x | The normalized x screen coordinate (0.0 to 1.0, left to right) |
| y | The normalized y screen coordinate (0.0 to 1.0, top to bottom) |
| result | The resulting intersection point in geocentric coordinates |
| id | Output parameter that receives the element ID of the intersected object |
| props | Properties that control which types of nodes to test against |
| ignoreId | Optional list of element IDs to ignore during intersection testing |
| window | Optional window name to use for picking (defaults to current) |
| channel | Optional channel name to use for picking (defaults to current) |
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.
|
protected |
Reference to the VRV display engine.
|
protected |
Pointer to the internal VRV intersector implementation.