VR-Engage  2.2
Loading...
Searching...
No Matches
DtPilotObserverUpdater Class Reference

Detailed Description

DtPilotObserverUpdater manages the observer (camera) behavior for the pilot role, including handling different view modes, cockpit views, and external aircraft views. It handles positioning, orientation, and updates of the observer based on the aircraft state and pilot inputs.

#include <pilotObserverUpdater.h>

Inheritance diagram for DtPilotObserverUpdater:
[legend]

Classes

struct  InstrumentPanel
 

Public Member Functions

 DtPilotObserverUpdater ()
 
virtual ~DtPilotObserverUpdater () override
 
virtual bool initialize (makVre::DtPlayerStation *player, makVre::DtInitTable &config) override
 
virtual void tick (double dt) override
 
virtual void shutdown () override
 
virtual const char * type () const override
 
- Public Member Functions inherited from makVre::DtObserverUpdater
 DtObserverUpdater ()
 
virtual ~DtObserverUpdater () override
 
virtual bool postInitialize () override
 
virtual void addChannelToUpdate (const std::string &windowName, const std::string &channelName)
 
virtual void removeChannelToUpdate (const std::string &windowName, const std::string &channelName, bool restoreInitialSettings=true)
 
- Public Member Functions inherited from makVre::DtPlayerComponent
 DtPlayerComponent ()
 
virtual ~DtPlayerComponent ()
 
virtual void setName (const std::string &name)
 
virtual const std::string & name ()
 
virtual DtPlayerStationplayer ()
 
virtual DtAttributeHandleplayerAttributeStore ()
 
virtual const DtAttributeHandleplayerAttributeStore () const
 

Protected Attributes

std::string myOwnshipMarkingText
 
makVrv::DtObserver * myMainWindowObserver
 
makVrv::DtUniqueID myPlayerElementID
 
makVrv::DtObserverObject::AttachType myAttachType
 
DtVector myAttachedOffset
 
DtTaitBryan myOriOffset
 
float mySmoothingPeriod
 
float myOldSmoothingPeriod
 
bool myRotateEntitySymbols
 
bool myOldRotateEntitySymbols
 
bool myOldLaserDesignator
 
bool myResetMainWindowSensorMode
 
int myTickCount
 
bool myUsingSavedView
 
bool myShowModel
 
- Protected Attributes inherited from makVre::DtObserverUpdater
makVre::DtInstrumentPanelManagermyInstrumentPanelManager
 
ChannelConfigMap myChannelsToUpdate
 
bool myForceChannelUpdate
 
double myVerticalFOV
 
double myHorizontalFOV
 
makVrv::DtWindow * myWindow
 
- Protected Attributes inherited from makVre::DtPlayerComponent
std::string myName
 
DtInitTable myConfig
 
DtPlayerStationmyPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolvermyResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 

Additional Inherited Members

- Protected Types inherited from makVre::DtObserverUpdater
using WindowAndChannelName = std::pair<std::string, std::string>
 
using ChannelConfigMap = std::map<WindowAndChannelName, makVrv::DtChannelConfiguration>
 
- Protected Member Functions inherited from makVre::DtObserverUpdater
virtual void initializeStateAttributes () override
 
virtual void onSensorModeChanged (std::string sensorMode)
 
virtual void onObserverModeChanged (std::string observerMode)
 
virtual void addDefaultChannels ()
 
virtual void addVrChannels ()
 
virtual bool findChannelConfiguration (const std::string &windowName, const std::string &channelName, makVrv::DtChannelConfiguration &config)
 
virtual void updateAllChannels ()
 
virtual void setShowCockpits (bool show)
 
virtual bool applyConfigurationToChannel (const std::string &windowName, const std::string &channelName, const makVrv::DtChannelConfiguration &newConfig)
 
bool firstWindowAndChannelNames (std::string &windowName, std::string &channelName)
 
virtual void updateStateAttributes ()
 

Constructor & Destructor Documentation

◆ DtPilotObserverUpdater()

DtPilotObserverUpdater::DtPilotObserverUpdater ( )

Default constructor.

◆ ~DtPilotObserverUpdater()

virtual DtPilotObserverUpdater::~DtPilotObserverUpdater ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ initialize()

virtual bool DtPilotObserverUpdater::initialize ( makVre::DtPlayerStation * player,
makVre::DtInitTable & config )
overridevirtual

Initializes the observer updater component.

Parameters
playerPointer to the player station
configConfiguration settings for initialization
Returns
True if initialization was successful, false otherwise

Reimplemented from makVre::DtObserverUpdater.

References makVre::DtPlayerComponent::player().

◆ tick()

virtual void DtPilotObserverUpdater::tick ( double dt)
overridevirtual

Updates the observer for the current frame.

Parameters
dtDelta time since the last frame in seconds

Reimplemented from makVre::DtObserverUpdater.

◆ shutdown()

virtual void DtPilotObserverUpdater::shutdown ( )
overridevirtual

Cleans up resources when the component is being shut down.

Reimplemented from makVre::DtObserverUpdater.

◆ type()

virtual const char * DtPilotObserverUpdater::type ( ) const
overridevirtual

Returns the component type identifier.

Returns
The component type string

Reimplemented from makVre::DtObserverUpdater.

Member Data Documentation

◆ myOwnshipMarkingText

std::string DtPilotObserverUpdater::myOwnshipMarkingText
protected

Marking text for the ownship aircraft.

◆ myMainWindowObserver

makVrv::DtObserver* DtPilotObserverUpdater::myMainWindowObserver
protected

Pointer to the main window observer.

◆ myPlayerElementID

makVrv::DtUniqueID DtPilotObserverUpdater::myPlayerElementID
protected

Unique ID of the player element.

◆ myAttachType

makVrv::DtObserverObject::AttachType DtPilotObserverUpdater::myAttachType
protected

Type of attachment for the observer.

◆ myAttachedOffset

DtVector DtPilotObserverUpdater::myAttachedOffset
protected

Offset position for attached observer.

◆ myOriOffset

DtTaitBryan DtPilotObserverUpdater::myOriOffset
protected

Orientation offset for the observer.

◆ mySmoothingPeriod

float DtPilotObserverUpdater::mySmoothingPeriod
protected

Current smoothing period for view transitions.

◆ myOldSmoothingPeriod

float DtPilotObserverUpdater::myOldSmoothingPeriod
protected

Previous smoothing period value.

◆ myRotateEntitySymbols

bool DtPilotObserverUpdater::myRotateEntitySymbols
protected

Flag indicating if entity symbols should rotate.

◆ myOldRotateEntitySymbols

bool DtPilotObserverUpdater::myOldRotateEntitySymbols
protected

Previous entity symbols rotation setting.

◆ myOldLaserDesignator

bool DtPilotObserverUpdater::myOldLaserDesignator
protected

Previous laser designator setting.

◆ myResetMainWindowSensorMode

bool DtPilotObserverUpdater::myResetMainWindowSensorMode
protected

Flag indicating if main window sensor mode needs to be reset.

◆ myTickCount

int DtPilotObserverUpdater::myTickCount
protected

Count of update ticks since initialization.

◆ myUsingSavedView

bool DtPilotObserverUpdater::myUsingSavedView
protected

Flag indicating if a saved view is being used.

◆ myShowModel

bool DtPilotObserverUpdater::myShowModel
protected

Flag indicating if the aircraft model should be shown.


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