|
VR-Engage
2.2
|
DtBinocularsLasingOverlay extends the basic binoculars overlay with laser ranging capabilities, providing measurement and display of target location, elevation, azimuth, and range information. It updates formatted display values for sensor location, target data, and north reference settings. The overlay maintains target data for a configurable period after lasing stops.
#include <vreBinocularsLasingOverlay.h>
Public Member Functions | |
| DtBinocularsLasingOverlay () | |
| virtual | ~DtBinocularsLasingOverlay () override |
| virtual bool | initialize (makVre::DtPlayerStation *player, makVre::DtInitTable &config) override |
| virtual void | shutdown () override |
| virtual const char * | type () const override |
| virtual bool | postInitialize () override |
| virtual void | tick (double dt) override |
| virtual bool | isOverlayVisible () override |
Public Member Functions inherited from makVre::DtBinocularsOverlay | |
| DtBinocularsOverlay (const std::string &className="DtBinocularsOverlay") | |
| virtual | ~DtBinocularsOverlay () override |
| void | setReticleHeight (float height) |
| void | setVisible (bool visible) |
Public Member Functions inherited from makVre::DtQtQuickOverlay | |
| DtQtQuickOverlay () | |
| virtual | ~DtQtQuickOverlay () override |
| virtual void | setRoot (QQuickItem *root) |
| virtual void | initdoc (QQuickItem *root) |
| virtual DtVreMessageResult | handleEnterPlayerState (DtVreMessage *msg) |
| virtual DtVreMessageResult | handleExitPlayerState (DtVreMessage *msg) |
| virtual void | setVisibility (bool visible) |
| virtual bool | isVisible () |
| virtual void | setMenuState (bool on) |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Member Functions | |
| virtual makVre::DtVreMessageResult | handleStopLasingMessage (makVre::DtVreMessage *msg) |
| virtual void | updateSensorData () |
| virtual void | updateNorthReference () |
| virtual void | updateTimeOfTargetLocation () |
| virtual void | updateTargetData () |
| virtual std::string | timeString () |
| virtual void | clearTargetData () |
| virtual void | calculateElevationAndAzimuthToTarget (const DtVector &geocentricObserverLocation, const DtVector &geocentricIntersectionPoint, double *targetElevation, double *targetAzimuth) |
Protected Member Functions inherited from makVre::DtBinocularsOverlay | |
| virtual void | computeReticleDimensions () |
| virtual void | slot_channelConfigurationModified (const std::string &deName, const std::string &winName, const std::string &oldChannelName, const makVrv::DtChannelConfiguration &config) |
| virtual void | slot_channelDestroyed (makVrv::DtChannelManager *channelManager, makVrv::DtChannel *channel) |
Protected Member Functions inherited from makVre::DtQtQuickOverlay | |
| virtual void | updateVals (double dt) |
| virtual void | disconnect () |
| virtual bool | buildConnections (DtInitTable &connections) |
| virtual void | onVisibilityAttributeChanged (bool on) |
| virtual void | removeModelSetAndSkyFromChannel () |
| virtual void | restoreModelSetAndSkyToChannel () |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
| makVre::DtBinocularsLasingOverlay::DtBinocularsLasingOverlay | ( | ) |
Constructor for DtBinocularsLasingOverlay.
Initializes the component with default settings
|
overridevirtual |
Virtual destructor for DtBinocularsLasingOverlay.
Cleans up resources including the intersector object
|
overridevirtual |
Initializes the binoculars lasing overlay component.
| player | Pointer to the player station this component belongs to |
| config | Configuration table containing overlay settings |
Sets up the intersector, initializes attribute state values, and registers message handlers
Reimplemented from makVre::DtBinocularsOverlay.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Shuts down the binoculars lasing overlay component.
Removes message handlers and performs base class shutdown
Reimplemented from makVre::DtBinocularsOverlay.
|
overridevirtual |
Returns the type identifier for this component.
Reimplemented from makVre::DtBinocularsOverlay.
|
overridevirtual |
Performs post-initialization after all components are initialized.
Configures VR-specific settings if necessary
Reimplemented from makVre::DtBinocularsOverlay.
|
overridevirtual |
Called every frame to update the overlay state.
| dt | Delta time since the last frame in seconds |
Updates current time, sensor data, north reference, target data, and handles target data expiration if necessary
Reimplemented from makVre::DtBinocularsOverlay.
|
overridevirtual |
Determines if the overlay should be visible.
Checks menu state, base overlay visibility, and laser availability to determine if the overlay should be displayed
Reimplemented from makVre::DtBinocularsOverlay.
|
protectedvirtual |
Handles stop lasing messages.
| msg | Stop lasing message |
Sets target data to expire 30 seconds after lasing stops
|
protectedvirtual |
Updates sensor location and elevation attributes.
Updates the following attributes:
|
protectedvirtual |
Updates the north reference attribute.
Updates lasing.northReference.formatted attribute with current north reference setting ("MAG", "TRUE", or "GRID")
|
protectedvirtual |
Updates the time of target location attribute.
Updates lasing.timeOfTargetLocation.formatted attribute with current time in HH:MM:SS format
|
protectedvirtual |
Updates all target-related attributes based on current lasing state.
Updates the following attributes when lasing is active:
|
protectedvirtual |
Generates a formatted time string for the current time.
|
protectedvirtual |
Sets all target data attributes to null or default values.
Resets all target-related attributes to their default state when target data expires or becomes invalid
|
protectedvirtual |
Calculates elevation and azimuth from observer to target.
| geocentricObserverLocation | Observer position in geocentric coordinates |
| geocentricIntersectionPoint | Target position in geocentric coordinates |
| targetElevation | Pointer to store calculated elevation angle in radians |
| targetAzimuth | Pointer to store calculated azimuth angle in radians |
Transforms positions to topocentric coordinates and calculates elevation and azimuth angles, considering the current north reference setting
|
protected |
Current simulation time in seconds.
|
protected |
Time when observer-to-target distance was last calculated.
|
protected |
Time when target data will expire.
|
protected |
Intersector for performing raycasting to determine target position.
|
protected |
Last known north units setting for detecting changes.
|
protected |
Last known local ownship position for detecting changes.
|
protected |
Last known geocentric position of laser intersection point.
|
protected |