VR-Engage  2.2
Loading...
Searching...
No Matches
DtHumanWeaponPoseLogic Class Reference

Detailed Description

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>

Inheritance diagram for DtHumanWeaponPoseLogic:
[legend]

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 DtPlayerStationplayer ()
 
virtual DtAttributeHandleplayerAttributeStore ()
 
virtual const DtAttributeHandleplayerAttributeStore () 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
 
DtPlayerStationmyPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolvermyResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 

Constructor & Destructor Documentation

◆ DtHumanWeaponPoseLogic()

DtHumanWeaponPoseLogic::DtHumanWeaponPoseLogic ( )

Default constructor.

◆ ~DtHumanWeaponPoseLogic()

virtual DtHumanWeaponPoseLogic::~DtHumanWeaponPoseLogic ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ initialize()

virtual bool DtHumanWeaponPoseLogic::initialize ( makVre::DtPlayerStation * player,
makVre::DtInitTable & config )
overridevirtual

Initializes the weapon pose logic component.

Parameters
playerPointer to the player station
configConfiguration settings for initialization
Returns
True if initialization was successful, false otherwise

Reimplemented from makVre::DtPlayerComponent.

References makVre::DtPlayerComponent::player().

◆ tick()

virtual void DtHumanWeaponPoseLogic::tick ( double dt)
overridevirtual

Updates weapon positioning for the current frame.

Parameters
dtDelta time since the last frame in seconds

Implements makVre::DtPlayerComponent.

◆ shutdown()

virtual void DtHumanWeaponPoseLogic::shutdown ( )
overridevirtual

Cleans up resources when the component is being shut down.

Reimplemented from makVre::DtPlayerComponent.

◆ type()

virtual const char * DtHumanWeaponPoseLogic::type ( ) const
overridevirtual

Returns the component type identifier.

Returns
String identifier for this component type

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.

◆ updateWeaponPosition()

void DtHumanWeaponPoseLogic::updateWeaponPosition ( )
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

Member Data Documentation

◆ myObserver

makVrv::DtObserver* DtHumanWeaponPoseLogic::myObserver
protected

Pointer to the observer used for view orientation.

◆ myUsingVr

bool DtHumanWeaponPoseLogic::myUsingVr
protected

Flag indicating if VR mode is active.


The documentation for this class was generated from the following file: