22#include <vrvCore/DtUniqueID.h>
114 virtual void tick(
double dt)
override;
121 virtual const char*
type()
const override;
170 DtVector
rotateVector(
const DtVector& localSpineToCamera,
double pitch,
double yaw = 0.0);
Type-specific handle class for attributes.
Definition attributeHandle.h:229
Entity resolution and mapping system.
Definition entityResolver.h:52
double myScopeWalkingPitch
Scope walking pitch adjustment.
Definition humanObserverUpdater.h:351
DtAttributeHandleType< bool > myCompassAttr
Handle for compass state.
Definition humanObserverUpdater.h:423
bool myPostureChanged
Flag indicating if posture has changed this frame.
Definition humanObserverUpdater.h:303
DtAttributeHandleType< LauncherType > myLauncherTypeAttr
Handle for launcher type.
Definition humanObserverUpdater.h:435
makVre::DtLinearInterpolator< DtVector > * myFirstPersonModelTranslationOffsetInterpolator
Interpolator for first-person model translation offset.
Definition humanObserverUpdater.h:339
DtAttributeHandleType< Equipment > myCurrentEquipmentAttr
Handle for current equipment.
Definition humanObserverUpdater.h:371
DtAttributeHandleType< double > myCurrentGunZoomLevelAttr
Handle for current gun zoom level.
Definition humanObserverUpdater.h:455
double getPitch()
Gets the current pitch angle of the player.
DtVector mySpineEndPosition
Position of the spine end point.
Definition humanObserverUpdater.h:234
DtAttributeHandleType< double > mySimulatedPitchAttr
Handle for simulated pitch value.
Definition humanObserverUpdater.h:387
int buildOffsetKey(ObserverAttachMode mode, HumanPosture posture)
Builds a lookup key for the offset map from posture and mode.
Definition humanObserverUpdater.h:292
DtHumanObserverUpdater()
Default constructor.
virtual void onNVGChanged(bool nvg)
Handles changes in night vision goggles state.
DtSettingsOverrideGuard mySettingsOverrideGuard
Tracks the role-configured compass visibility override.
Definition humanObserverUpdater.h:321
bool myInitialCompassStatePending
Indicates that the next compass update applies the role default.
Definition humanObserverUpdater.h:324
DtAttributeHandleType< DtVector > myObserverLocationAttr
Handle for observer geocentric location.
Definition humanObserverUpdater.h:459
bool myWeaponChanged
Flag indicating that the weapon changed and hasn't been updated yet.
Definition humanObserverUpdater.h:306
DtAttributeHandleType< bool > myVrEnabledAttr
Handle for VR-enabled state.
Definition humanObserverUpdater.h:447
bool myLastNVGState
Last known state of night vision goggles.
Definition humanObserverUpdater.h:327
bool myLastFlashlightState
Last known state of the flashlight.
Definition humanObserverUpdater.h:315
DtAttributeHandleType< bool > myUseGazeYawAttr
Handle indicating whether gaze yaw is active.
Definition humanObserverUpdater.h:391
void updateAttachmentOffset(double dt)
Updates the observer attachment offset based on current state.
Offset myDestinationOffset
Target destination observer offset.
Definition humanObserverUpdater.h:300
double myThirdPersonAimSpeed
Speed of third-person aiming transition.
Definition humanObserverUpdater.h:249
bool myObserverIsAttached
Flag indicating if the observer is currently attached.
Definition humanObserverUpdater.h:228
virtual void updateZoomLevel()
Updates the target zoom level based on current observer state and equipment.
DtAttributeHandleType< double > myHealthAttr
Handle for health value.
Definition humanObserverUpdater.h:427
void updateObserverPositionAndOrientation()
Updates the observer position and orientation based on current state.
DtAttributeHandleType< makVrv::DtElementID > myLauncherElementIdAttr
Handle for launcher element identifier.
Definition humanObserverUpdater.h:403
makVrv::DtUniqueID myPlayerElementID
Unique ID of the player element.
Definition humanObserverUpdater.h:225
DtAttributeHandleType< bool > myAimingAttr
Handle for aiming state.
Definition humanObserverUpdater.h:367
double myTargetZoom
Target zoom level for the observer.
Definition humanObserverUpdater.h:309
DtAttributeHandleType< bool > myHasEmbarkedEntitiesAttr
Handle indicating whether the player carries embarked entities.
Definition humanObserverUpdater.h:439
virtual ~DtHumanObserverUpdater() override
Virtual destructor.
double myLastFlashlightYaw
Last flashlight yaw angle.
Definition humanObserverUpdater.h:333
DtAttributeHandleType< bool > myFocusOnEntityAttr
Handle for focus-on-entity state.
Definition humanObserverUpdater.h:443
Offset myCurrentOffset
Current observer offset.
Definition humanObserverUpdater.h:297
double myAttachModeSpeed
Speed of attachment mode transition.
Definition humanObserverUpdater.h:246
bool myLastCompassState
Last known state of the compass.
Definition humanObserverUpdater.h:318
bool myWasAiming
Flag indicating if the player was aiming in the previous frame.
Definition humanObserverUpdater.h:345
double myPostureChangeSpeed
Speed of posture change transition.
Definition humanObserverUpdater.h:243
virtual void updateStateAttributes() override
Updates state attributes based on current observer state.
double myLastFlashlightPitch
Last flashlight pitch angle.
Definition humanObserverUpdater.h:330
DtAttributeHandleType< double > myFlashlightPitchAttr
Handle for flashlight pitch offset.
Definition humanObserverUpdater.h:415
DtAttributeHandleType< HumanPosture > myPostureAttr
Handle for current posture.
Definition humanObserverUpdater.h:375
DtVector getCameraOffset()
Gets the current camera offset from the player.
Offset myPriorOffset
Previous observer offset.
Definition humanObserverUpdater.h:294
DtAttributeHandleType< bool > myUsingDroneAttr
Handle for drone-control state.
Definition humanObserverUpdater.h:399
makVre::DtLinearInterpolator< DtVector > * myFirstPersonModelRotateOffsetInterpolator
Interpolator for first-person model rotation offset.
Definition humanObserverUpdater.h:342
bool myAudioListenerPinned
Indicates whether this component set the fixed audio listener observer.
Definition humanObserverUpdater.h:222
std::string myScopeChannelName
Name of the scope channel.
Definition humanObserverUpdater.h:348
DtAttributeHandleType< ObserverAttachMode > myObserverAttachModeAttr
Handle for observer attach mode.
Definition humanObserverUpdater.h:363
double getYaw()
Gets the current yaw angle of the player.
void updateObserverViewMagnification(double dt)
Updates the observer view magnification (zoom)
virtual const char * type() const override
Returns the component type identifier.
virtual void tick(double dt) override
Updates the observer for the current frame.
virtual void shutdown() override
Cleans up resources when the component is being shut down.
bool myUsingVr
Flag indicating if using VR mode.
Definition humanObserverUpdater.h:336
DtAttributeHandleType< bool > myUseGazePitchAttr
Handle indicating whether gaze pitch is active.
Definition humanObserverUpdater.h:379
DtVector rotateVector(const DtVector &localSpineToCamera, double pitch, double yaw=0.0)
Rotates a vector by the specified pitch and yaw angles.
virtual void onWeaponIndexChanged(int weaponIndex)
Handles changes to the current weapon. Triggers an update of the first-person rig to match the new we...
DtVector mySpineToCameraVector
Vector from spine to camera position.
Definition humanObserverUpdater.h:237
std::string myNightVisionSensorMode
Name of the observer mode to use for NVG.
Definition humanObserverUpdater.h:359
double myCutToFirstPersonDist
Distance threshold for switching to first-person view.
Definition humanObserverUpdater.h:240
virtual bool initialize(DtPlayerStation *player, DtInitTable &config) override
Initializes the observer updater component.
DtAttributeHandleType< bool > myFlashlightAttr
Handle for flashlight state.
Definition humanObserverUpdater.h:411
virtual bool observerPitchCheck()
Checks if the observer pitch is at an angle above the terrain.
DtAttributeHandleType< double > myViewMagnificationAttr
Handle for binocular/launcher view magnification.
Definition humanObserverUpdater.h:407
makVrv::DtObserver * myObserver
Pointer to the managed observer.
Definition humanObserverUpdater.h:219
DtAttributeHandleType< LauncherState > myLauncherStateAttr
Handle for launcher state.
Definition humanObserverUpdater.h:431
void updateScopeObserver(makVrv::DtObserver *observer)
Updates the scope observer properties.
virtual bool postInitialize() override
Performs post-initialization setup.
DtAttributeHandleType< DtTaitBryan > myObserverOrientationAttr
Handle for observer geocentric orientation.
Definition humanObserverUpdater.h:463
DtAttributeHandleType< double > myFlashlightYawAttr
Handle for flashlight yaw offset.
Definition humanObserverUpdater.h:419
double myMaxObserverPitch
Maximum allowed observer pitch angle.
Definition humanObserverUpdater.h:354
virtual void slot_observerModeSettingChanged(int mode, int setting)
Handles observer mode setting changes.
std::map< int, Offset > myOffsets
Map of observer offsets indexed by a combined posture and mode key.
Definition humanObserverUpdater.h:286
virtual void updateFlashlightState()
Updates the flashlight state based on current player state.
virtual ObserverAttachMode getAttachMode()
Gets the current observer attachment mode.
makVre::DtLinearInterpolator< double > * myZoomInterpolator
Interpolator for smooth zoom transitions.
Definition humanObserverUpdater.h:312
DtAttributeHandleType< double > myGazeYawAttr
Handle for gaze yaw value.
Definition humanObserverUpdater.h:395
DtAttributeHandleType< double > myGazePitchAttr
Handle for gaze pitch value.
Definition humanObserverUpdater.h:383
virtual void updateCompassState()
Updates the compass display state.
virtual void setDestinationOffset(ObserverAttachMode mode, HumanPosture posture)
Sets the destination offset for the observer.
DtAttributeHandleType< DtEntityIdentifier > myDroneEntityIdAttr
Handle for active drone entity identifier.
Definition humanObserverUpdater.h:451
Table-based access to Lua state for configuration data.
Definition initializer.h:38
Linear interpolation template class.
Definition linearInterpolator.h:23
DtObserverUpdater()
Default constructor for DtObserverUpdater.
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
Base component for managing observer parameters and view settings.
constexpr const char * postureChangeSpeed
Definition humanObserverUpdater.h:48
constexpr const char * cutToFirstPersonDist
Definition humanObserverUpdater.h:39
constexpr const char * thirdPersonAimSpeed
Definition humanObserverUpdater.h:57
constexpr const char * scopeChannelName
Definition humanObserverUpdater.h:51
constexpr const char * nightVisionSensorMode
Definition humanObserverUpdater.h:42
constexpr const char * offsets
Definition humanObserverUpdater.h:45
constexpr const char * attachModeTransitionSpeed
Definition humanObserverUpdater.h:36
constexpr const char * scopeWalkingPitch
Definition humanObserverUpdater.h:54
Defines export macros for the Human Frontend library.
#define HUMAN_DLL
Definition export.h:19
Provides a template class for linear interpolation between values.
Definition humanObserverUpdater.h:28
!
Definition glsVreMessageUtil.h:50
ObserverAttachMode
Enumeration of camera/observer attachment offsets.
Definition stateDefines.h:44
HumanPosture
Enumeration of human posture states.
Definition stateDefines.h:30
constexpr const char * DtHumanObserverUpdaterType
Type identifier for DtHumanObserverUpdater component.
Definition humanObserverUpdater.h:85
Definition appLauncherComponent.h:28
Defines a guard for temporary, non-persistent settings overrides.
Common enumeration definitions used throughout the VREngage system.
Structure representing an observer offset configuration.
Definition humanObserverUpdater.h:253
bool operator==(const Offset &other)
Equality comparison operator.
Definition humanObserverUpdater.h:261
bool operator!=(const Offset &other)
Inequality comparison operator.
Definition humanObserverUpdater.h:269
Offset & operator=(const Offset &other)
Assignment operator.
Definition humanObserverUpdater.h:277
DtVector pos
Position offset vector.
Definition humanObserverUpdater.h:254
HumanPosture posture
Human posture associated with this offset.
Definition humanObserverUpdater.h:255
ObserverAttachMode mode
Observer attachment mode associated with this offset.
Definition humanObserverUpdater.h:256
Defines the base class for all VREngage messages.