24#include <vrvCore/DtUniqueID.h>
28class DtObserverViewsWidget;
29class DtObserverViewsWidgetLogic;
38class DtChoosePlayerDialog;
96 virtual void tick(
double dt)
override;
205 const DtEntityIdentifier& entityId = DtEntityIdentifier::nullId(),
206 const std::string& displayLayout =
"");
213 virtual void play(
bool asSpectator =
false);
252 :
force(DtForceOther)
Provides handle classes for safe access to attributes.
Type-specific handle class for attributes.
Definition attributeHandle.h:229
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:425
DtEntityIdentifier myHostId
Identifier of the host entity for embarking.
Definition chooseRoleState.h:434
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:422
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:455
bool myWantNewEntity
Flag indicating whether to create a new entity.
Definition chooseRoleState.h:419
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:461
DtAttributeHandleType< DtEntityResolver * > myEntityResolverAttr
Handle for the global entity resolver.
Definition chooseRoleState.h:468
virtual void tick(double dt) override
Updates the state each frame.
virtual DtVreMessageResult handleNewOwnshipCreated(DtVreMessage *message)
Message handlers.
virtual void startOwnershipIdleTimer()
Publishes OwnershipPlayerDisengagedMessage to the connector.
bool myOwnershipTransferEnabled
True when ownership transfer flows are enabled for this session.
Definition chooseRoleState.h:475
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:464
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 void cancelOwnershipIdleTimer()
Publishes OwnershipPlayerEngagedMessage to the connector.
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:458
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:431
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:428
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.
int myReengageTries
Number of tries to re-engage after a failed engagement attempt.
Definition chooseRoleState.h:477
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:181
DirtyBits
Flags indicating which entity properties have changed.
Definition chooseRoleState.h:444
@ DirtyForce
Entity force type has changed.
Definition chooseRoleState.h:447
@ DirtyPitch
Entity pitch has changed.
Definition chooseRoleState.h:450
@ DirtyPosition
Entity position has changed.
Definition chooseRoleState.h:448
@ DirtyRoll
Entity roll has changed.
Definition chooseRoleState.h:451
@ DirtyType
Entity type has changed.
Definition chooseRoleState.h:446
@ DirtyHeading
Entity heading has changed.
Definition chooseRoleState.h:449
@ DirtyName
Entity name has changed.
Definition chooseRoleState.h:445
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 handleDivestStarted(DtVreMessage *message)
Handles OwnershipDivestStartedMessage from the connector.
virtual DtVreMessageResult handleVrfRewind(DtVreMessage *msg)
Handles VRF rewind messages.
DtVector myHostOffset
Offset from the host entity for embarking.
Definition chooseRoleState.h:437
Configuration initializer for VREngage components.
Definition initializer.h:80
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:155
Class for passing arguments during state transitions.
Definition playerStationState.h:47
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
Assigns a role and identifies automatic reengagement caused by rewind or snapshot rollback.
Definition vreAssignRolePlayer.h:35
Defines the entity resolver for mapping between entity representations.
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
!
Definition glsVreMessageUtil.h:50
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:288
bool spectator
Whether to attach as a spectator.
Definition chooseRoleState.h:292
std::string name
Name of the entity to attach to.
Definition chooseRoleState.h:289
std::string role
Role to play in the entity.
Definition chooseRoleState.h:291
std::string displayLayout
Display layout to use.
Definition chooseRoleState.h:290
Structure containing definition data for a new entity.
Definition chooseRoleState.h:249
DtVector position
Geocentric position at specified altitude.
Definition chooseRoleState.h:266
double heading
Heading in degrees (0-360, clockwise from north)
Definition chooseRoleState.h:267
bool clamp
Whether to clamp to terrain.
Definition chooseRoleState.h:264
double altitude
Height above ground in meters.
Definition chooseRoleState.h:265
DtForceType force
Force affiliation (friendly, hostile, etc.)
Definition chooseRoleState.h:262
double pitch
Pitch angle in degrees.
Definition chooseRoleState.h:268
DtEntityType type
Type identifier for the entity.
Definition chooseRoleState.h:261
EntityDefinition()
Constructor that initializes with default values.
Definition chooseRoleState.h:251
std::string name
Display name for the entity.
Definition chooseRoleState.h:260
DtVector location
Geocentric position at ground level.
Definition chooseRoleState.h:263
Structure defining a player station configuration.
Definition chooseRoleState.h:276
DtUUID entityUuid
UUID string of the entity; used by ownership acquire requests.
Definition chooseRoleState.h:280
std::string stationName
Name of the role or station.
Definition chooseRoleState.h:278
std::string displayLayout
Name of the display layout to use.
Definition chooseRoleState.h:279
DtEntityIdentifier entityId
Identifier of the entity to control.
Definition chooseRoleState.h:277
Defines the base class for all VREngage messages.