22#include <vrvCore/DtUniqueID.h>
26class DtObserverViewsWidget;
27class DtObserverViewsWidgetLogic;
36class DtChoosePlayerDialog;
88 virtual void tick(
double dt)
override;
196 virtual void playStation(
const std::string& role,
const DtEntityIdentifier& entityId = DtEntityIdentifier::nullId(),
197 const std::string& displayLayout =
"");
204 virtual void play(
bool asSpectator =
false);
243 :
force(DtForceOther)
UI panel for selecting and engaging with entities and roles.
Definition chooseRolePanel.h:60
virtual bool verifyEntityDefinition(EntityDefinition const &def, QString *error=NULL) const
Validates an entity definition.
virtual void createNewEntity()
Entity management methods.
virtual void setNewEntityLocation(const DtVector &location)
Sets the location for a new entity.
virtual makVrv::DtElementID getCreatedOwnshipElement() const
Gets the element ID of the created entity.
virtual bool updateNewEntity()
Updates an existing new entity.
bool myHaveNewEntity
Flag indicating that a new entity has been created.
Definition chooseRoleState.h:392
DtEntityIdentifier myHostId
Identifier of the host entity for embarking.
Definition chooseRoleState.h:401
virtual ~DtChooseRoleState() override
Virtual destructor.
virtual DtVreMessageResult handleAssignRolePlayer(DtVreMessage *message)
Handles role assignment messages.
virtual void setNewEntityType(const DtEntityType &type)
Sets the type for a new entity.
bool myAwaitingNewRealizedEntity
Flag indicating that entity creation is in progress.
Definition chooseRoleState.h:389
virtual void playStation(const std::string &role, const DtEntityIdentifier &entityId=DtEntityIdentifier::nullId(), const std::string &displayLayout="")
Updates the player station with role information.
virtual void onExposed() override
Called when the state becomes the topmost state again.
virtual void setCreatingOwnship(bool newNotExisting)
Entity creation methods.
virtual bool haveNewRealizedOwnshipEntity() const
Checks if a new ownship entity has been realized.
virtual void setNewEntityPitch(const double pitch)
Sets the pitch for a new entity.
int myDirtyBits
Bitmap of dirty flags for the entity definition.
Definition chooseRoleState.h:422
bool myWantNewEntity
Flag indicating whether to create a new entity.
Definition chooseRoleState.h:386
virtual void setNewEntityLocationAtAltitude(const DtVector &location, double altitude)
Sets the location and altitude for a new entity.
std::shared_ptr< DtVreChooseRolePage > myChooseRolePage
Shared pointer to the role selection page.
Definition chooseRoleState.h:428
virtual void tick(double dt) override
Updates the state each frame.
virtual DtVreMessageResult handleNewOwnshipCreated(DtVreMessage *message)
Message handlers.
DtChooseRoleState(DtPlayerStationApp &app)
Constructor.
virtual DtVreMessageResult handleBackButtonClicked(DtVreMessage *msg)
Handles back button click messages.
std::shared_ptr< AttachToEntity > myAttachToEntity
Shared pointer to the entity attachment configuration.
Definition chooseRoleState.h:431
virtual const DtEntityIdentifier & getCreatedOwnshipEntity() const
Gets the identifier of the created entity.
virtual DtVreMessageResult handleApplicationMode(makVre::DtVreMessage *message)
Handles messages about application mode changes.
virtual DtVreMessageResult handleEntityRealized(DtVreMessage *message)
Handles messages about entities being realized in the simulation.
DtChooseRolePanel * myEntityPanel
Pointer to the entity selection panel UI.
Definition chooseRoleState.h:425
virtual void setNewEntityHeading(const double headingInDegrees)
Sets the heading for a new entity.
StationDefinition myStationDef
Definition of the station to set up.
Definition chooseRoleState.h:398
virtual void onNewOwnshipRealized()
Called when a new ownship entity is realized.
virtual DtVreMessageResult handleChooseRoleButtonClicked(DtVreMessage *msg)
Handles choose role button click messages.
virtual void play(bool asSpectator=false)
Initiates engagement with the selected entity.
virtual void setNewEntityForce(const DtForceType &force)
Sets the force type for a new entity.
EntityDefinition myNewEntityDef
Definition of the entity to create.
Definition chooseRoleState.h:395
virtual void setNewEntityName(const std::string &name)
Sets the name for a new entity.
virtual std::string getDisplayLayout(const StationDefinition &station) const
Gets the display layout for a station.
virtual void onStacked() override
Called when another state is pushed on top of this one.
virtual void setObserverViewsPanelVisible(bool visible)
Controls visibility of the observer views panel.
virtual void destroyNewEntity()
Destroys a new entity that was being created.
virtual void setNewEntityClamp(bool clamp)
Sets whether the entity should be clamped to terrain.
virtual void setNewEntityEmbarkedOn(const DtEntityIdentifier &host, const DtVector &offset)
Sets a parent entity for embarking.
virtual void setUIVisibility(bool visible)
Controls visibility of the UI components.
virtual bool verifyStationDefinition(StationDefinition const &def, QString *error=NULL) const
Validates a station definition.
virtual void resetEntityPanel()
Resets the entity panel to its default state.
virtual void onExit() override
Called when the state is exited.
virtual const DtEntityType & getNewEntityType()
Gets the type of the entity being created.
Definition chooseRoleState.h:173
DirtyBits
Flags indicating which entity properties have changed.
Definition chooseRoleState.h:411
@ DirtyForce
Entity force type has changed.
Definition chooseRoleState.h:414
@ DirtyPitch
Entity pitch has changed.
Definition chooseRoleState.h:417
@ DirtyPosition
Entity position has changed.
Definition chooseRoleState.h:415
@ DirtyRoll
Entity roll has changed.
Definition chooseRoleState.h:418
@ DirtyType
Entity type has changed.
Definition chooseRoleState.h:413
@ DirtyHeading
Entity heading has changed.
Definition chooseRoleState.h:416
@ DirtyName
Entity name has changed.
Definition chooseRoleState.h:412
virtual void onEnter(const DtPlayerStationStateArgs *args) override
Called when the state is entered.
virtual DtVreMessageResult handleEscKey(DtVreMessage *msg)
Handles escape key press messages.
virtual DtVreMessageResult handleVrfRewind(DtVreMessage *msg)
Handles VRF rewind messages.
DtVector myHostOffset
Offset from the host entity for embarking.
Definition chooseRoleState.h:404
Configuration initializer for VREngage components.
Definition initializer.h:80
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:163
Class for passing arguments during state transitions.
Definition playerStationState.h:45
DtPlayerStationApp & app() const
Gets a reference to the player station application.
DtPlayerStationState(DtPlayerStationApp &app, std::string stateType)
Constructor.
UI controller for the role selection screen.
Definition vreChooseRolePage.h:183
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Definition vreAssignRolePlayer.h:30
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Definition appLauncherComponent.h:28
Defines base classes for the VR-Engage state management system.
Structure for entity attachment configuration.
Definition chooseRoleState.h:278
bool spectator
Whether to attach as a spectator.
Definition chooseRoleState.h:282
std::string name
Name of the entity to attach to.
Definition chooseRoleState.h:279
std::string role
Role to play in the entity.
Definition chooseRoleState.h:281
std::string displayLayout
Display layout to use.
Definition chooseRoleState.h:280
Structure containing definition data for a new entity.
Definition chooseRoleState.h:240
DtVector position
Geocentric position at specified altitude.
Definition chooseRoleState.h:257
double heading
Heading in degrees (0-360, clockwise from north)
Definition chooseRoleState.h:258
bool clamp
Whether to clamp to terrain.
Definition chooseRoleState.h:255
double altitude
Height above ground in meters.
Definition chooseRoleState.h:256
DtForceType force
Force affiliation (friendly, hostile, etc.)
Definition chooseRoleState.h:253
double pitch
Pitch angle in degrees.
Definition chooseRoleState.h:259
DtEntityType type
Type identifier for the entity.
Definition chooseRoleState.h:252
EntityDefinition()
Constructor that initializes with default values.
Definition chooseRoleState.h:242
std::string name
Display name for the entity.
Definition chooseRoleState.h:251
DtVector location
Geocentric position at ground level.
Definition chooseRoleState.h:254
Structure defining a player station configuration.
Definition chooseRoleState.h:267
std::string stationName
Name of the role or station.
Definition chooseRoleState.h:269
std::string displayLayout
Name of the display layout to use.
Definition chooseRoleState.h:270
DtEntityIdentifier entityId
Identifier of the entity to control.
Definition chooseRoleState.h:268
Defines the base class for all VREngage messages.