VR-Engage  2.2
Loading...
Searching...
No Matches
entityHelper.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4******************************************************************************/
5
6//! \file entityHelper.h
7//! \brief Defines helper utilities for working with entities in VR-Engage
8//!
9//! This file contains the DtEntityHelper class which provides utility functions
10//! for interacting with simulation entities. It offers methods for entity lookup,
11//! position calculation, orientation, sensor management, and spatial operations.
12
13#pragma once
14
15
17
18#include <vrvCore/DtUniqueID.h>
19#include <vrvCore/DtElementData.h>
20
21#include <matrix/vlVector.h>
22#include <matrix/vlQuaternion.h>
23#include <vlpi/entityType.h>
24
25#include <string>
26#include <map>
27
28namespace makVrv
29{
30class DtDe;
31class DtObserver;
32class DtSceneObject;
33class DtIntersector;
34} // namespace makVrv
35
36namespace makVre
37{
39}
40
41
42//! \brief Helper class for entity information and operations
43//!
44//! DtEntityHelper provides a comprehensive set of utility functions for working
45//! with simulation entities. It facilitates entity lookup, position and orientation
46//! calculations, sensor management, and various spatial operations. This class serves
47//! as a bridge between the VR-Engage application and the underlying simulation entities,
48//! abstracting complex operations behind simple interface methods.
49//!
50//! The class follows a singleton pattern for global access while maintaining proper
51//! initialization controls.
53{
54public:
55 //! \brief Constructor
56 //! \param de Reference to the display engine
57 //! \param resolver Pointer to the entity resolver
58 //!
59 //! Creates a new entity helper object with the specified display engine and
60 //! entity resolver. The display engine provides access to the visual representation
61 //! of entities, while the entity resolver maps between different entity identifiers.
62 DtEntityHelper(makVrv::DtDe& de, makVre::DtEntityResolver* resolver);
63
64 //! \brief Virtual destructor
65 //!
66 //! Cleans up resources used by the entity helper.
67 virtual ~DtEntityHelper();
68
69 //! \brief Initializes the singleton instance
70 //! \param de Reference to the display engine
71 //! \param resolver Pointer to the entity resolver
72 //!
73 //! Initializes the singleton instance of the entity helper with the specified
74 //! display engine and entity resolver. This must be called before any other
75 //! static methods are used.
76 static void initialize(makVrv::DtDe& de, makVre::DtEntityResolver* resolver);
77
78 //! \brief Gets the singleton instance
79 //! \return Reference to the singleton instance
80 //!
81 //! Retrieves the singleton instance of the entity helper.
82 //! The helper must be initialized before calling this method.
84
85 //! \brief Checks if the singleton is initialized
86 //! \return True if initialized, false otherwise
87 //!
88 //! Determines whether the singleton instance has been properly initialized.
89 static bool isInitialized();
90
91 //! \brief Entity location methods
92 //! @{
93
94 //! \brief Finds an entity's location given its global simulation ID
95 //! \param globalId Global simulation identifier string
96 //! \return 3D vector containing the entity's position in geocentric coordinates
97 //!
98 //! Looks up the current position of an entity using its global simulation ID.
99 //! Returns the entity's position in geocentric coordinates.
100 DtVector lookupEntityLocation(const std::string& globalId);
101
102 //! \brief Finds an entity's location given its unique ID
103 //! \param uniqueId Unique identifier for the entity
104 //! \return 3D vector containing the entity's position in geocentric coordinates
105 //!
106 //! Looks up the current position of an entity using its unique ID.
107 //! Returns the entity's position in geocentric coordinates.
108 DtVector lookupEntityLocation(makVrv::DtUniqueID uniqueId);
109 //! @}
110
111 //! \brief Orientation calculation methods
112 //! @{
113
114 //! \brief Determines the quaternion to rotate from one vector to another
115 //! \param cigStart Starting position vector in geocentric coordinates
116 //! \param cigEnd Target position vector in geocentric coordinates
117 //! \return Quaternion representing the rotation from start to end vector
118 //!
119 //! Calculates a quaternion that rotates from the start vector to the end vector.
120 //! This function assumes the database up vector as the up direction for both vectors.
121 //! Useful for orienting entities to face specific targets or directions.
122 DtQuaternion orientToVector(DtVector cigStart, DtVector cigEnd);
123
124 //! \brief Determines the heading in degrees from an entity to a target point
125 //! \param globalId Global simulation identifier string of the source entity
126 //! \param cigEnd Target position in geocentric coordinates
127 //! \return Heading in degrees from entity to target (0-360, clockwise from north)
128 //!
129 //! Calculates the heading in degrees from an entity to a target point.
130 //! The heading is measured clockwise from north (0-360 degrees).
131 double degreesToTarget(std::string& globalId, DtVector cigEnd);
132
133 //! \brief Determines the heading in degrees from an entity to a target point
134 //! \param uniqueId Unique identifier of the source entity
135 //! \param cigEnd Target position in geocentric coordinates
136 //! \return Heading in degrees from entity to target (0-360, clockwise from north)
137 //!
138 //! Calculates the heading in degrees from an entity to a target point.
139 //! The heading is measured clockwise from north (0-360 degrees).
140 double degreesToTarget(makVrv::DtUniqueID uniqueId, DtVector cigEnd);
141
142 //! \brief Determines the heading in degrees between two points
143 //! \param cigStart Starting position in geocentric coordinates
144 //! \param cigEnd Target position in geocentric coordinates
145 //! \return Heading in degrees from start to end point (0-360, clockwise from north)
146 //!
147 //! Calculates the heading in degrees from a start point to an end point.
148 //! The heading is measured clockwise from north (0-360 degrees).
149 //! This version works with arbitrary positions rather than entities.
150 double degreesToTarget(DtVector cigStart, DtVector cigEnd);
151 //! @}
152
153 //! \brief Entity lookup methods
154 //! @{
155
156 //! \brief Gets the scene object for an entity
157 //! \param uniqueId Unique identifier of the entity
158 //! \return Pointer to the scene object, or NULL if not found
159 //!
160 //! Retrieves the scene object associated with the specified entity.
161 //! The scene object provides access to the visual representation and properties
162 //! of the entity in the 3D scene.
163 makVrv::DtSceneObject* getSceneObject(makVrv::DtUniqueID uniqueId);
164
165 //! \brief Gets an entity's current heading
166 //! \param uniqueId Unique identifier of the entity
167 //! \return Heading in degrees (0-360, clockwise from north)
168 //!
169 //! Retrieves the current heading of an entity specified by its unique ID.
170 //! The heading is measured in degrees clockwise from north.
171 double getHeading(makVrv::DtUniqueID uniqueId);
172
173 //! \brief Gets a scene object's current heading
174 //! \param scnObj Pointer to the scene object
175 //! \return Heading in degrees (0-360, clockwise from north)
176 //!
177 //! Retrieves the current heading of a scene object.
178 //! The heading is measured in degrees clockwise from north.
179 double getHeading(makVrv::DtSceneObject* scnObj);
180
181 //! \brief Gets an observer's current heading
182 //! \param obs Pointer to the observer
183 //! \return Heading in degrees (0-360, clockwise from north)
184 //!
185 //! Retrieves the current heading of an observer (camera view).
186 //! The heading is measured in degrees clockwise from north.
187 double getHeading(makVrv::DtObserver* obs);
188
189 //! \brief Gets an entity's current altitude
190 //! \param uniqueId Unique identifier of the entity
191 //! \return Altitude in meters above mean sea level
192 //!
193 //! Retrieves the current altitude of an entity specified by its unique ID.
194 //! The altitude is measured in meters above mean sea level.
195 double getAltitude(makVrv::DtUniqueID uniqueId);
196
197 //! \brief Gets a scene object's current altitude
198 //! \param scnObj Pointer to the scene object
199 //! \return Altitude in meters above mean sea level
200 //!
201 //! Retrieves the current altitude of a scene object.
202 //! The altitude is measured in meters above mean sea level.
203 double getAltitude(makVrv::DtSceneObject* scnObj);
204 //! @}
205
206 //! \brief Entity identifier conversion methods
207 //! @{
208
209 //! \brief Converts marking text to a unique ID
210 //! \param markingText Entity marking text (display name)
211 //! \return Unique ID corresponding to the marking text
212 //!
213 //! Looks up the unique ID of an entity based on its marking text (display name).
214 //! Returns a null ID if no matching entity is found.
215 makVrv::DtUniqueID uniqueIdFromMarkingText(const std::string& markingText);
216
217 //! \brief Converts connection ID to a unique ID
218 //! \param connectionId Entity connection identifier
219 //! \return Unique ID corresponding to the connection ID
220 //!
221 //! Looks up the unique ID of an entity based on its connection identifier.
222 //! Returns a null ID if no matching entity is found.
223 makVrv::DtUniqueID uniqueIdFromConnectionId(const std::string& connectionId);
224
225 //! \brief Converts marking text to a connection ID
226 //! \param markingText Entity marking text (display name)
227 //! \return Connection ID corresponding to the marking text
228 //!
229 //! Looks up the connection identifier of an entity based on its marking text.
230 //! Returns an empty string if no matching entity is found.
231 std::string connectionIdFromMarkingText(const std::string& markingText);
232
233 //! \brief Converts unique ID to a connection ID
234 //! \param id Unique identifier of the entity
235 //! \return Connection ID corresponding to the unique ID
236 //!
237 //! Looks up the connection identifier of an entity based on its unique ID.
238 //! Returns an empty string if no matching entity is found.
239 std::string connectionIdFromUniqueId(makVrv::DtUniqueID id);
240
241 //! \brief Converts unique ID to marking text
242 //! \param uniqueId Unique identifier of the entity
243 //! \return Marking text (display name) corresponding to the unique ID
244 //!
245 //! Looks up the marking text (display name) of an entity based on its unique ID.
246 //! Returns an empty string if no matching entity is found.
247 std::string markingTextFromUniqueId(makVrv::DtUniqueID uniqueId);
248
249 //! \brief Converts connection ID to marking text
250 //! \param id Connection identifier of the entity
251 //! \return Marking text (display name) corresponding to the connection ID
252 //!
253 //! Looks up the marking text (display name) of an entity based on its connection ID.
254 //! Returns an empty string if no matching entity is found.
255 std::string markingTextFromConnectionId(const std::string& id);
256 //! @}
257
258 //! \brief Entity existence and property methods
259 //! @{
260
261 //! \brief Checks if an entity exists in the simulation
262 //! \param entityName Name of the entity to check
263 //! \return True if the entity exists, false otherwise
264 //!
265 //! Determines whether an entity with the specified name exists
266 //! in the current simulation. This can be used to verify an entity
267 //! before attempting to interact with it.
268 bool entityExists(const std::string& entityName);
269
270 //! \brief Gets all sensors for an entity
271 //! \param entityName Name of the entity
272 //! \return Vector of sensor names belonging to the entity
273 //!
274 //! Retrieves a list of all named published sensor objects for the
275 //! specified entity. These sensors can be used for tracking, targeting,
276 //! or other sensor-related operations.
277 std::vector<std::string> sensorsForEntity(const std::string& entityName);
278
279 //! \brief Gets the unique ID of a sensor
280 //! \param hostId Unique ID of the host entity
281 //! \param sensorName Name of the sensor
282 //! \return Unique ID of the specified sensor
283 //!
284 //! Retrieves the unique identifier for a specific sensor on a host entity.
285 //! This ID can be used for further sensor-related operations.
286 makVrv::DtUniqueID sensorUniqueId(makVrv::DtUniqueID hostId, const std::string& sensorName);
287 //! @}
288
289 //! \brief Entity sensor utilities
290 //! @{
291
292 //! \brief Response types for targeting pod queries
293 //!
294 //! Enumeration of possible states a targeting pod can be in.
296 {
297 NO_SENSOR, //!< No suitable sensor found on the entity
298 TRACK_LOCATION, //!< Sensor is tracking a location in space
299 TRACK_TARGET //!< Sensor is tracking another entity
300 };
301
302 //! \brief Gets targeting pod information for a specific sensor
303 //! \param entityName Name of the entity that owns the targeting pod
304 //! \param sensorId Unique ID of the specific sensor to query
305 //! \param trackedLocation [out] Location being tracked (valid if response is TRACK_LOCATION)
306 //! \param trackedTarget [out] Entity being tracked (valid if response is TRACK_TARGET)
307 //! \return Status of the targeting pod (NO_SENSOR, TRACK_LOCATION, or TRACK_TARGET)
308 //!
309 //! Retrieves information about what a specific targeting pod sensor is currently tracking.
310 //! Depending on the sensor's state, either trackedLocation or trackedTarget will be populated.
311 TargetingPodResponse targetingPodInfo(const std::string& entityName, makVrv::DtUniqueID sensorId,
312 DtVector& trackedLocation, makVrv::DtUniqueID& trackedTarget);
313
314 //! \brief Gets targeting pod information using the first available gimbaled sensor
315 //! \param entityName Name of the entity that owns the targeting pod
316 //! \param trackedLocation [out] Location being tracked (valid if response is TRACK_LOCATION)
317 //! \param trackedTarget [out] Entity being tracked (valid if response is TRACK_TARGET)
318 //! \return Status of the targeting pod (NO_SENSOR, TRACK_LOCATION, or TRACK_TARGET)
319 //!
320 //! Retrieves information about what the entity's first gimbaled sensor is tracking.
321 //! This is a convenience method when the specific sensor ID is not known.
322 //! Depending on the sensor's state, either trackedLocation or trackedTarget will be populated.
324 const std::string& entityName, DtVector& trackedLocation, makVrv::DtUniqueID& trackedTarget);
325
326 //! \brief Gets the tracking mode of a sensor
327 //! \param hostId Unique ID of the host entity
328 //! \param sensorId Unique ID of the sensor
329 //! \return String describing the tracking mode (e.g., "TRACK ENTITY", "TRACK LOCATION")
330 //!
331 //! Retrieves the current tracking mode of a sensor as a string.
332 //! Common values include "TRACK ENTITY", "TRACK LOCATION", and others
333 //! specific to the sensor type and configuration.
334 std::string sensorTrackingMode(makVrv::DtUniqueID hostId, makVrv::DtUniqueID sensorId);
335
336 //! \brief Gets the unique ID of a sensor's target entity
337 //! \param hostId Unique ID of the host entity
338 //! \param sensorId Unique ID of the sensor
339 //! \return Unique ID of the entity being tracked by the sensor
340 //!
341 //! Retrieves the unique identifier of the entity that the sensor
342 //! is currently tracking. Returns a null ID if the sensor is not
343 //! tracking an entity or if it's tracking a location instead.
344 makVrv::DtUniqueID sensorTargetUniqueId(makVrv::DtUniqueID hostId, makVrv::DtUniqueID sensorId);
345
346 //! \brief Gets the location a sensor is targeting
347 //! \param hostId Unique ID of the host entity
348 //! \param sensorId Unique ID of the sensor
349 //! \return Geocentric coordinates of the location being tracked
350 //!
351 //! Retrieves the geocentric coordinates of the location that
352 //! the sensor is currently tracking. If the sensor is tracking
353 //! an entity, this returns the current location of that entity.
354 DtVector sensorTargetLocation(makVrv::DtUniqueID hostId, makVrv::DtUniqueID sensorId);
355
356 //! \brief Gets the center of a sensor's view frustum
357 //! \param hostId Unique ID of the host entity
358 //! \param sensorId Unique ID of the sensor
359 //! \return Geocentric coordinates of the frustum center
360 //!
361 //! Retrieves the geocentric coordinates of the center point of the
362 //! sensor's view frustum. This represents the center of the sensor's
363 //! field of view, which may differ from its target location.
364 DtVector sensorFrustumCenter(makVrv::DtUniqueID hostId, makVrv::DtUniqueID sensorId);
365
366 //! @}
367
368 //! \brief Spatial calculation functions
369 //! @{
370
371 //! \brief Gets an entity's position and orientation
372 //! \param id Unique ID of the entity
373 //! \param position [out] Vector to receive entity's position
374 //! \param orientation [out] Orientation values to receive entity's orientation
375 //! \return True if the position and orientation were successfully retrieved
376 //!
377 //! Retrieves the current position and orientation of an entity.
378 //! The position is returned in the local coordinate system, and the
379 //! orientation is returned as Tait-Bryan angles (heading, pitch, roll).
380 bool entityPositionAndOrientation(makVrv::DtUniqueID id, DtVector& position, DtTaitBryan& orientation);
381
382 //! \brief Gets a sensor's orientation relative to its host
383 //! \param hostId Unique ID of the host entity
384 //! \param sensorId Unique ID of the sensor
385 //! \param orientation [out] Orientation values to receive sensor's orientation
386 //! \return True if the orientation was successfully retrieved
387 //!
388 //! Retrieves the current orientation of a sensor relative to its host entity.
389 //! The orientation is returned as Tait-Bryan angles (heading, pitch, roll)
390 //! in the reference frame of the host object.
391 bool sensorRefOrientation(makVrv::DtUniqueID hostId, makVrv::DtUniqueID sensorId, DtTaitBryan& orientation);
392
393 //! \brief Converts local coordinates to geodetic coordinates
394 //! \param local Vector in local coordinate system
395 //! \return Geodetic coordinates in degrees (latitude, longitude, altitude)
396 //!
397 //! Converts a position from the local coordinate system to geodetic coordinates.
398 //! The result is expressed as degrees of latitude and longitude, and altitude in meters.
399 DtVector localToGeodeticInDegrees(const DtVector& local);
400
401 //! \brief Calculates a terrain intersection point
402 //! \param localPosition Starting position in local coordinates
403 //! \param x X component of the direction quaternion
404 //! \param y Y component of the direction quaternion
405 //! \param z Z component of the direction quaternion
406 //! \param w W component of the direction quaternion
407 //! \param intersectionPoint [out] Vector to receive intersection coordinates
408 //! \return True if an intersection was found, false otherwise
409 //!
410 //! Calculates the intersection point between a ray and the terrain. The ray
411 //! starts at localPosition and extends in the direction specified by the
412 //! quaternion components (x, y, z, w). If an intersection is found, the
413 //! coordinates are stored in intersectionPoint.
415 const DtVector& localPosition, double x, double y, double z, double w, DtVector& intersectionPoint);
416
417 //! \brief Sensor tracking modes
418 //!
419 //! Enumeration of the possible tracking modes for sensors.
421 {
422 TrackEntity, //!< Sensor is tracking an entity
423 TrackLocation //!< Sensor is tracking a location
424 };
425
426 //! \brief Gets an entity's type information
427 //! \param uniqueId Unique ID of the entity
428 //! \return Entity type information
429 //!
430 //! Retrieves type information for the specified entity, including
431 //! domain, kind, country, category, subcategory, and specific data.
432 DtEntityType entityType(makVrv::DtUniqueID uniqueId);
433
434 //! \brief Gets the entity resolver being used
435 //! \return Pointer to the entity resolver
436 //!
437 //! Provides access to the entity resolver object used by this helper.
438 //! The entity resolver maps between different entity representation systems.
440
441 //! \brief Signal emitted when an entity is removed
442 //!
443 //! This signal is emitted whenever an entity is removed from the simulation.
444 //! Handlers can connect to this signal to perform cleanup or other operations
445 //! when entities are removed.
446 boost::signalslib::signal<void(makVrv::DtElementID entity)> signal_entityRemoved;
447 //! @}
448
449protected:
450 //! \brief Slot called when elements are removed
451 //! \param elements List of element IDs that were removed
452 //!
453 //! Internal handler that processes element removal notifications and
454 //! emits the signal_entityRemoved signal for each removed entity.
455 void slot_elementsRemoved(const makVrv::DtElementData::ElementIdList& elements);
456
457protected:
458 //! \brief Reference to the display engine
459 //!
460 //! Provides access to the 3D visualization and scene management system.
461 makVrv::DtDe& myDe;
462
463 //! \brief Type definition for string-to-ID mapping
464 using StringToIdMap = std::map<std::string, makVrv::DtUniqueID>;
465
466 //! \brief Mapping from marking text to unique IDs
468
469 //! \brief Mapping from connection IDs to unique IDs
471
472 //! \brief Type definition for string-to-string mapping
473 using StringToStringMap = std::map<std::string, std::string>;
474
475 //! \brief Mapping from marking text to connection IDs
477
478 //! \brief Pointer to the entity resolver
479 //!
480 //! Used to translate between different entity identifier systems.
482
483 //! \brief Pointer to the terrain intersection calculator
484 //!
485 //! Used for ray-terrain intersection calculations.
486 makVrv::DtIntersector* myIntersector;
487};
makVrv::DtIntersector * myIntersector
Pointer to the terrain intersection calculator.
Definition entityHelper.h:486
double getAltitude(makVrv::DtUniqueID uniqueId)
Gets an entity's current altitude.
SensorTrackingMode
Sensor tracking modes.
Definition entityHelper.h:421
@ TrackLocation
Sensor is tracking a location.
Definition entityHelper.h:423
@ TrackEntity
Sensor is tracking an entity.
Definition entityHelper.h:422
bool getIntersectionPoint(const DtVector &localPosition, double x, double y, double z, double w, DtVector &intersectionPoint)
Calculates a terrain intersection point.
static DtEntityHelper & instance()
Gets the singleton instance.
virtual ~DtEntityHelper()
Virtual destructor.
double getAltitude(makVrv::DtSceneObject *scnObj)
Gets a scene object's current altitude.
TargetingPodResponse targetingPodInfo(const std::string &entityName, makVrv::DtUniqueID sensorId, DtVector &trackedLocation, makVrv::DtUniqueID &trackedTarget)
Gets targeting pod information for a specific sensor.
StringToIdMap myMarkingTextToUniqueIdMap
Mapping from marking text to unique IDs.
Definition entityHelper.h:467
makVrv::DtDe & myDe
Reference to the display engine.
Definition entityHelper.h:461
StringToStringMap myMarkingTextToConnectionIdMap
Mapping from marking text to connection IDs.
Definition entityHelper.h:476
std::string sensorTrackingMode(makVrv::DtUniqueID hostId, makVrv::DtUniqueID sensorId)
Gets the tracking mode of a sensor.
DtVector lookupEntityLocation(const std::string &globalId)
Entity location methods.
makVrv::DtUniqueID sensorTargetUniqueId(makVrv::DtUniqueID hostId, makVrv::DtUniqueID sensorId)
Gets the unique ID of a sensor's target entity.
std::string markingTextFromUniqueId(makVrv::DtUniqueID uniqueId)
Converts unique ID to marking text.
TargetingPodResponse targetingPodInfo(const std::string &entityName, DtVector &trackedLocation, makVrv::DtUniqueID &trackedTarget)
Gets targeting pod information using the first available gimbaled sensor.
static bool isInitialized()
Checks if the singleton is initialized.
makVrv::DtSceneObject * getSceneObject(makVrv::DtUniqueID uniqueId)
Entity lookup methods.
std::map< std::string, std::string > StringToStringMap
Type definition for string-to-string mapping.
Definition entityHelper.h:473
DtVector sensorFrustumCenter(makVrv::DtUniqueID hostId, makVrv::DtUniqueID sensorId)
Gets the center of a sensor's view frustum.
std::map< std::string, makVrv::DtUniqueID > StringToIdMap
Type definition for string-to-ID mapping.
Definition entityHelper.h:464
makVre::DtEntityResolver * entityResolver()
Gets the entity resolver being used.
std::string connectionIdFromMarkingText(const std::string &markingText)
Converts marking text to a connection ID.
boost::signalslib::signal< void(makVrv::DtElementID entity)> signal_entityRemoved
Signal emitted when an entity is removed.
Definition entityHelper.h:446
void slot_elementsRemoved(const makVrv::DtElementData::ElementIdList &elements)
Slot called when elements are removed.
makVrv::DtUniqueID uniqueIdFromConnectionId(const std::string &connectionId)
Converts connection ID to a unique ID.
bool entityExists(const std::string &entityName)
Entity existence and property methods.
TargetingPodResponse
Entity sensor utilities.
Definition entityHelper.h:296
@ TRACK_TARGET
Sensor is tracking another entity.
Definition entityHelper.h:299
@ NO_SENSOR
No suitable sensor found on the entity.
Definition entityHelper.h:297
@ TRACK_LOCATION
Sensor is tracking a location in space.
Definition entityHelper.h:298
static void initialize(makVrv::DtDe &de, makVre::DtEntityResolver *resolver)
Initializes the singleton instance.
double degreesToTarget(makVrv::DtUniqueID uniqueId, DtVector cigEnd)
Determines the heading in degrees from an entity to a target point.
DtVector localToGeodeticInDegrees(const DtVector &local)
Converts local coordinates to geodetic coordinates.
std::vector< std::string > sensorsForEntity(const std::string &entityName)
Gets all sensors for an entity.
double getHeading(makVrv::DtObserver *obs)
Gets an observer's current heading.
bool entityPositionAndOrientation(makVrv::DtUniqueID id, DtVector &position, DtTaitBryan &orientation)
Spatial calculation functions.
DtVector lookupEntityLocation(makVrv::DtUniqueID uniqueId)
Finds an entity's location given its unique ID.
StringToIdMap myConnectionIdToUniqueIdMap
Mapping from connection IDs to unique IDs.
Definition entityHelper.h:470
double getHeading(makVrv::DtSceneObject *scnObj)
Gets a scene object's current heading.
makVrv::DtUniqueID uniqueIdFromMarkingText(const std::string &markingText)
Entity identifier conversion methods.
makVrv::DtUniqueID sensorUniqueId(makVrv::DtUniqueID hostId, const std::string &sensorName)
Gets the unique ID of a sensor.
double getHeading(makVrv::DtUniqueID uniqueId)
Gets an entity's current heading.
std::string connectionIdFromUniqueId(makVrv::DtUniqueID id)
Converts unique ID to a connection ID.
DtVector sensorTargetLocation(makVrv::DtUniqueID hostId, makVrv::DtUniqueID sensorId)
Gets the location a sensor is targeting.
DtEntityType entityType(makVrv::DtUniqueID uniqueId)
Gets an entity's type information.
bool sensorRefOrientation(makVrv::DtUniqueID hostId, makVrv::DtUniqueID sensorId, DtTaitBryan &orientation)
Gets a sensor's orientation relative to its host.
makVre::DtEntityResolver * myEntityResolver
Pointer to the entity resolver.
Definition entityHelper.h:481
double degreesToTarget(DtVector cigStart, DtVector cigEnd)
Determines the heading in degrees between two points.
std::string markingTextFromConnectionId(const std::string &id)
Converts connection ID to marking text.
DtQuaternion orientToVector(DtVector cigStart, DtVector cigEnd)
Orientation calculation methods.
DtEntityHelper(makVrv::DtDe &de, makVre::DtEntityResolver *resolver)
Constructor.
double degreesToTarget(std::string &globalId, DtVector cigEnd)
Determines the heading in degrees from an entity to a target point.
Entity resolution and mapping system.
Definition entityResolver.h:52
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
Definition appLauncherComponent.h:28
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.