VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::DtVreSensorFieldOfViewManager Class Reference

Detailed Description

DtVreSensorFieldOfViewManager extends the base DtSensorFieldOfViewManager to provide VR-Engage-specific behavior for managing sensor field of view states and the observers associated with them. This includes handling target object position updates, processing tracked locations, managing sensor view windows, and finding appropriate display windows and channels for sensor views.

#include <DtVreSensorFieldOfViewManager.h>

Inheritance diagram for makVre::DtVreSensorFieldOfViewManager:
[legend]

Classes

struct  DtPitchRollStabilizationState
 

Public Member Functions

virtual ~DtVreSensorFieldOfViewManager () override
 
 DtVreSensorFieldOfViewManager (makVrv::DtDe &de)
 
virtual makVre::DtVreMessageResult handleTargetObjectPosition (makVre::DtVreMessage *msg)
 
virtual void update (makVrv::DtUniqueID hostId, makVrv::DtUniqueID sensorId, const std::string &observerName) override
 
virtual void processTrackLocation (makVrv::DtObserver *observer, makVrv::DtElementID hostEntity, const DtVector &relativeLocation, const DtVector &targetLocation) override
 
virtual bool findDisplayWindowAndChannel (const makVrv::DtObserver *observer, std::string &displayName, std::string &windowName, std::string &channelName) const override
 
virtual void removeSensorView (makVrv::DtUniqueID entId, makVrv::DtUniqueID sensorId) override
 
virtual void addSensorObserver (const std::string &observerName, makVrv::DtElementID hostId, makVrv::DtElementID sensorId, bool createControls) override
 
virtual void disableObserverSeeding (makVrv::DtElementID hostId, makVrv::DtElementID sensorId)
 

Protected Member Functions

virtual void clearStabilization (const HostAndSensorId &hostAndSensor)
 
virtual DtPitchRollStabilizationState & pitchRollStabilizationState (const HostAndSensorId &hostAndSensor, makVrv::DtUniqueID hostId)
 
virtual DtPitchRollStabilizationState & suspendStabilizationForTracking (const HostAndSensorId &hostAndSensor, makVrv::DtUniqueID hostId)
 
virtual bool trackRollLevel (makVrv::DtObserver *observer, const HostAndSensorId &hostAndSensor, makVrv::DtUniqueID hostId, makVrv::DtUniqueID fovHostId, const DtVector &relativeLocation, const DtVector &targetNetPosition)
 
virtual bool updateTrackingView (makVrv::DtObserver *observer, const HostAndSensorId &hostAndSensor, makVrv::DtUniqueID hostId, makVrv::DtUniqueID fovHostId, const DtVector &relativeLocation, makVrv::DtUniqueID targetId, const DtVector &targetLocation, const std::string &trackingMode)
 
virtual void initializeStabilizationState (makVrv::DtObserver *observer, double hostTopoYaw, double fovRelativeYaw, double fovRelativePitch, double fovRelativeRoll, DtPitchRollStabilizationState &state)
 
virtual void advanceStabilizationState (double fovRelativeYaw, double fovRelativePitch, DtPitchRollStabilizationState &state)
 
virtual void updateStabilizedView (makVrv::DtObserver *observer, const HostAndSensorId &hostAndSensor, makVrv::DtUniqueID hostId, makVrv::DtUniqueID fovHostId, const DtVector &relativeLocation, double fovRelativeYaw, double fovRelativePitch, double fovRelativeRoll)
 

Protected Attributes

DtVector myCachedPosition
 
std::map< HostAndSensorId, DtPitchRollStabilizationState > myPitchRollStabilization
 
std::set< HostAndSensorId > myObserverSeedingDisabled
 

Constructor & Destructor Documentation

◆ ~DtVreSensorFieldOfViewManager()

virtual makVre::DtVreSensorFieldOfViewManager::~DtVreSensorFieldOfViewManager ( )
overridevirtual

Destructor.

Cleans up resources used by the sensor field of view manager.

◆ DtVreSensorFieldOfViewManager()

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

Constructor.

Parameters
deReference to the display engine

Creates a new sensor field of view manager associated with the specified display engine. This constructor is technically protected, as instances should be created through the instance() factory method.

References de().

Member Function Documentation

◆ handleTargetObjectPosition()

virtual makVre::DtVreMessageResult makVre::DtVreSensorFieldOfViewManager::handleTargetObjectPosition ( makVre::DtVreMessage * msg)
virtual

Handles target object position messages.

Parameters
msgPointer to the target object position message
Returns
Message processing result

Processes messages containing target object position updates. Updates the cached position and may trigger sensor view updates.

◆ update()

virtual void makVre::DtVreSensorFieldOfViewManager::update ( makVrv::DtUniqueID hostId,
makVrv::DtUniqueID sensorId,
const std::string & observerName )
overridevirtual

Updates sensor field of view state for a specific sensor.

Parameters
hostIdUnique ID of the host entity
sensorIdUnique ID of the sensor
observerNameName of the observer to update

Updates the sensor field of view state for the specified sensor, which may involve creating or updating sensor views and observers. Overridden to provide VR-Engage-specific update behavior. Handles observer cleanup, target tracking, stabilized orientation, zoom, and overlay refresh as separate steps.

◆ processTrackLocation()

virtual void makVre::DtVreSensorFieldOfViewManager::processTrackLocation ( makVrv::DtObserver * observer,
makVrv::DtElementID hostEntity,
const DtVector & relativeLocation,
const DtVector & targetLocation )
overridevirtual

Processes the location of a tracked target.

Parameters
observerPointer to the observer
hostEntityElement ID of the host entity
relativeLocationRelative location of the tracked target from the host
targetLocationAbsolute location of the tracked target

Processes the location of a tracked target relative to the host entity. This method is overridden to make it public, allowing VR-Engage systems to directly process track locations when needed.

◆ findDisplayWindowAndChannel()

virtual bool makVre::DtVreSensorFieldOfViewManager::findDisplayWindowAndChannel ( const makVrv::DtObserver * observer,
std::string & displayName,
std::string & windowName,
std::string & channelName ) const
overridevirtual

Finds the display window and channel for an observer.

Parameters
observerPointer to the observer
displayNameOutput parameter for the display name
windowNameOutput parameter for the window name
channelNameOutput parameter for the channel name
Returns
True if a display window and channel were found, false otherwise

Finds the appropriate display window and channel for the specified observer. This method is overridden to make it public, allowing VR-Engage systems to directly find display windows and channels when needed.

◆ removeSensorView()

virtual void makVre::DtVreSensorFieldOfViewManager::removeSensorView ( makVrv::DtUniqueID entId,
makVrv::DtUniqueID sensorId )
overridevirtual

Removes a sensor view window.

Parameters
entIdUnique ID of the entity
sensorIdUnique ID of the sensor

Removes a sensor view window that has been created for the specified entity and sensor. This method is overridden because the base class implementation attempts to delete the window as well, which would also delete channels associated with it. The VR-Engage implementation provides a safer approach that avoids unintended channel deletion.

◆ addSensorObserver()

virtual void makVre::DtVreSensorFieldOfViewManager::addSensorObserver ( const std::string & observerName,
makVrv::DtElementID hostId,
makVrv::DtElementID sensorId,
bool createControls )
overridevirtual

Adds a sensor observer and registers updates on signal_preObserverUpdate.

Parameters
observerNameName of the observer
hostIdElement ID of the host entity
sensorIdElement ID of the sensor
createControlsUnused; forwarded to the base class

The base class updates on signal_postUpdate, after observers are positioned, which makes stabilized views lag the host by one frame.

◆ disableObserverSeeding()

virtual void makVre::DtVreSensorFieldOfViewManager::disableObserverSeeding ( makVrv::DtElementID hostId,
makVrv::DtElementID sensorId )
virtual

Starts the sensor's stabilized view from the gimbal angles instead of the observer's pose.

Parameters
hostIdElement ID of the host entity
sensorIdElement ID of the sensor

Use for observers created for the view, which have no meaningful pose until their first update.

◆ clearStabilization()

virtual void makVre::DtVreSensorFieldOfViewManager::clearStabilization ( const HostAndSensorId & hostAndSensor)
protectedvirtual

Removes cached stabilization state for one host and sensor.

◆ pitchRollStabilizationState()

virtual DtPitchRollStabilizationState & makVre::DtVreSensorFieldOfViewManager::pitchRollStabilizationState ( const HostAndSensorId & hostAndSensor,
makVrv::DtUniqueID hostId )
protectedvirtual

Returns the stabilization state for a sensor, creating it from player settings if needed.

◆ suspendStabilizationForTracking()

virtual DtPitchRollStabilizationState & makVre::DtVreSensorFieldOfViewManager::suspendStabilizationForTracking ( const HostAndSensorId & hostAndSensor,
makVrv::DtUniqueID hostId )
protectedvirtual

Prepares stabilization state for a frame in which the observer tracks a target.

◆ trackRollLevel()

virtual bool makVre::DtVreSensorFieldOfViewManager::trackRollLevel ( makVrv::DtObserver * observer,
const HostAndSensorId & hostAndSensor,
makVrv::DtUniqueID hostId,
makVrv::DtUniqueID fovHostId,
const DtVector & relativeLocation,
const DtVector & targetNetPosition )
protectedvirtual

Aims a stabilized observer at a world-space target with zero roll.

◆ updateTrackingView()

virtual bool makVre::DtVreSensorFieldOfViewManager::updateTrackingView ( makVrv::DtObserver * observer,
const HostAndSensorId & hostAndSensor,
makVrv::DtUniqueID hostId,
makVrv::DtUniqueID fovHostId,
const DtVector & relativeLocation,
makVrv::DtUniqueID targetId,
const DtVector & targetLocation,
const std::string & trackingMode )
protectedvirtual

Resolves and applies the current tracked target, including cached-target fallback.

Returns
True if target handling owns this frame and stabilized-view processing should not run.

◆ initializeStabilizationState()

virtual void makVre::DtVreSensorFieldOfViewManager::initializeStabilizationState ( makVrv::DtObserver * observer,
double hostTopoYaw,
double fovRelativeYaw,
double fovRelativePitch,
double fovRelativeRoll,
DtPitchRollStabilizationState & state )
protectedvirtual

Seeds stabilized angles from the sensor, prior target view, or initial observer pose.

◆ advanceStabilizationState()

virtual void makVre::DtVreSensorFieldOfViewManager::advanceStabilizationState ( double fovRelativeYaw,
double fovRelativePitch,
DtPitchRollStabilizationState & state )
protectedvirtual

Advances stabilized angles using sensor movement and tracking-resume settling.

◆ updateStabilizedView()

virtual void makVre::DtVreSensorFieldOfViewManager::updateStabilizedView ( makVrv::DtObserver * observer,
const HostAndSensorId & hostAndSensor,
makVrv::DtUniqueID hostId,
makVrv::DtUniqueID fovHostId,
const DtVector & relativeLocation,
double fovRelativeYaw,
double fovRelativePitch,
double fovRelativeRoll )
protectedvirtual

Applies horizon-relative pitch/roll stabilization when no target is being tracked.

Member Data Documentation

◆ myCachedPosition

DtVector makVre::DtVreSensorFieldOfViewManager::myCachedPosition
protected

Cached position of the last tracked target.

Stores the position of the last tracked target for use in subsequent calculations or updates. This avoids redundant position calculations or lookups when the same target is being processed multiple times.

◆ myPitchRollStabilization

std::map<HostAndSensorId, DtPitchRollStabilizationState> makVre::DtVreSensorFieldOfViewManager::myPitchRollStabilization
protected

◆ myObserverSeedingDisabled

std::set<HostAndSensorId> makVre::DtVreSensorFieldOfViewManager::myObserverSeedingDisabled
protected

Sensors whose stabilization state must not be seeded from the observer pose.


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