VR-Engage  2.3
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 makVre::DtInitTickStatus finalizeInitTick (double dt) 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 ()
 
bool componentReady () const
 
void setComponentReady (bool ready)
 
virtual void setName (const std::string &name)
 
virtual const std::string & name ()
 
virtual DtPlayerStation & player ()
 
virtual DtAttributeHandle & playerAttributeStore ()
 
virtual const DtAttributeHandle & playerAttributeStore () const
 
virtual const DtAttributeHandle & ownshipState () const
 
virtual void setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId())
 

Protected Attributes

std::string myOwnshipMarkingText
 
makVrv::DtObserver * myMainWindowObserver
 
makVrv::DtUniqueID myPlayerElementID
 
makVrv::DtObserverObject::AttachType myAttachType
 
DtVector myAttachedOffset
 
DtTaitBryan myOriOffset
 
makVre::DtSettingsOverrideGuard mySettingsOverrideGuard
 
bool myResetMainWindowSensorMode
 
bool myUsingSavedView
 
bool myShowModel
 
makVre::DtAttributeHandleType< DtDamageState > myDamageStateAttr
 
makVre::DtAttributeHandleType< bool > myMimicOffsetAttr
 
makVre::DtAttributeHandleType< bool > myRealCockpitAttr
 
- Protected Attributes inherited from makVre::DtObserverUpdater
makVre::DtInstrumentPanelManager * myInstrumentPanelManager
 
ChannelConfigMap myChannelsToUpdate
 
bool myForceChannelUpdate
 
double myVerticalFOV
 
double myHorizontalFOV
 
makVrv::DtWindow * myWindow
 
- Protected Attributes inherited from makVre::DtPlayerComponent
bool myComponentReady = true
 
std::string myName
 
DtInitTable myConfig
 
DtPlayerStation * myPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolver * myResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 
DtVreMessageHandlerGroup myMessageHandlers
 

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().

◆ finalizeInitTick()

virtual makVre::DtInitTickStatus DtPilotObserverUpdater::finalizeInitTick ( double dt)
overridevirtual

Called after postInitialize() to complete one-time observer setup.

Parameters
dtDelta time since the last frame in seconds
Returns
Ready once mimic attachment and terrain signal are sent

Sets the observer to mimic attach mode and re-sends the ocean height map resolution to ensure correct terrain realization. Runs during the LOADING_PLAYER_STATE phase before the engaged tick loop.

Reimplemented from makVre::DtPlayerComponent.

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

◆ mySettingsOverrideGuard

makVre::DtSettingsOverrideGuard DtPilotObserverUpdater::mySettingsOverrideGuard
protected

Tracks temporary laser designator settings applied by this component.

◆ myResetMainWindowSensorMode

bool DtPilotObserverUpdater::myResetMainWindowSensorMode
protected

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

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

◆ myDamageStateAttr

makVre::DtAttributeHandleType<DtDamageState> DtPilotObserverUpdater::myDamageStateAttr
protected

Attribute handle storing the ownship's current damage state.

Attribute Store Keyownship.damageState

◆ myMimicOffsetAttr

makVre::DtAttributeHandleType<bool> DtPilotObserverUpdater::myMimicOffsetAttr
protected

Attribute handle indicating whether the mimic offset mode is active.

Attribute Store KeymimicOffset

◆ myRealCockpitAttr

makVre::DtAttributeHandleType<bool> DtPilotObserverUpdater::myRealCockpitAttr
protected

Attribute handle indicating whether the real cockpit model should be displayed.

Attribute Store KeyrealCockpit

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