VR-Engage  2.2
Loading...
Searching...
No Matches
DtFpsOrientationUpdater.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file DtFpsOrientationUpdater.h
7//! \brief Defines DtFpsOrientationUpdater for managing orientation in FPS mode
8//! \ingroup vreHumanFrontend
9
10#pragma once
11
12
14
15#include <vrvCore/DtSceneObjectUpdater.h>
16
17namespace makVrv
18{
19//! \brief Forward declaration of the model instance class
20class DtModelInstance;
21
22//! \brief Forward declaration of the OSG model instance class
23class DtOsgModelInstance;
24} // namespace makVrv
25
26namespace osg
27{
28//! \brief Forward declaration of the OSG node class
29class Node;
30} // namespace osg
31
32using namespace makVrv;
33
34namespace makVre
35{
36//! \brief Forward declaration of the player station class
37class DtPlayerStation;
38
39//! \brief Updater for controlling orientation in first-person shooter mode
40//!
41//! DtFpsOrientationUpdater controls the orientation of scene objects
42//! in first-person shooter mode. It allows setting the heading of the model
43//! and updates the object's orientation accordingly each frame.
44class HUMAN_DLL DtFpsOrientationUpdater : public DtSceneObjectUpdater
45{
46public:
47 //! \brief Constructor
48 //! \param de Reference to the display element
49 //! \param id Unique identifier for this updater
50 DtFpsOrientationUpdater(DtDe& de, DtUniqueID id);
51
52 //! \brief Virtual destructor
53 virtual ~DtFpsOrientationUpdater() override;
54
55 //! \brief Updates the orientation for the current frame
56 //! \param tNow Current simulation time
57 //!
58 //! Updates the scene object's orientation based on the current model heading
59 //! and yaw configuration.
60 virtual void update(DtTime tNow) override;
61
62 //! \brief Sets the heading of the model
63 //! \param heading Heading angle in degrees
64 //! \param useYaw Flag indicating whether to use yaw rotation or direct orientation
65 //!
66 //! Controls the heading rotation of the model. When useYaw is true, the heading is
67 //! applied as a yaw rotation. Otherwise, it's applied as a direct orientation change.
68 virtual void setModelHeading(double heading, bool useYaw);
69
70protected:
71 //! \brief Current heading angle of the model in degrees
73
74 //! \brief Flag indicating whether to use yaw rotation or direct orientation
76};
77} // namespace makVre
bool myUseYaw
Flag indicating whether to use yaw rotation or direct orientation.
Definition DtFpsOrientationUpdater.h:75
virtual void setModelHeading(double heading, bool useYaw)
Sets the heading of the model.
DtFpsOrientationUpdater(DtDe &de, DtUniqueID id)
Constructor.
virtual ~DtFpsOrientationUpdater() override
Virtual destructor.
double myModelHeading
Current heading angle of the model in degrees.
Definition DtFpsOrientationUpdater.h:72
virtual void update(DtTime tNow) override
Updates the orientation for the current frame.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
Defines export macros for the Human Frontend library.
#define HUMAN_DLL
Definition export.h:19
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
Definition appLauncherComponent.h:28
Definition DtSceneObjectMimicUpdater.h:31
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.