|
VR-Engage
2.2
|
DtVrObserverUpdater manages VR-specific visual effects for the observer, including blood sight effects, aiming effects, and other post-processing effects that are applied directly to the VR display. It handles enabling and disabling these effects based on player state.
#include <vrObserverUpdater.h>
Public Member Functions | |
| DtVrObserverUpdater () | |
| virtual | ~DtVrObserverUpdater () 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 | |
| virtual void | updateBloodSightEffects () |
| virtual void | updateAimingEffects () |
| virtual void | setEffectEnabled (const std::string &effect, bool enabled) |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
Protected Attributes | |
| makVrv::DtVirtualRealityDriver * | myVrDriver |
| bool | myLastKnownAiming |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
| DtVrObserverUpdater::DtVrObserverUpdater | ( | ) |
Default constructor.
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Initializes the VR observer updater component.
| player | Pointer to the player station |
| config | Configuration settings for initialization |
Reimplemented from makVre::DtPlayerComponent.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Updates VR visual effects 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 DtVrObserverUpdaterType.
Implements makVre::DtPlayerComponent.
|
protectedvirtual |
Updates blood sight effects based on player health.
Manages the intensity and visibility of blood overlay effects that indicate when the player is taking damage
|
protectedvirtual |
Updates aiming-related visual effects.
Manages visual effects that appear when the player is aiming a weapon
|
protectedvirtual |
Sets the enabled state of a named visual effect.
| effect | Name of the effect to control |
| enabled | True to enable the effect, false to disable it |
|
protected |
Pointer to the VR driver used to control effects.
|
protected |
Last known aiming state of the player.