18#include <vrvOsg/DtChannelSpecificGroup.h>
19#include <vrvUtil/DtChannelConfiguration.h>
22#include <osg/NodeVisitor>
23#include <osg/Texture2D>
24#include <osg/BoundingBox>
56class DtModelDefinition;
65class DtSceneObjectAgent;
68class DtArticulatedModelAgent;
71class DtOsgObserverObject;
77class DtChannelSpecificGroup;
112 bool isHud =
false,
bool findPosition =
false,
const osg::Vec3* overrideNormal = NULL);
121 virtual void apply(osg::Node& node)
override;
227 virtual void tick(
double dt)
override;
238 virtual const char*
type()
const override;
308 const std::string& channelName,
const makVrv::DtChannelConfiguration& config);
Provides attribute handling system for hierarchical data storage and manipulation.
Entity resolution and mapping system.
Definition entityResolver.h:52
Table-based access to Lua state for configuration data.
Definition initializer.h:38
Manager for instrument panels, gimbal sensors, and specialized views.
Definition instrumentPanelManager.h:44
virtual void apply(osg::Node &node) override
The visitor apply method used to traverse the scene-graph.
virtual bool replaceTexture(osg::StateSet &ss, osg::Node &node)
Replaces a texture in the given state set.
osg::ref_ptr< osg::Texture2D > myReplacementTexture
Reference to the replacement texture.
Definition pilotRenderUpdater.h:163
bool myTraverseOnTarget
Flag indicating whether to continue traversal after finding the target.
Definition pilotRenderUpdater.h:175
osg::Vec3 targetBoundsMin() const
Gets the minimum bounds of the target geometry.
virtual bool collectGeometry(const osg::Node &node, const osg::NodePath &nodePath)
Collects geometry information for the target texture.
osg::Vec3 targetNormal() const
Gets the normal vector of the target geometry.
bool myIsHud
Flag indicating if this is a HUD texture.
Definition pilotRenderUpdater.h:166
Geometry myGeometry
Collected geometry information for the target texture.
Definition pilotRenderUpdater.h:188
bool myUseOverrideNormal
Flag indicating whether to use the provided override normal.
Definition pilotRenderUpdater.h:191
osg::Vec3 targetBoundsMax() const
Gets the maximum bounds of the target geometry.
std::string myTargetTextureName
Name of the texture to replace.
Definition pilotRenderUpdater.h:160
bool myWantsGeometry
Flag indicating if geometry information should be collected.
Definition pilotRenderUpdater.h:172
bool myFoundTarget
Flag indicating if the target texture was found.
Definition pilotRenderUpdater.h:169
bool foundTarget() const
The visitor apply method for geodes.
virtual ~DtInstrumentTextureReplacer() override
Virtual destructor.
DtInstrumentTextureReplacer(const std::string &targetTextureName, osg::ref_ptr< osg::Texture2D > replacementTexture, bool isHud=false, bool findPosition=false, const osg::Vec3 *overrideNormal=NULL)
Constructor.
virtual void undoOwnshipOnlyRender()
Reverts the ownship-only rendering mode.
virtual void destroyCockpitObjects()
Destroys cockpit objects and releases resources.
bool myRenderModelOnly
Flag indicating if only the model should be rendered.
Definition pilotRenderUpdater.h:353
osg::ref_ptr< makVrv::DtChannelSpecificGroup > myOwnshipNode
Reference to the ownship node group.
Definition pilotRenderUpdater.h:365
bool myMadeOwnshipOnly
Flag indicating if ownship-only rendering is active.
Definition pilotRenderUpdater.h:359
std::vector< DtCameraStruct * > myEffectTextures
Vector of effect texture camera structures.
Definition pilotRenderUpdater.h:397
virtual void onVrStateChanged(bool enabled)
Handles changes in VR state.
makVrv::DtSceneObjectAgent * myCockpitSceneObjectAgent
Agent for the cockpit scene object.
Definition pilotRenderUpdater.h:335
DtSceneObjectMimicUpdaterAgent * myCockpitUpdaterAgent
Agent for the cockpit updater.
Definition pilotRenderUpdater.h:338
DtPilotRenderUpdater()
Default constructor.
std::list< std::pair< VisionBlockGeometry, DtCameraStruct * > > myVisionBlocks
List of vision blocks with their associated camera structures.
Definition pilotRenderUpdater.h:394
bool myWantOwnshipOnly
Flag indicating if ownship-only rendering is desired.
Definition pilotRenderUpdater.h:356
virtual void tick(double dt) override
Updates rendering elements for the current frame.
bool myCockpitModelsInitialized
Flag indicating if cockpit models are initialized.
Definition pilotRenderUpdater.h:344
virtual bool enableRttEffectTexture(DtCameraStruct *cameraStruct, bool addToList=true)
Enables RTT effect texture for texture swapping.
virtual bool postInitialize() override
Performs post-initialization setup.
virtual void slot_channelModified(const std::string &deName, const std::string &winName, const std::string &channelName, const makVrv::DtChannelConfiguration &config)
Handles channel modification events.
unsigned int mySavedCameraMask
Saved camera mask for ownship-only rendering.
Definition pilotRenderUpdater.h:374
virtual void disableRttEffectTextures()
Turns off the RTT effect textures and restores the original textures.
makVrv::DtSceneObject * myOwnshipSceneObject
Pointer to the ownship scene object.
Definition pilotRenderUpdater.h:350
makVrv::DtOsgObserverObject * myOsgObserver
Pointer to the OSG observer object.
Definition pilotRenderUpdater.h:380
virtual int initRenderTexturesFor(makVrv::DtModelInstance *modelInstance)
Initializes render textures for a model instance.
const makVrv::DtModelDefinition * myCockpitModelDef
Pointer to the cockpit model definition.
Definition pilotRenderUpdater.h:329
bool myDidOwnshipInVR
Flag indicating if ownship was set up in VR mode.
Definition pilotRenderUpdater.h:362
DtInstrumentPanelManager * myInstrumentPanelManager
Pointer to the instrument panel manager.
Definition pilotRenderUpdater.h:323
virtual void updateHudContacts()
Updates HUD contact positions.
virtual bool initialize(DtPlayerStation *player, DtInitTable &config) override
Initializes the render updater component.
virtual bool replaceRttTexturesOn(makVrv::DtSceneObject *so, DtCameraStruct *cameraStruct)
Replaces RTT textures on a scene object.
std::vector< SensorDataMessage::SensorContact > mySensorContacts
Vector of sensor contacts for HUD display.
Definition pilotRenderUpdater.h:400
makVrv::DtArticulatedModelAgent * myCockpitModelAgent
Agent for the cockpit articulated model.
Definition pilotRenderUpdater.h:332
std::string myMarkingText
Aircraft marking text.
Definition pilotRenderUpdater.h:326
unsigned int myOwnshipMaskBit
Mask bit for the ownship.
Definition pilotRenderUpdater.h:377
virtual bool initCockpitObjects()
Initializes cockpit objects.
bool myCockpitObjectsInitialized
Flag indicating if cockpit objects are initialized.
Definition pilotRenderUpdater.h:341
std::map< std::string, DtInitTable > myRttDefs
Map of RTT definitions indexed by name.
Definition pilotRenderUpdater.h:347
virtual ~DtPilotRenderUpdater() override
Virtual destructor.
virtual void updateVisionBlockObservers()
Updates vision block observers for cockpit views.
unsigned int mySavedCloudMask
Saved cloud mask for ownship-only rendering.
Definition pilotRenderUpdater.h:371
virtual bool initOwnshipOnlyRender()
Initializes ownship-only rendering mode.
static unsigned int overrideChannelCameraMask(makVrv::DtChannel *channel, unsigned int mask)
Overrides the camera mask for a channel.
virtual void shutdown() override
Cleans up resources when the component is being shut down.
virtual DtVreMessageResult handleSensorData(DtVreMessage *msg)
Handles sensor data messages.
virtual DtVreMessageResult handleRenderTextureInitialized(DtVreMessage *msg)
Handles render texture initialized messages.
virtual const char * type() const override
Returns the component type identifier.
virtual void initRealCockpit()
Initializes a 3D cockpit model with instruments.
unsigned int mySavedSkyMask
Saved sky mask for ownship-only rendering.
Definition pilotRenderUpdater.h:368
virtual DtPlayerStation & player()
Gets the player station.
DtPlayerComponent()
Constructor.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
Agent class for the scene object class: DtSceneObjectMimicUpdater.
Definition DtSceneObjectMimicUpdaterAgent.hpp:32
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
constexpr const char * liveTextures
Definition pilotRenderUpdater.h:40
constexpr const char * renderCockpitGeometryOnly
Definition pilotRenderUpdater.h:43
Defines export/import macros for the Pilot Frontend library.
#define PILOT_DLL
Definition export.h:19
Definition pilotRenderUpdater.h:32
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
constexpr const char * DtPilotRenderUpdaterType
Type identifier constant for DtPilotRenderUpdater components.
Definition pilotRenderUpdater.h:199
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Definition appLauncherComponent.h:28
Defines the DtPlayerComponent base class for VR-Engage role components.
Structure that manages camera and render-to-texture for instrument panels.
Definition instrumentPanelManagerStructs.h:93
Structure containing geometry information for the target texture.
Definition pilotRenderUpdater.h:179
osg::Plane plane
Plane on farthest point along average normal.
Definition pilotRenderUpdater.h:181
osg::Vec3 min
Minimum RTT geometry bounds projected on plane.
Definition pilotRenderUpdater.h:183
osg::Vec3 max
Maximum RTT geometry bounds projected on plane.
Definition pilotRenderUpdater.h:184
osg::BoundingBox box
Box holding geometry bounds in model space.
Definition pilotRenderUpdater.h:182
osg::Vec3 normal
Average normal of RTT geometry.
Definition pilotRenderUpdater.h:180
Structure containing vision block geometry information.
Definition pilotRenderUpdater.h:384
osg::Quat viewRotation
Rotation for the view.
Definition pilotRenderUpdater.h:389
float viewZoom
Zoom factor for the view.
Definition pilotRenderUpdater.h:390
osg::Vec3 modelSpaceRttMax
Maximum extent of RTT in model space.
Definition pilotRenderUpdater.h:387
osg::Vec3 viewOffset
Offset for the view.
Definition pilotRenderUpdater.h:388
osg::Vec3 modelSpaceRttMin
Minimum extent of RTT in model space.
Definition pilotRenderUpdater.h:386
osg::Quat modelSpaceCamRot
Camera rotation in model space.
Definition pilotRenderUpdater.h:385
Defines the base class for all VREngage messages.