|
VR-Engage
2.2
|
DtFpsFirstPersonUpdater extends the scene object mimic updater to provide specific control over a first-person model. It manages pitch and heading rotations of the model relative to the parent entity, with configurable pivot joints and rotation axes. This class is used primarily for the first-person view in the human role to control model orientation.
#include <DtFpsFirstPersonUpdater.h>
Public Member Functions | |
| DtFpsFirstPersonUpdater (DtDe &de, DtUniqueID id) | |
| virtual | ~DtFpsFirstPersonUpdater () override |
| virtual void | setModelPitch (float pitch) |
| virtual void | setModelHeading (float heading) |
| virtual void | setPitchAxis (char axis) |
| virtual void | setBaseRotation (DtVector yawPitchRoll) |
| virtual void | setPivotJoint (std::string jointName) |
Public Member Functions inherited from makVre::DtSceneObjectMimicUpdater | |
| DtSceneObjectMimicUpdater (DtDe &de, DtUniqueID id) | |
| virtual | ~DtSceneObjectMimicUpdater () override |
| virtual void | update (DtTime tNow) override |
| virtual void | setParentSceneObject (DtUniqueID id) |
| virtual void | setModelOffset (const DtVector &offset) |
Protected Types | |
| enum | Axis { X , Y , Z } |
Protected Member Functions | |
| virtual void | initModel (DtModelInstance *modelInstance) override |
| virtual void | setupOsgNode (osg::Node *node) override |
| virtual void | updatePosition (DtTime tNow) override |
Protected Member Functions inherited from makVre::DtSceneObjectMimicUpdater | |
| virtual void | checkModel () |
| virtual void | setupOsgNodes (DtOsgModelInstance *osgModelInstance) |
| virtual void | slot_parentSceneObjectToBeDeleted (const DtUniqueID &id) |
Protected Attributes | |
| std::string | myDIGuyCharacterName |
| float | myModelPitch |
| float | myModelHeading |
| bool | myModelAiming |
| Axis | myPitchAxis |
| std::string | myBaseJoint |
| std::string | myPivotJoint |
| DtTaitBryan | myModelRotationDegrees |
Protected Attributes inherited from makVre::DtSceneObjectMimicUpdater | |
| DtSceneObject * | myParentSceneObject |
| DtModelInstance * | myModelInstance |
| DtVector | myModelOffset |
| double | myLinearSpeed |
| double | myYawSpeed |
|
protected |
| makVre::DtFpsFirstPersonUpdater::DtFpsFirstPersonUpdater | ( | DtDe & | de, |
| DtUniqueID | id ) |
Constructor.
| de | Reference to the display element |
| id | Unique identifier for this updater |
References de().
|
overridevirtual |
Virtual destructor.
|
virtual |
Sets the pitch of the first-person model.
| pitch | Pitch angle in degrees |
Controls the pitch rotation of the first-person model, relative to the parent entity's SceneObject orientation.
|
virtual |
Sets the heading of the first-person model.
| heading | Heading angle in degrees |
Controls the heading rotation of the first-person model, relative to the parent entity's SceneObject orientation.
|
virtual |
Sets the axis used for pitch rotation.
| axis | Character representing the axis ('X', 'Y', or 'Z') |
Configuration parameter that controls which axis is used by setModelPitch. Default is 'Y'.
|
virtual |
Sets the base rotation for the first-person model.
| yawPitchRoll | Vector containing yaw, pitch, and roll values in degrees |
Configuration parameter that sets a base rotation for the first-person model. Values from setModelPitch and setModelHeading are added to this base rotation. Value is relative to the parent entity's SceneObject. Default is (0,0,0).
|
virtual |
Sets the pivot joint for model rotation.
| jointName | Name of the skeletal joint to use as pivot |
Configuration parameter that specifies the name of the skeletal joint in the first-person model around which the model should be rotated. Default is "cervical".
|
overrideprotectedvirtual |
Initializes the model instance.
| modelInstance | Pointer to the model instance to initialize |
Reimplemented from makVre::DtSceneObjectMimicUpdater.
|
overrideprotectedvirtual |
Sets up the OSG node.
| node | Pointer to the OSG node to set up |
Reimplemented from makVre::DtSceneObjectMimicUpdater.
|
overrideprotectedvirtual |
Updates the position and orientation for the current frame.
| tNow | Current simulation time |
Reimplemented from makVre::DtSceneObjectMimicUpdater.
|
protected |
Name of the DIGuy character model.
|
protected |
Current pitch angle of the model in degrees.
|
protected |
Current heading angle of the model in degrees.
|
protected |
Flag indicating if the model is in aiming pose.
|
protected |
Current axis used for pitch rotation.
|
protected |
Name of the base joint for the model.
|
protected |
Name of the pivot joint for model rotation.
|
protected |
Base rotation of the model in degrees using Tait-Bryan angles.