|
VR-Engage
2.2
|
DtHumanWeaponPoseLogic manages the positioning and orientation of weapons for the human entity, handling weapon alignment with observer view and adjustments for different postures and aiming states. This component ensures weapons appear correctly positioned relative to the player's view.
#include <humanWeaponPoseLogic.h>
Public Member Functions | |
| DtHumanWeaponPoseLogic () | |
| virtual | ~DtHumanWeaponPoseLogic () override |
| virtual bool | initialize (makVre::DtPlayerStation *player, makVre::DtInitTable &config) override |
| virtual void | tick (double dt) override |
| virtual void | shutdown () override |
| virtual const char * | type () const override |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual bool | postInitialize () |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Member Functions | |
| void | updateWeaponPosition () |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
Protected Attributes | |
| makVrv::DtObserver * | myObserver |
| bool | myUsingVr |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
| DtHumanWeaponPoseLogic::DtHumanWeaponPoseLogic | ( | ) |
Default constructor.
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Initializes the weapon pose logic component.
| player | Pointer to the player station |
| config | Configuration settings for initialization |
Reimplemented from makVre::DtPlayerComponent.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Updates weapon positioning for the current frame.
| dt | Delta time since the last frame in seconds |
Implements makVre::DtPlayerComponent.
|
overridevirtual |
Cleans up resources when the component is being shut down.
Reimplemented from makVre::DtPlayerComponent.
|
overridevirtual |
Returns the component type identifier.
Returns the type identifier string for this component, which is used by the VR-Engage framework for component identification and management. The returned value matches DtHumanWeaponPoseLogicType.
Implements makVre::DtPlayerComponent.
|
protected |
Updates the weapon position and orientation.
Calculates and applies the appropriate weapon position based on the current player state, view orientation, and VR mode settings
|
protected |
Pointer to the observer used for view orientation.
|
protected |
Flag indicating if VR mode is active.