20#include <matrix/vlVector.h>
21#include <matrix/vlQuaternion.h>
88 virtual void tick(
double dt)
override;
96 virtual const char*
type()
const override;
Type-specific handle class for attributes.
Definition attributeHandle.h:229
int myAttachPart
ID of the part to attach the observer to (e.g., gun barrel)
Definition gunnerObserverUpdater.h:139
std::map< enum SensorViews, std::string > mySensorModes
Map of SensorViews enums to VR-Engage sensor mode names.
Definition gunnerObserverUpdater.h:155
virtual const char * type() const override
Returns the type identifier for this component.
DtAttributeHandleType< bool > myZoomChangedAttr
Attribute handle indicating whether the zoom level has changed and the interpolator needs updating.
Definition gunnerObserverUpdater.h:163
DtAttributeHandleType< std::string > myCurrentSensorNameAttr
Attribute handle storing the display name of the currently active sensor mode.
Definition gunnerObserverUpdater.h:183
DtAttributeHandleType< double > myZoomAttr
Attribute handle storing the current zoom magnification level.
Definition gunnerObserverUpdater.h:167
makVrv::DtObserver * myObserver
Pointer to the observer object being controlled.
Definition gunnerObserverUpdater.h:133
DtAttributeHandleType< int > myCurrentSensorAttr
Attribute handle storing the active sensor view index (0=Visual, 1=NVG, 2=Thermal-white,...
Definition gunnerObserverUpdater.h:171
DtAttributeHandleType< DtDamageState > myDamageStateAttr
Attribute handle storing the ownship's current damage state.
Definition gunnerObserverUpdater.h:175
virtual ~DtGunnerObserverUpdater() override
Destructor for DtGunnerObserverUpdater.
makVre::DtLinearInterpolator< double > * myZoomInterpolator
Interpolator for smooth zoom level transitions.
Definition gunnerObserverUpdater.h:136
DtAttributeHandleType< std::vector< std::string > > mySensorModesAttr
Attribute handle storing the list of available sensor mode name strings.
Definition gunnerObserverUpdater.h:179
void updateDestroyed()
Updates observer behavior when the vehicle is destroyed.
DtVector myAttachedOffset
Position offset from the attachment point.
Definition gunnerObserverUpdater.h:142
DtQuaternion myOriOffest
Orientation offset from the attachment point.
Definition gunnerObserverUpdater.h:145
virtual makVre::DtVreMessageResult handlePlayerCreated(makVre::DtVreMessage *msg)
Handles player creation messages.
DtGunnerObserverUpdater()
Constructor for DtGunnerObserverUpdater.
virtual void tick(double dt) override
Called every frame to update the gunner observer.
DtAttributeHandleType< int > myResetObserverAttr
Attribute handle tracking a countdown for resetting the observer position.
Definition gunnerObserverUpdater.h:159
SensorViews myLastSensorViewMode
Currently active sensor view mode.
Definition gunnerObserverUpdater.h:148
virtual bool initialize(DtPlayerStation *player, DtInitTable &config) override
Initializes the gunner observer updater component.
virtual makVre::DtVreMessageResult handlePlayerReset(makVre::DtVreMessage *msg)
Handles player reset messages.
virtual void shutdown() override
Shuts down the gunner observer updater component.
void resetObserver()
Resets the observer to the proper attachment point and orientation.
void updateSensor()
Updates the observer's sensor mode based on player state.
bool myAttached
Flag indicating if the observer is attached to a scene object.
Definition gunnerObserverUpdater.h:130
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
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Base component for managing observer parameters and view settings.
constexpr const char * oriOffset
\vreRoleParam{oriOffset,DtQuaternion,"DtQuaternion(0,0,0,1)",gunnerObserverUpdater,...
Definition gunnerObserverUpdater.h:45
constexpr const char * attachPart
Definition gunnerObserverUpdater.h:42
constexpr const char * attachOffset
Definition gunnerObserverUpdater.h:39
constexpr const char * sensorModes
Definition gunnerObserverUpdater.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
Provides a template class for linear interpolation between values.
Definition gunnerObserverUpdater.h:31
!
Definition glsVreMessageUtil.h:50
constexpr const char * DtGunnerObserverUpdaterType
Type identifier for DtGunnerObserverUpdater component.
Definition gunnerObserverUpdater.h:56
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
SensorViews
Enumeration of available sensor view modes.
Definition stateDefines.h:18
Definition appLauncherComponent.h:28
Common enumeration definitions used throughout the VREngage system.
Defines the base class for all VREngage messages.