|
VR-Engage
2.2
|
This specialized cockpit implementation sets the entity's name into each updater, allowing them to look up data based on the associated entity. Additionally, it identifies all properties with the prefix "Out_" and sends PropertyUpdateMessages whenever these values change.
The player station cockpit also adds special handling for visibility and performance optimization through update throttling.
#include <playerStationOsgGlStudioCockpit.h>
Public Member Functions | |
| DtPlayerStationOsgGlStudioCockpit (makVrv::DtDe &de, makVrv::DtUniqueID id) | |
| virtual | ~DtPlayerStationOsgGlStudioCockpit () override |
| virtual std::string | className () const override |
| virtual double | update () override |
| virtual double | DtOsgGlStudioCockpit_update () |
| virtual void | createCockpit (const std::string &filename, const std::string &rsoName, DtPerspective p, makVrv::DtUniqueID attachedEntityElementId) override |
Protected Member Functions | |
| virtual osg::Group * | createOverlayObjects () override |
| virtual osg::Group * | createChannelNode () override |
| virtual DtVreMessageResult | handleSetCockpitVisibility (DtVreMessage *msg) |
Protected Attributes | |
| osg::ref_ptr< osg::Group > | myChannelNodeProtector |
| int | myAttributeTickIndex |
| float | myFrameRate |
| bool | myFirstUpdate |
| makVre::DtPlayerStationOsgGlStudioCockpit::DtPlayerStationOsgGlStudioCockpit | ( | makVrv::DtDe & | de, |
| makVrv::DtUniqueID | id ) |
Constructor.
| de | Reference to the display element |
| id | Unique identifier for this cockpit instance |
Creates a new player station OSG GLStudio cockpit with the specified ID
References de().
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Gets the class name of the model instance owner.
This method is used to control how model instances are created and to identify the type of cockpit during agent operations
|
overridevirtual |
Updates the cockpit state.
On first update call, sets GLStudio component properties such as MAK_HostId. Subsequent updates manage component state and property updates.
|
virtual |
Performs base class update with throttling support.
Throttles GLStudio component property updates if the framerate falls below a specific threshold to maintain performance
|
overridevirtual |
Creates the cockpit from the specified file.
| filename | Path to the GLStudio cockpit file |
| rsoName | Name of the RSO (Rendered Scene Object) |
| p | Perspective type for the cockpit |
| attachedEntityElementId | Element ID of the entity to attach to |
Initializes the cockpit instance from the specified GLStudio file and associates it with the given entity
|
overrideprotectedvirtual |
Creates the HUD object and supporting nodes.
Overridden to fix renderCockpitOnly instrument panels with SensorFX integration. This method constructs the actual OpenSceneGraph nodes for displaying the cockpit.
|
overrideprotectedvirtual |
Creates a channel-specific node for HUD integration.
Creates channel-specific nodes and determines whether the HUD should be added to the channels. Overridden to maintain a reference to myChannelNode to prevent deletion during slot_channelModified operations.
|
protectedvirtual |
Handles cockpit visibility control messages.
| msg | Pointer to the message to handle |
Processes SetCockpitVisibility messages to toggle cockpit visibility. Used to hide the cockpit when the aircraft model is shown and vice-versa.
|
protected |
Reference-counted pointer to protect the channel node.
Keeps myChannelNode from being deleted during slot_channelModified. See createChannelNode() for more details.
|
protected |
Index for tracking attribute update cycles during throttling.
|
protected |
Current framerate for throttling decisions.
|
protected |
Flag indicating if this is the first update.
Used to perform special initialization during the first update cycle