VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtSpectatorSimLogic Class Reference

Detailed Description

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>

Inheritance diagram for makVre::DtSpectatorSimLogic:
[legend]

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

Constructor & Destructor Documentation

◆ DtSpectatorSimLogic()

makVre::DtSpectatorSimLogic::DtSpectatorSimLogic ( )

Default constructor.

◆ ~DtSpectatorSimLogic()

virtual makVre::DtSpectatorSimLogic::~DtSpectatorSimLogic ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ initialize()

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

Initializes the simulation logic component.

Parameters
playerPointer to the player station
configReference to the initialization configuration
Returns
True if initialization was successful, false otherwise

Sets up the spectator simulation logic and initializes input logic

Reimplemented from makVre::DtEntityControlLogic.

References makVre::DtPlayerComponent::player().

◆ tick()

virtual void makVre::DtSpectatorSimLogic::tick ( double dt)
overridevirtual

Updates simulation state each frame.

Parameters
dtDelta time since the last update in seconds

Updates the spectator simulation state based on inputs and current conditions

Reimplemented from makVre::DtEntityControlLogic.

◆ shutdown()

virtual void makVre::DtSpectatorSimLogic::shutdown ( )
overridevirtual

Performs cleanup when the component is shut down.

Releases resources and performs necessary cleanup operations

Reimplemented from makVre::DtEntityControlLogic.

◆ type()

virtual const char * makVre::DtSpectatorSimLogic::type ( ) const
overridevirtual

Returns the component type identifier.

Returns
The component type string

Reimplemented from makVre::DtEntityControlLogic.

◆ resetView()

virtual void makVre::DtSpectatorSimLogic::resetView ( float val = 1)
virtual

Resets the view to default position.

Parameters
valReset magnitude (typically 1.0 for full reset)

Returns the view to its default orientation and position

◆ azimuth()

virtual void makVre::DtSpectatorSimLogic::azimuth ( float val)
virtual

Adjusts the view azimuth (horizontal rotation)

Parameters
valAzimuth adjustment value

Rotates the view horizontally by the specified amount

◆ elevation()

virtual void makVre::DtSpectatorSimLogic::elevation ( float val)
virtual

Adjusts the view elevation (vertical angle)

Parameters
valElevation adjustment value

Rotates the view vertically by the specified amount

◆ zoomOut()

virtual void makVre::DtSpectatorSimLogic::zoomOut ( float val)
virtual

Zooms the view out.

Parameters
valZoom magnitude value

Increases the view distance by the specified amount

◆ zoomIn()

virtual void makVre::DtSpectatorSimLogic::zoomIn ( float val)
virtual

Zooms the view in.

Parameters
valZoom magnitude value

Decreases the view distance by the specified amount

◆ zoom()

virtual void makVre::DtSpectatorSimLogic::zoom ( float val)
virtual

Adjusts the view zoom level directly.

Parameters
valZoom level value

Sets the view zoom level to the specified value

Member Data Documentation

◆ myInputLogic

DtInputLogic makVre::DtSpectatorSimLogic::myInputLogic
protected

Input logic component for handling user inputs.

Processes user inputs and translates them into simulation actions


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