|
VR-Engage
2.2
|
This component implements the simulation logic for the spectator role, managing view control, camera movement, and spectator-specific behavior. It processes view manipulation inputs, handles zoom operations, and provides spectator view control capabilities. As an entity control logic component, it also manages entity interactions in the simulation.
#include <spectatorSimLogic.h>
Public Member Functions | |
| DtSpectatorSimLogic () | |
| virtual | ~DtSpectatorSimLogic () 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 |
Input Functions | |
| virtual void | resetView (float val=1) |
| virtual void | azimuth (float val) |
| virtual void | elevation (float val) |
| virtual void | zoomOut (float val) |
| virtual void | zoomIn (float val) |
| virtual void | zoom (float val) |
Public Member Functions inherited from makVre::DtEntityControlLogic | |
| DtEntityControlLogic () | |
| virtual | ~DtEntityControlLogic () override |
| virtual bool | postInitialize () override |
| virtual void | setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId()) |
| virtual void | setMouseControlEnabled (bool enabled) |
| virtual bool | isMouseControlEnabled () |
| virtual bool | isMouseControlSupportAllowed () const |
| virtual void | setMouseControlSupportAllowed (bool enable) |
| virtual const std::vector< std::string > & | joystickGroups () const |
| virtual makVre::DtVreMessageResult | handleSimState (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleStateMessages (makVre::DtVreMessage *message) |
| virtual makVre::DtVreMessageResult | handleReset (makVre::DtVreMessage *message) |
| virtual void | reset (float val) |
| virtual void | resetInPlace (float val) |
| virtual void | toggleMouseControl (float val) |
| virtual void | enableMouseControl (float val) |
| virtual makVre::DtVreMessageResult | handleFocusMessage (makVre::DtVreMessage *message) |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Attributes | |
| DtInputLogic | myInputLogic |
Protected Attributes inherited from makVre::DtEntityControlLogic | |
| std::vector< std::string > | myJoystickFunctionGroups |
| DtInputLogic | myCommonInputLogic |
| std::string | myInputConfigFile |
| bool | myMouseControlEnabled |
| bool | myMouseControlSupportAllowed |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
Additional Inherited Members | |
Protected Member Functions inherited from makVre::DtEntityControlLogic | |
| virtual void | takeControlOfPlayerEntity () |
| virtual void | releaseControlOfPlayerEntity () |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
| makVre::DtSpectatorSimLogic::DtSpectatorSimLogic | ( | ) |
Default constructor.
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Initializes the simulation logic component.
| player | Pointer to the player station |
| config | Reference to the initialization configuration |
Sets up the spectator simulation logic and initializes input logic
Reimplemented from makVre::DtEntityControlLogic.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Updates simulation state each frame.
| dt | Delta time since the last update in seconds |
Updates the spectator simulation state based on inputs and current conditions
Reimplemented from makVre::DtEntityControlLogic.
|
overridevirtual |
Performs cleanup when the component is shut down.
Releases resources and performs necessary cleanup operations
Reimplemented from makVre::DtEntityControlLogic.
|
overridevirtual |
Returns the component type identifier.
Reimplemented from makVre::DtEntityControlLogic.
|
virtual |
Resets the view to default position.
| val | Reset magnitude (typically 1.0 for full reset) |
Returns the view to its default orientation and position
|
virtual |
Adjusts the view azimuth (horizontal rotation)
| val | Azimuth adjustment value |
Rotates the view horizontally by the specified amount
|
virtual |
Adjusts the view elevation (vertical angle)
| val | Elevation adjustment value |
Rotates the view vertically by the specified amount
|
virtual |
Zooms the view out.
| val | Zoom magnitude value |
Increases the view distance by the specified amount
|
virtual |
Zooms the view in.
| val | Zoom magnitude value |
Decreases the view distance by the specified amount
|
virtual |
Adjusts the view zoom level directly.
| val | Zoom level value |
Sets the view zoom level to the specified value
|
protected |
Input logic component for handling user inputs.
Processes user inputs and translates them into simulation actions