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;
257 virtual void tick(
double dt)
override;
268 virtual const char*
type()
const override;
338 const std::string& channelName,
const makVrv::DtChannelConfiguration& config);
Provides attribute handling system for hierarchical data storage and manipulation.
Type-specific handle class for attributes.
Definition attributeHandle.h:229
Entity resolution and mapping system.
Definition entityResolver.h:52
virtual bool replaceTexture(osg::StateSet &ss, osg::Node &node)
Override replaceTexture so it just returns if we find a node with the same name as we just want the g...
DtHudGeometryFinder(const std::string &nodeName)
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:45
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:183
bool myTraverseOnTarget
Flag indicating whether to continue traversal after finding the target.
Definition pilotRenderUpdater.h:195
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:186
Geometry getGeometry()
Return the geometry object representing the geometry having it's texture replaced.
Geometry myGeometry
Collected geometry information for the target texture.
Definition pilotRenderUpdater.h:198
bool myUseOverrideNormal
Flag indicating whether to use the provided override normal.
Definition pilotRenderUpdater.h:201
osg::Vec3 targetBoundsMax() const
Gets the maximum bounds of the target geometry.
std::string myTargetTextureName
Name of the texture to replace.
Definition pilotRenderUpdater.h:180
bool myWantsGeometry
Flag indicating if geometry information should be collected.
Definition pilotRenderUpdater.h:192
bool myFoundTarget
Flag indicating if the target texture was found.
Definition pilotRenderUpdater.h:189
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:389
osg::ref_ptr< makVrv::DtChannelSpecificGroup > myOwnshipNode
Reference to the ownship node group.
Definition pilotRenderUpdater.h:401
bool myMadeOwnshipOnly
Flag indicating if ownship-only rendering is active.
Definition pilotRenderUpdater.h:395
std::vector< DtCameraStruct * > myEffectTextures
Vector of effect texture camera structures.
Definition pilotRenderUpdater.h:433
virtual void onVrStateChanged(bool enabled)
Handles changes in VR state.
makVrv::DtSceneObjectAgent * myCockpitSceneObjectAgent
Agent for the cockpit scene object.
Definition pilotRenderUpdater.h:371
DtSceneObjectMimicUpdaterAgent * myCockpitUpdaterAgent
Agent for the cockpit updater.
Definition pilotRenderUpdater.h:374
DtPilotRenderUpdater()
Default constructor.
std::list< std::pair< VisionBlockGeometry, DtCameraStruct * > > myVisionBlocks
List of vision blocks with their associated camera structures.
Definition pilotRenderUpdater.h:430
bool myWantOwnshipOnly
Flag indicating if ownship-only rendering is desired.
Definition pilotRenderUpdater.h:392
DtInstrumentTextureReplacer::Geometry myHudGlassGeom
Definition pilotRenderUpdater.h:442
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:380
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:410
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:386
makVrv::DtOsgObserverObject * myOsgObserver
Pointer to the OSG observer object.
Definition pilotRenderUpdater.h:416
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:365
bool myDidOwnshipInVR
Flag indicating if ownship was set up in VR mode.
Definition pilotRenderUpdater.h:398
DtInstrumentPanelManager * myInstrumentPanelManager
Pointer to the instrument panel manager.
Definition pilotRenderUpdater.h:359
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:436
makVrv::DtArticulatedModelAgent * myCockpitModelAgent
Agent for the cockpit articulated model.
Definition pilotRenderUpdater.h:368
std::string myMarkingText
Aircraft marking text.
Definition pilotRenderUpdater.h:362
unsigned int myOwnshipMaskBit
Mask bit for the ownship.
Definition pilotRenderUpdater.h:413
virtual bool initCockpitObjects()
Initializes cockpit objects.
bool myCockpitObjectsInitialized
Flag indicating if cockpit objects are initialized.
Definition pilotRenderUpdater.h:377
std::map< std::string, DtInitTable > myRttDefs
Map of RTT definitions indexed by name.
Definition pilotRenderUpdater.h:383
virtual ~DtPilotRenderUpdater() override
Virtual destructor.
virtual void updateVisionBlockObservers()
Updates vision block observers for cockpit views.
DtAttributeHandleType< bool > myVrEnabledAttr
Attribute handle indicating whether VR mode is enabled for the player.
Definition pilotRenderUpdater.h:440
unsigned int mySavedCloudMask
Saved cloud mask for ownship-only rendering.
Definition pilotRenderUpdater.h:407
virtual DtInitTickStatus finalizeInitTick(double dt) override
Called after postInitialize() to wait for VRV agent readiness.
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 updateHudContactsVR()
Update the hud contact for VR. This version accounts for VR head position and sets up shader uniforms...
virtual void initRealCockpit()
Initializes a 3D cockpit model with instruments.
unsigned int mySavedSkyMask
Saved sky mask for ownship-only rendering.
Definition pilotRenderUpdater.h:404
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
!
Definition glsVreMessageUtil.h:50
constexpr const char * DtPilotRenderUpdaterType
Type identifier constant for DtPilotRenderUpdater components.
Definition pilotRenderUpdater.h:220
DtInitTickStatus
Status returned by DtPlayerComponent::finalizeInitTick() to indicate deferred initialization progress...
Definition playerComponent.h:80
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:148
double width
Width of the plane geometry.
Definition pilotRenderUpdater.h:156
osg::Vec3 up
Up axis vector in plane space.
Definition pilotRenderUpdater.h:159
double height
Height of the plane geometry.
Definition pilotRenderUpdater.h:157
osg::Plane plane
Plane on farthest point along average normal.
Definition pilotRenderUpdater.h:150
osg::Vec3 right
Right axis vector in plane space.
Definition pilotRenderUpdater.h:158
osg::Vec3 min
Minimum RTT geometry bounds projected on plane.
Definition pilotRenderUpdater.h:152
osg::Vec3 max
Maximum RTT geometry bounds projected on plane.
Definition pilotRenderUpdater.h:153
osg::BoundingBox box
Box holding geometry bounds in model space.
Definition pilotRenderUpdater.h:151
osg::Vec3 normal
Average normal of RTT geometry.
Definition pilotRenderUpdater.h:149
osg::Vec3 center
Local space center of the geometry.
Definition pilotRenderUpdater.h:155
Structure containing vision block geometry information.
Definition pilotRenderUpdater.h:420
osg::Quat viewRotation
Rotation for the view.
Definition pilotRenderUpdater.h:425
float viewZoom
Zoom factor for the view.
Definition pilotRenderUpdater.h:426
osg::Vec3 modelSpaceRttMax
Maximum extent of RTT in model space.
Definition pilotRenderUpdater.h:423
osg::Vec3 viewOffset
Offset for the view.
Definition pilotRenderUpdater.h:424
osg::Vec3 modelSpaceRttMin
Minimum extent of RTT in model space.
Definition pilotRenderUpdater.h:422
osg::Quat modelSpaceCamRot
Camera rotation in model space.
Definition pilotRenderUpdater.h:421
Defines the base class for all VREngage messages.