29class DtVirtualRealityDriver;
30class DtSubmitOverlayCallback;
36class DtVirtualRealityEventProcessor;
103 virtual void tick(
double dt)
override;
111 virtual const char*
type()
const override;
Defines a class that encapsulates the state of a VR controller.
Defines the base class for VR controller event management.
A class that simulates a directional pad from analog inputs.
Definition virtualDpad.h:22
Table-based access to Lua state for configuration data.
Definition initializer.h:38
Base class for all role components in VR-Engage.
Definition playerComponent.h:102
virtual DtPlayerStation & player()
Gets the player station.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
Tracks temporary settings overrides and conditionally restores them.
Definition settingsOverrideGuard.h:180
virtual void tick(double dt) override
Called every frame to update the VR state.
virtual const char * type() const override
Returns the type identifier for this component.
virtual bool initialize(makVre::DtPlayerStation *player, makVre::DtInitTable &config) override
Initializes the virtual reality logic component.
makVrv::DtVirtualRealityDriver * myVrDriver
Pointer to the VR driver for hardware interaction.
Definition virtualRealityLogic.h:204
ControllerIdentifier myRightHandId
Identifier for the right hand controller.
Definition virtualRealityLogic.h:237
bool myRightHanded
Flag indicating if the player uses right hand as dominant.
Definition virtualRealityLogic.h:225
int myFramesSinceMenu
Counter for frames elapsed since menu interaction.
Definition virtualRealityLogic.h:240
makVrv::DtVirtualRealityEventManager::ControllerStateMap ControllerStateMap
Type alias for a map of controller IDs to controller state pointers.
Definition virtualRealityLogic.h:67
bool myVrWasEnabled
Flag indicating if VR was enabled before entering a menu.
Definition virtualRealityLogic.h:222
virtual void shutdown() override
Shuts down the virtual reality logic component.
virtual void stopVr()
Stops VR mode.
virtual void resetHeadPos()
Resets the HMD head position tracking.
makVrv::DtSubmitOverlayCallback * myVrOverlay
Callback for submitting overlay graphics to VR display.
Definition virtualRealityLogic.h:213
makVrv::DtVirtualRealityControllerState::ControllerId ControllerId
Type alias for controller identifier values.
Definition virtualRealityLogic.h:73
makVrv::DtVirtualRealityControllerState::DtVector2f DtVector2f
Type alias for 2D vector used in controller inputs.
Definition virtualRealityLogic.h:76
bool myDidHaveHandMotion
Flag tracking if hand motion was detected in the current frame.
Definition virtualRealityLogic.h:228
virtual void startVr()
Starts VR mode.
int myLastMainChannelRenderOrder
Cached render order for the main channel to restore when exiting VR.
Definition virtualRealityLogic.h:249
DtVirtualRealityLogic()
Constructor for DtVirtualRealityLogic.
makVrv::DtVirtualRealityControllerState ControllerState
Type alias for virtual reality controller state.
Definition virtualRealityLogic.h:79
virtual makVre::DtVreMessageResult handleToggleMixedReality(makVre::DtVreMessage *msg)
Handles toggle mixed reality message.
virtual makVre::DtVreMessageResult handleEnterPlayerState(makVre::DtVreMessage *msg)
Handles player entering a state.
virtual void processControllerStates(const ControllerStateMap &controllers)
Processes the current state of all tracked VR controllers.
virtual void handleResetHeadPosInput(int val)
Input handler for resetting head position.
ControllerIdentifier myHeadId
Identifier for the HMD controller.
Definition virtualRealityLogic.h:231
virtual makVre::DtVreMessageResult handleExitPlayerState(makVre::DtVreMessage *msg)
Handles player exiting a state.
makVrv::DtVirtualRealityControllerState::Bitfield Bitfield
Type alias for controller type bitfield values.
Definition virtualRealityLogic.h:70
virtual makVre::DtVreMessageResult handleResetVrHeadPos(makVre::DtVreMessage *msg)
Handles reset VR head position message.
ControllerIdentifier myLeftHandId
Identifier for the left hand controller.
Definition virtualRealityLogic.h:234
DtVirtualDpad myVirtualDpad
Virtual D-pad for converting analog input to digital directions.
Definition virtualRealityLogic.h:243
DtInputLogic myInputLogic
Input logic for mapping actions to VR functions.
Definition virtualRealityLogic.h:246
DtVirtualRealityEventProcessor * myEventProcessor
Processor for VR controller events.
Definition virtualRealityLogic.h:207
DtSettingsOverrideGuard mySettingsOverrideGuard
Tracks temporary virtual reality settings applied by this component.
Definition virtualRealityLogic.h:216
DtActionMenuLogic * myMenuLogic
Menu logic component for handling VR menu interactions.
Definition virtualRealityLogic.h:210
bool myVrEnabled
Flag indicating if VR is currently enabled.
Definition virtualRealityLogic.h:219
virtual const ControllerState * findController(ControllerIdentifier &identifier, const ControllerStateMap &controllers)
Finds a controller in the controller state map.
virtual ~DtVirtualRealityLogic() override
Virtual destructor for DtVirtualRealityLogic.
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Encapsulates the complete state of a virtual reality controller.
Definition DtVirtualRealityControllerState.h:34
DtVector2< float32 > DtVector2f
Type used for 2D vector values.
Definition DtVirtualRealityControllerState.h:51
unsigned long long Bitfield
Type used for bit flags throughout the class.
Definition DtVirtualRealityControllerState.h:40
unsigned int ControllerId
Type used for controller identification.
Definition DtVirtualRealityControllerState.h:45
std::map< unsigned int, DtVirtualRealityControllerState * > ControllerStateMap
Map type that associates controller IDs with their state objects.
Definition DtVirtualRealityEventManager.h:59
constexpr const char * rightHanded
Definition virtualRealityLogic.h:48
Defines export/import macros for the vreCommonComponents library.
#define VRECOMMONCOMPONENTS_DLL
DLL export/import macro for the vreCommonComponents library.
Definition export.h:28
Definition virtualRealityLogic.h:40
!
Definition glsVreMessageUtil.h:50
constexpr const char * DtVirtualRealityLogicType
Type identifier for DtVirtualRealityLogic component.
Definition virtualRealityLogic.h:54
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.
Defines a guard for temporary, non-persistent settings overrides.
Structure for identifying and tracking VR controllers.
Definition virtualRealityLogic.h:137
ControllerIdentifier(Bitfield type)
Constructor that initializes with a controller type.
Definition virtualRealityLogic.h:140
Bitfield controllerType
Type of the controller (HMD, left hand, right hand)
Definition virtualRealityLogic.h:147
ControllerId controllerId
Unique identifier for the controller instance.
Definition virtualRealityLogic.h:150
Provides a virtual directional pad implementation.
Defines the base class for all VREngage messages.