VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtPilotRenderUpdater Class Reference

Detailed Description

DtPilotRenderUpdater handles render-to-texture (RTT) channels and channel configurations for aircraft cockpit displays and instruments. It manages cockpit model initialization, instrument panel updates, and HUD elements.

#include <pilotRenderUpdater.h>

Inheritance diagram for makVre::DtPilotRenderUpdater:
[legend]

Classes

struct  VisionBlockGeometry
 

Public Member Functions

 DtPilotRenderUpdater ()
 
virtual ~DtPilotRenderUpdater () override
 
virtual bool initialize (DtPlayerStation *player, DtInitTable &config) override
 
virtual bool postInitialize () override
 
virtual void tick (double dt) override
 
virtual void shutdown () override
 
virtual const char * type () const override
 
virtual DtVreMessageResult handleRenderTextureInitialized (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSensorData (DtVreMessage *msg)
 
- 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
 

Static Public Member Functions

static unsigned int overrideChannelCameraMask (makVrv::DtChannel *channel, unsigned int mask)
 

Protected Member Functions

virtual int initRenderTexturesFor (makVrv::DtModelInstance *modelInstance)
 
virtual bool replaceRttTexturesOn (makVrv::DtSceneObject *so, DtCameraStruct *cameraStruct)
 
virtual bool enableRttEffectTexture (DtCameraStruct *cameraStruct, bool addToList=true)
 
virtual void disableRttEffectTextures ()
 
virtual bool initCockpitObjects ()
 
virtual void destroyCockpitObjects ()
 
virtual bool initOwnshipOnlyRender ()
 
virtual void undoOwnshipOnlyRender ()
 
virtual void updateVisionBlockObservers ()
 
virtual void onVrStateChanged (bool enabled)
 
virtual void slot_channelModified (const std::string &deName, const std::string &winName, const std::string &channelName, const makVrv::DtChannelConfiguration &config)
 
virtual void initRealCockpit ()
 
virtual void updateHudContacts ()
 
- Protected Member Functions inherited from makVre::DtPlayerComponent
virtual void initializeStateAttributes ()
 

Protected Attributes

DtInstrumentPanelManagermyInstrumentPanelManager
 
std::string myMarkingText
 
const makVrv::DtModelDefinition * myCockpitModelDef
 
makVrv::DtArticulatedModelAgent * myCockpitModelAgent
 
makVrv::DtSceneObjectAgent * myCockpitSceneObjectAgent
 
DtSceneObjectMimicUpdaterAgentmyCockpitUpdaterAgent
 
bool myCockpitObjectsInitialized
 
bool myCockpitModelsInitialized
 
std::map< std::string, DtInitTablemyRttDefs
 
makVrv::DtSceneObject * myOwnshipSceneObject
 
bool myRenderModelOnly
 
bool myWantOwnshipOnly
 
bool myMadeOwnshipOnly
 
bool myDidOwnshipInVR
 
osg::ref_ptr< makVrv::DtChannelSpecificGroup > myOwnshipNode
 
unsigned int mySavedSkyMask
 
unsigned int mySavedCloudMask
 
unsigned int mySavedCameraMask
 
unsigned int myOwnshipMaskBit
 
makVrv::DtOsgObserverObject * myOsgObserver
 
std::list< std::pair< VisionBlockGeometry, DtCameraStruct * > > myVisionBlocks
 
std::vector< DtCameraStruct * > myEffectTextures
 
std::vector< SensorDataMessage::SensorContactmySensorContacts
 
- Protected Attributes inherited from makVre::DtPlayerComponent
std::string myName
 
DtInitTable myConfig
 
DtPlayerStationmyPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolvermyResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 

Constructor & Destructor Documentation

◆ DtPilotRenderUpdater()

makVre::DtPilotRenderUpdater::DtPilotRenderUpdater ( )

Default constructor.

◆ ~DtPilotRenderUpdater()

virtual makVre::DtPilotRenderUpdater::~DtPilotRenderUpdater ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ initialize()

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

Initializes the render updater component.

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

Reimplemented from makVre::DtPlayerComponent.

References makVre::DtPlayerComponent::player().

◆ postInitialize()

virtual bool makVre::DtPilotRenderUpdater::postInitialize ( )
overridevirtual

Performs post-initialization setup.

Returns
True if post-initialization was successful, false otherwise

Reimplemented from makVre::DtPlayerComponent.

◆ tick()

virtual void makVre::DtPilotRenderUpdater::tick ( double dt)
overridevirtual

Updates rendering elements for the current frame.

Parameters
dtDelta time since the last frame in seconds

Implements makVre::DtPlayerComponent.

◆ shutdown()

virtual void makVre::DtPilotRenderUpdater::shutdown ( )
overridevirtual

Cleans up resources when the component is being shut down.

Reimplemented from makVre::DtPlayerComponent.

◆ type()

virtual const char * makVre::DtPilotRenderUpdater::type ( ) const
overridevirtual

Returns the component type identifier.

Returns
String identifier for this component type

Returns the type identifier string for this component, which is used by the VR-Engage framework for component identification and management. The returned value matches DtPilotRenderUpdaterType.

Implements makVre::DtPlayerComponent.

◆ handleRenderTextureInitialized()

virtual DtVreMessageResult makVre::DtPilotRenderUpdater::handleRenderTextureInitialized ( DtVreMessage * msg)
virtual

Handles render texture initialized messages.

Parameters
msgPointer to the message being processed
Returns
Message processing result

◆ handleSensorData()

virtual DtVreMessageResult makVre::DtPilotRenderUpdater::handleSensorData ( DtVreMessage * msg)
virtual

Handles sensor data messages.

Parameters
msgPointer to the message being processed
Returns
Message processing result

Caches sensor contacts, so tick can convert to screen coordinates for the HUD.

◆ overrideChannelCameraMask()

static unsigned int makVre::DtPilotRenderUpdater::overrideChannelCameraMask ( makVrv::DtChannel * channel,
unsigned int mask )
static

Overrides the camera mask for a channel.

Parameters
channelPointer to the channel to override
maskNew camera mask to apply
Returns
The original camera mask

◆ initRenderTexturesFor()

virtual int makVre::DtPilotRenderUpdater::initRenderTexturesFor ( makVrv::DtModelInstance * modelInstance)
protectedvirtual

Initializes render textures for a model instance.

Parameters
modelInstancePointer to the model instance
Returns
Number of render textures initialized

◆ replaceRttTexturesOn()

virtual bool makVre::DtPilotRenderUpdater::replaceRttTexturesOn ( makVrv::DtSceneObject * so,
DtCameraStruct * cameraStruct )
protectedvirtual

Replaces RTT textures on a scene object.

Parameters
soPointer to the scene object
cameraStructPointer to the camera structure
Returns
True if textures were replaced successfully, false otherwise

◆ enableRttEffectTexture()

virtual bool makVre::DtPilotRenderUpdater::enableRttEffectTexture ( DtCameraStruct * cameraStruct,
bool addToList = true )
protectedvirtual

Enables RTT effect texture for texture swapping.

Parameters
cameraStructPointer to the camera structure
addToListFlag indicating whether to add the texture to the effect textures list
Returns
True if the texture was enabled successfully, false otherwise

◆ disableRttEffectTextures()

virtual void makVre::DtPilotRenderUpdater::disableRttEffectTextures ( )
protectedvirtual

Turns off the RTT effect textures and restores the original textures.

◆ initCockpitObjects()

virtual bool makVre::DtPilotRenderUpdater::initCockpitObjects ( )
protectedvirtual

Initializes cockpit objects.

Returns
True if initialization was successful, false otherwise

Called during tick. Maps RTT texture indices to elements in the 3D model.

◆ destroyCockpitObjects()

virtual void makVre::DtPilotRenderUpdater::destroyCockpitObjects ( )
protectedvirtual

Destroys cockpit objects and releases resources.

◆ initOwnshipOnlyRender()

virtual bool makVre::DtPilotRenderUpdater::initOwnshipOnlyRender ( )
protectedvirtual

Initializes ownship-only rendering mode.

Returns
True if initialization was successful, false otherwise

◆ undoOwnshipOnlyRender()

virtual void makVre::DtPilotRenderUpdater::undoOwnshipOnlyRender ( )
protectedvirtual

Reverts the ownship-only rendering mode.

◆ updateVisionBlockObservers()

virtual void makVre::DtPilotRenderUpdater::updateVisionBlockObservers ( )
protectedvirtual

Updates vision block observers for cockpit views.

◆ onVrStateChanged()

virtual void makVre::DtPilotRenderUpdater::onVrStateChanged ( bool enabled)
protectedvirtual

Handles changes in VR state.

Parameters
enabledTrue if VR is enabled, false otherwise

◆ slot_channelModified()

virtual void makVre::DtPilotRenderUpdater::slot_channelModified ( const std::string & deName,
const std::string & winName,
const std::string & channelName,
const makVrv::DtChannelConfiguration & config )
protectedvirtual

Handles channel modification events.

Parameters
deNameName of the display element
winNameName of the window
channelNameName of the modified channel
configNew channel configuration

◆ initRealCockpit()

virtual void makVre::DtPilotRenderUpdater::initRealCockpit ( )
protectedvirtual

Initializes a 3D cockpit model with instruments.

Initialization to be done when using a "real" 3D cockpit model. Sets up render-to-texture elements for instruments.

◆ updateHudContacts()

virtual void makVre::DtPilotRenderUpdater::updateHudContacts ( )
protectedvirtual

Updates HUD contact positions.

Updates HUD contact positions based on contact locations and current position and orientation of ownship.

Member Data Documentation

◆ myInstrumentPanelManager

DtInstrumentPanelManager* makVre::DtPilotRenderUpdater::myInstrumentPanelManager
protected

Pointer to the instrument panel manager.

◆ myMarkingText

std::string makVre::DtPilotRenderUpdater::myMarkingText
protected

Aircraft marking text.

◆ myCockpitModelDef

const makVrv::DtModelDefinition* makVre::DtPilotRenderUpdater::myCockpitModelDef
protected

Pointer to the cockpit model definition.

◆ myCockpitModelAgent

makVrv::DtArticulatedModelAgent* makVre::DtPilotRenderUpdater::myCockpitModelAgent
protected

Agent for the cockpit articulated model.

◆ myCockpitSceneObjectAgent

makVrv::DtSceneObjectAgent* makVre::DtPilotRenderUpdater::myCockpitSceneObjectAgent
protected

Agent for the cockpit scene object.

◆ myCockpitUpdaterAgent

DtSceneObjectMimicUpdaterAgent* makVre::DtPilotRenderUpdater::myCockpitUpdaterAgent
protected

Agent for the cockpit updater.

◆ myCockpitObjectsInitialized

bool makVre::DtPilotRenderUpdater::myCockpitObjectsInitialized
protected

Flag indicating if cockpit objects are initialized.

◆ myCockpitModelsInitialized

bool makVre::DtPilotRenderUpdater::myCockpitModelsInitialized
protected

Flag indicating if cockpit models are initialized.

◆ myRttDefs

std::map<std::string, DtInitTable> makVre::DtPilotRenderUpdater::myRttDefs
protected

Map of RTT definitions indexed by name.

◆ myOwnshipSceneObject

makVrv::DtSceneObject* makVre::DtPilotRenderUpdater::myOwnshipSceneObject
protected

Pointer to the ownship scene object.

◆ myRenderModelOnly

bool makVre::DtPilotRenderUpdater::myRenderModelOnly
protected

Flag indicating if only the model should be rendered.

◆ myWantOwnshipOnly

bool makVre::DtPilotRenderUpdater::myWantOwnshipOnly
protected

Flag indicating if ownship-only rendering is desired.

◆ myMadeOwnshipOnly

bool makVre::DtPilotRenderUpdater::myMadeOwnshipOnly
protected

Flag indicating if ownship-only rendering is active.

◆ myDidOwnshipInVR

bool makVre::DtPilotRenderUpdater::myDidOwnshipInVR
protected

Flag indicating if ownship was set up in VR mode.

◆ myOwnshipNode

osg::ref_ptr<makVrv::DtChannelSpecificGroup> makVre::DtPilotRenderUpdater::myOwnshipNode
protected

Reference to the ownship node group.

◆ mySavedSkyMask

unsigned int makVre::DtPilotRenderUpdater::mySavedSkyMask
protected

Saved sky mask for ownship-only rendering.

◆ mySavedCloudMask

unsigned int makVre::DtPilotRenderUpdater::mySavedCloudMask
protected

Saved cloud mask for ownship-only rendering.

◆ mySavedCameraMask

unsigned int makVre::DtPilotRenderUpdater::mySavedCameraMask
protected

Saved camera mask for ownship-only rendering.

◆ myOwnshipMaskBit

unsigned int makVre::DtPilotRenderUpdater::myOwnshipMaskBit
protected

Mask bit for the ownship.

◆ myOsgObserver

makVrv::DtOsgObserverObject* makVre::DtPilotRenderUpdater::myOsgObserver
protected

Pointer to the OSG observer object.

◆ myVisionBlocks

std::list<std::pair<VisionBlockGeometry, DtCameraStruct*> > makVre::DtPilotRenderUpdater::myVisionBlocks
protected

List of vision blocks with their associated camera structures.

◆ myEffectTextures

std::vector<DtCameraStruct*> makVre::DtPilotRenderUpdater::myEffectTextures
protected

Vector of effect texture camera structures.

◆ mySensorContacts

std::vector<SensorDataMessage::SensorContact> makVre::DtPilotRenderUpdater::mySensorContacts
protected

Vector of sensor contacts for HUD display.


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