17#include <vrfobjcore/controllerComponent.h>
18#include <vrfmodel/joystickControllerInterface.h>
23class DtSimulationServices;
24class DtJoyDeviceControllerDescriptor;
26class DtHumanMovementControlOutputPortGroup;
27class DtHumanStateRepository;
28class DtBooleanOutputPort;
29class DtIntegerOutputPort;
30class DtAnalogOutputPort;
46 public DtJoystickControllerInterface
58 DtComponentDescriptor* desc, DtReaderWriterRegistry* parentRegistry = 0);
70 virtual const char*
type()
const override;
96 static DtSimComponent*
creator(
const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
97 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
128 const DtString& functionGroup,
const DtString& function,
double value,
bool repeat)
override;
double myYaw
Current yaw (turning) input value from joystick.
Definition humanJoystickMovementController.h:209
double mySpeedFactor
Speed multiplier for movement.
Definition humanJoystickMovementController.h:193
DtHumanMovementControlOutputPortGroup * myHumanMovementControlOutputPortGroup
Output port group for human movement control.
Definition humanJoystickMovementController.h:156
DtHumanJoystickMovementController(const DtHumanJoystickMovementController &orig)
Copy constructor (not implemented)
double myTurningRate
Rate of turning in response to inputs.
Definition humanJoystickMovementController.h:187
virtual void joystickConnected() override
Handles joystick connection event.
double myFrontendPitch
Current frontend (view) pitch angle.
Definition humanJoystickMovementController.h:226
bool mySetYaw
Flag indicating whether to set an absolute yaw value.
Definition humanJoystickMovementController.h:243
DtHumanJoystickMovementController(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry=0)
Constructor.
virtual bool createPortGroups() override
Creates port groups for this component.
DtBooleanOutputPort * myIsMovingPort
Output port indicating movement state.
Definition humanJoystickMovementController.h:163
DtHumanJoystickMovementController & operator=(const DtHumanJoystickMovementController &orig)
Assignment operator (not implemented)
virtual void calcAndSetPortValues(const DtString &functionGroup, const DtString &function, double value, bool repeat) override
Processes joystick input and updates output ports.
const DtVreHumanJoystickMovementControllerDescriptor * myComponentDescriptor
Pointer to the movement controller descriptor.
Definition humanJoystickMovementController.h:182
DtIntegerOutputPort * myStaticPostureOutputPort
Output port for static posture control.
Definition humanJoystickMovementController.h:170
double myFrontendYaw
Current frontend (view) yaw angle.
Definition humanJoystickMovementController.h:220
double myStrafe
Current strafe (sideways) movement input value.
Definition humanJoystickMovementController.h:203
DtHumanJoystickMovementController()
Default constructor (not implemented)
virtual const char * type() const override
Gets the type identifier for this component.
double myForward
Current forward/backward movement input value.
Definition humanJoystickMovementController.h:198
virtual bool createPorts() override
Creates input and output ports for this component.
virtual ~DtHumanJoystickMovementController() override
Virtual destructor.
DtHumanStateRepository * myHumanStateRepository
Pointer to the human state repository.
Definition humanJoystickMovementController.h:176
double myMouseYaw
Current yaw (turning) input value from mouse.
Definition humanJoystickMovementController.h:214
bool myAssertCurrentPosture
Flag indicating whether to force posture state.
Definition humanJoystickMovementController.h:237
virtual void tick() override
Updates the controller state each simulation frame.
int myCurrentPosture
Current posture state of the human entity.
Definition humanJoystickMovementController.h:231
virtual void joystickDisconnected() override
Handles joystick disconnection event.
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Factory method to create a new instance of this component.
double mySetYawValue
Absolute yaw value to set when mySetYaw is true.
Definition humanJoystickMovementController.h:249
Human joystick movement controller descriptor for VREngage.
Definition vreHumanJoystickMovementControllerDescriptor.h:33
Defines export macros for the vreVrfmodel library.
#define VREVRFMODEL_DLL
Definition export.h:22
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
const char DtVreHumanJoystickMovementControllerType[]
Type identifier for the human joystick movement controller component.
Definition humanJoystickMovementController.h:35
Human joystick movement controller descriptor for VREngage.