21#include <vrvCore/DtUniqueID.h>
113 virtual void tick(
double dt)
override;
120 virtual const char*
type()
const override;
162 DtVector
rotateVector(
const DtVector& localSpineToCamera,
double pitch,
double yaw = 0.0);
Entity resolution and mapping system.
Definition entityResolver.h:52
double myScopeWalkingPitch
Scope walking pitch adjustment.
Definition humanObserverUpdater.h:331
bool myPostureChanged
Flag indicating if posture has changed this frame.
Definition humanObserverUpdater.h:292
makVre::DtLinearInterpolator< DtVector > * myFirstPersonModelTranslationOffsetInterpolator
Interpolator for first-person model translation offset.
Definition humanObserverUpdater.h:319
double getPitch()
Gets the current pitch angle of the player.
DtVector mySpineEndPosition
Position of the spine end point.
Definition humanObserverUpdater.h:223
int buildOffsetKey(ObserverAttachMode mode, HumanPosture posture)
Builds a lookup key for the offset map from posture and mode.
Definition humanObserverUpdater.h:281
DtHumanObserverUpdater()
Default constructor.
virtual void onNVGChanged(bool nvg)
Handles changes in night vision goggles state.
bool myLastNVGState
Last known state of night vision goggles.
Definition humanObserverUpdater.h:307
bool myLastFlashlightState
Last known state of the flashlight.
Definition humanObserverUpdater.h:301
void updateAttachmentOffset(double dt)
Updates the observer attachment offset based on current state.
Offset myDestinationOffset
Target destination observer offset.
Definition humanObserverUpdater.h:289
double myThirdPersonAimSpeed
Speed of third-person aiming transition.
Definition humanObserverUpdater.h:238
bool myObserverIsAttached
Flag indicating if the observer is currently attached.
Definition humanObserverUpdater.h:217
virtual void updateZoomLevel()
Updates the target zoom level based on current observer state and equipment.
void updateObserverPositionAndOrientation()
Updates the observer position and orientation based on current state.
makVrv::DtUniqueID myPlayerElementID
Unique ID of the player element.
Definition humanObserverUpdater.h:214
double myTargetZoom
Target zoom level for the observer.
Definition humanObserverUpdater.h:295
virtual ~DtHumanObserverUpdater() override
Virtual destructor.
double myLastFlashlightYaw
Last flashlight yaw angle.
Definition humanObserverUpdater.h:313
Offset myCurrentOffset
Current observer offset.
Definition humanObserverUpdater.h:286
double myAttachModeSpeed
Speed of attachment mode transition.
Definition humanObserverUpdater.h:235
bool myLastCompassState
Last known state of the compass.
Definition humanObserverUpdater.h:304
bool myWasAiming
Flag indicating if the player was aiming in the previous frame.
Definition humanObserverUpdater.h:325
double myPostureChangeSpeed
Speed of posture change transition.
Definition humanObserverUpdater.h:232
virtual void updateStateAttributes() override
Updates state attributes based on current observer state.
double myLastFlashlightPitch
Last flashlight pitch angle.
Definition humanObserverUpdater.h:310
DtVector getCameraOffset()
Gets the current camera offset from the player.
Offset myPriorOffset
Previous observer offset.
Definition humanObserverUpdater.h:283
makVre::DtLinearInterpolator< DtVector > * myFirstPersonModelRotateOffsetInterpolator
Interpolator for first-person model rotation offset.
Definition humanObserverUpdater.h:322
std::string myScopeChannelName
Name of the scope channel.
Definition humanObserverUpdater.h:328
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:316
DtVector rotateVector(const DtVector &localSpineToCamera, double pitch, double yaw=0.0)
Rotates a vector by the specified pitch and yaw angles.
DtVector mySpineToCameraVector
Vector from spine to camera position.
Definition humanObserverUpdater.h:226
std::string myNightVisionSensorMode
Name of the observer mode to use for NVG.
Definition humanObserverUpdater.h:339
double myCutToFirstPersonDist
Distance threshold for switching to first-person view.
Definition humanObserverUpdater.h:229
virtual bool initialize(DtPlayerStation *player, DtInitTable &config) override
Initializes the observer updater component.
virtual bool observerPitchCheck()
Checks if the observer pitch is at an angle above the terrain.
makVrv::DtObserver * myObserver
Pointer to the managed observer.
Definition humanObserverUpdater.h:211
void updateScopeObserver(makVrv::DtObserver *observer)
Updates the scope observer properties.
virtual bool postInitialize() override
Performs post-initialization setup.
double myMaxObserverPitch
Maximum allowed observer pitch angle.
Definition humanObserverUpdater.h:334
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:275
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:298
virtual void updateCompassState()
Updates the compass display state.
virtual void setDestinationOffset(ObserverAttachMode mode, HumanPosture posture)
Sets the destination offset for the observer.
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
Base component for managing observer parameters and view settings.
constexpr const char * postureChangeSpeed
Definition humanObserverUpdater.h:47
constexpr const char * cutToFirstPersonDist
Definition humanObserverUpdater.h:38
constexpr const char * thirdPersonAimSpeed
Definition humanObserverUpdater.h:56
constexpr const char * scopeChannelName
Definition humanObserverUpdater.h:50
constexpr const char * nightVisionSensorMode
Definition humanObserverUpdater.h:41
constexpr const char * offsets
Definition humanObserverUpdater.h:44
constexpr const char * attachModeTransitionSpeed
Definition humanObserverUpdater.h:35
constexpr const char * scopeWalkingPitch
Definition humanObserverUpdater.h:53
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:27
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
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:84
Definition appLauncherComponent.h:28
Common enumeration definitions used throughout the VREngage system.
Structure representing an observer offset configuration.
Definition humanObserverUpdater.h:242
bool operator==(const Offset &other)
Equality comparison operator.
Definition humanObserverUpdater.h:250
bool operator!=(const Offset &other)
Inequality comparison operator.
Definition humanObserverUpdater.h:258
Offset & operator=(const Offset &other)
Assignment operator.
Definition humanObserverUpdater.h:266
DtVector pos
Position offset vector.
Definition humanObserverUpdater.h:243
HumanPosture posture
Human posture associated with this offset.
Definition humanObserverUpdater.h:244
ObserverAttachMode mode
Observer attachment mode associated with this offset.
Definition humanObserverUpdater.h:245
Defines the base class for all VREngage messages.