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

Detailed Description

This component captures gamepad/joystick and keyboard/mouse inputs for left and right vehicle blinkers. When the user activates a blinker via a button press or keypress, this class receives the input and sends a corresponding joystick message to the simulation engine backend where the blinker state is updated.

#include <vehicleBlinkerControlLogic.h>

Inheritance diagram for DtVehicleBlinkerControlLogic:
[legend]

Public Member Functions

 DtVehicleBlinkerControlLogic ()
 
virtual ~DtVehicleBlinkerControlLogic () override
 
virtual const char * type () const override
 
virtual bool initialize (makVre::DtPlayerStation *player, makVre::DtInitTable &config) override
 
virtual void setLeftBlinker (double val)
 
virtual void setRightBlinker (double val)
 
- Public Member Functions inherited from makVre::DtEntityControlLogic
 DtEntityControlLogic ()
 
virtual ~DtEntityControlLogic () override
 
virtual bool postInitialize () override
 
virtual void tick (double dt) override
 
virtual void shutdown () 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 Member Functions

virtual void sendJoystickMessage (const std::string &function, double val, double delay=0)
 
- Protected Member Functions inherited from makVre::DtEntityControlLogic
virtual void takeControlOfPlayerEntity ()
 
virtual void releaseControlOfPlayerEntity ()
 
- Protected Member Functions inherited from makVre::DtPlayerComponent
virtual void initializeStateAttributes ()
 

Protected Attributes

makVre::DtInputLogic myInputLogic
 
std::string myMainJoystickGroup
 
- 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
 

Constructor & Destructor Documentation

◆ DtVehicleBlinkerControlLogic()

DtVehicleBlinkerControlLogic::DtVehicleBlinkerControlLogic ( )

◆ ~DtVehicleBlinkerControlLogic()

virtual DtVehicleBlinkerControlLogic::~DtVehicleBlinkerControlLogic ( )
overridevirtual

Member Function Documentation

◆ type()

virtual const char * DtVehicleBlinkerControlLogic::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 DtEntityControlLogicType.

Reimplemented from makVre::DtEntityControlLogic.

◆ initialize()

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

Initializes the entity control logic.

Parameters
playerPointer to the player station this component belongs to
configConfiguration table with initialization parameters
Returns
True if initialization was successful, false otherwise

Initializes the entity control component with the specified player station and configuration. Registers message handlers and sets up input mappings.

Reimplemented from makVre::DtEntityControlLogic.

References makVre::DtPlayerComponent::player().

◆ setLeftBlinker()

virtual void DtVehicleBlinkerControlLogic::setLeftBlinker ( double val)
virtual

◆ setRightBlinker()

virtual void DtVehicleBlinkerControlLogic::setRightBlinker ( double val)
virtual

◆ sendJoystickMessage()

virtual void DtVehicleBlinkerControlLogic::sendJoystickMessage ( const std::string & function,
double val,
double delay = 0 )
protectedvirtual

Member Data Documentation

◆ myInputLogic

makVre::DtInputLogic DtVehicleBlinkerControlLogic::myInputLogic
protected

◆ myMainJoystickGroup

std::string DtVehicleBlinkerControlLogic::myMainJoystickGroup
protected

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