|
VR-Engage
2.3
|
Connection hooks persist enabled-state transitions. Device-request overrides persist count-only changes without duplicating the hook writes. Concrete controllers restore the saved flag and exact request count during first-tick initialization after incoming ownership transfer. No handoff listeners are used. State helpers create VreJoystickControllers.Controllers and its Enabled/RequestCount structure prototype on demand. SMS internal-state-data declarations are not required. The ownership-transfer archive carries the property types, prototype, and values. Static overloads share state persistence with controllers that already inherit the VRF joystick interface, without adding a second interface subobject.
#include <vreJoystickControllerInterface.h>
Public Member Functions | |
| DtVreJoystickControllerInterface (DtSimComponent *component, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc) | |
| virtual | ~DtVreJoystickControllerInterface () override |
| DtVreJoystickControllerInterface (const DtVreJoystickControllerInterface &)=delete | |
| DtVreJoystickControllerInterface & | operator= (const DtVreJoystickControllerInterface &)=delete |
| DtVreJoystickControllerInterface (DtVreJoystickControllerInterface &&)=delete | |
| DtVreJoystickControllerInterface & | operator= (DtVreJoystickControllerInterface &&)=delete |
Static Public Member Functions | |
| static void | updateJoystickState (DtSimComponent &component, DtLocalObject &owner, bool enabled, int requestCount) |
| static bool | restoreJoystickState (DtSimComponent &component, DtLocalObject &owner, bool incomingTransfer, bool &enabled, int &requestCount, bool hasDescriptor) |
Protected Member Functions | |
| void | updateJoystickState () |
| void | restoreJoystickState () |
| virtual void | processJoyDeviceRequest (DtSimMessage *msg) override |
Static Private Member Functions | |
| static DtRwPropertiesMap * | createJoystickStateMap (DtRwProperties &context, DtLocalObject &owner) |
| static DtRwPropertiesStructure * | joystickStateProperties (DtSimComponent &component, DtLocalObject &owner, bool create) |
Private Attributes | |
| DtSimComponent & | myJoystickComponent |
| bool | myRestoreJoystickState |
| makVre::DtVreJoystickControllerInterface::DtVreJoystickControllerInterface | ( | DtSimComponent * | component, |
| DtLocalObject * | owner, | ||
| DtSimulationServices * | simManager, | ||
| DtComponentDescriptor * | desc ) |
Constructs an interface alongside an existing component base.
| component | Non-null, non-owning component pointer used for controller identity. |
| owner | The owning local object. |
| simManager | Simulation services. |
| desc | The joystick controller descriptor. |
Referenced by DtVreJoystickControllerInterface(), DtVreJoystickControllerInterface(), operator=(), and operator=().
|
overridevirtual |
Destroys the interface; the VRF base removes its message callbacks.
|
delete |
Deleted copy constructor and assignment operator to prevent copying.
References DtVreJoystickControllerInterface().
|
delete |
References DtVreJoystickControllerInterface().
|
static |
Writes joystick state for a controller with an existing VRF interface.
| component | The component whose full name identifies the state entry. |
| owner | The owning local object. |
| enabled | The existing interface's enabled flag. |
| requestCount | The existing interface's exact request count. |
|
static |
Restores state without accessing another controller's protected interface members.
| component | The component whose full name identifies the state entry. |
| owner | The owning local object. |
| incomingTransfer | True only for the first initialization after incoming ownership transfer. |
| enabled | The existing interface's enabled flag, updated on restoration. |
| requestCount | The existing interface's request count, updated on restoration. |
| hasDescriptor | Whether the existing interface has a valid joystick descriptor. |
|
delete |
References DtVreJoystickControllerInterface().
|
delete |
References DtVreJoystickControllerInterface().
|
protected |
Writes the current enabled flag and request count to this controller's internal-state entry.
|
protected |
Restores an incoming controller's saved state during first-tick initialization.
|
overrideprotectedvirtual |
Keeps the saved count current for requests that do not invoke connection hooks.
| msg | The original joystick device request message. |
|
staticprivate |
Creates the typed controller-state map in the supplied context.
|
staticprivate |
Finds and validates a controller's state, creating missing storage only when requested.
|
private |
Non-owning reference used to identify this controller's state entry.
|
private |
Remembers incoming conversion because the owner clears it before first-tick initialization.