VR-Engage  2.2
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]

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
 

Protected Attributes

DtVector myCachedPosition
 

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.

◆ 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.

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.


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