VR-Engage  2.3
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 setMouseControlEnabled (bool enabled)
 
virtual bool isMouseControlEnabled ()
 
virtual bool isMouseControlSupportAllowed () const
 
virtual void setMouseControlSupportAllowed (bool enable)
 
virtual const std::vector< std::string > & joystickGroups () const
 
virtual void sendJoystickCommand (const DtEntityIdentifier &id, const std::string &functionGroup, const std::string &function, double val, bool repeat=false)
 
virtual makVre::DtVreMessageResult handleSimState (makVre::DtVreMessage *msg)
 
virtual makVre::DtVreMessageResult handleReset (makVre::DtVreMessage *message)
 
virtual makVre::DtVreMessageResult handleCreationStatus (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 ()
 
bool componentReady () const
 
void setComponentReady (bool ready)
 
virtual DtInitTickStatus finalizeInitTick (double dt)
 
virtual void setName (const std::string &name)
 
virtual const std::string & name ()
 
virtual DtPlayerStation & player ()
 
virtual DtAttributeHandle & playerAttributeStore ()
 
virtual const DtAttributeHandle & playerAttributeStore () const
 
virtual const DtAttributeHandle & ownshipState () const
 
virtual void setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId())
 

Protected Member Functions

virtual void sendJoystickMessage (const std::string &function, double val, double delay=0)
 
- Protected Member Functions inherited from makVre::DtEntityControlLogic
bool requiresControl () const
 
bool isAirborne () const
 
void showNotification (const QString &text, double duration)
 
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
 
DtAttributeHandle myOwnshipAttr
 
DtAttributeHandleType< bool > myEmbarkedAttr
 
DtAttributeHandleType< DtEntityIdentifier > myEmbarkedHostAttr
 
DtAttributeHandleType< DtEntityType > myEmbarkedHostTypeAttr
 
DtAttributeHandleType< std::string > myEmbarkedHostMarkingAttr
 
DtAttributeHandleType< bool > myEmbarkedOnAircraftAttr
 
DtAttributeHandleType< std::string > myEmbarkedInSlotAttr
 
DtAttributeHandleType< unsigned int > myAppearanceAttr
 
DtAttributeHandleType< DtVector > myPositionAttr
 
DtAttributeHandleType< DtTaitBryan > myOrientationAttr
 
DtAttributeHandleType< double > mySpeedAttr
 
DtAttributeHandleType< DtVector32 > myVelocityAttr
 
DtAttributeHandleType< DtVector32 > myAccelerationAttr
 
DtAttributeHandleType< DtVector32 > myRotVelAttr
 
DtAttributeHandleType< DtEntityType > myEntityTypeAttr
 
DtAttributeHandleType< DtVector32 > myRelativeVelocityAttr
 
DtAttributeHandleType< DtDamageState > myDamageStateAttr
 
DtAttributeHandleType< int > mySimStateUpdateIndexAttr
 
DtAttributeHandleType< bool > myHideOccupantsAttr
 
- Protected Attributes inherited from makVre::DtPlayerComponent
bool myComponentReady = true
 
std::string myName
 
DtInitTable myConfig
 
DtPlayerStation * myPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolver * myResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 
DtVreMessageHandlerGroup myMessageHandlers
 

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: