Support Forum G3D Web Page |
Wand with buttons and joysticks or equivalent. More...
Inherits G3D::XR::Object.
Inherited by G3D::OpenVR::OpenVRController.
Public Member Functions | |
virtual float | angleDelta (JoystickIndex s) const =0 |
Value of the joystick axis a. More... | |
virtual bool | currentlyDown (GKey b) const =0 |
State (true = pressed, false = released) of the button at the end of the frame. More... | |
virtual Vector2 | delta (JoystickIndex s) const =0 |
const CFrame & | frame () const |
Where the AR/VR system estimates the object will be at the time of the next HMD::submit() call, in the room coordinate frame. More... | |
virtual bool | hasPhysicalJoystick () const =0 |
virtual bool | hasTouchpad () const =0 |
const int | index () const |
Zero-based index in the XR::objectArray. More... | |
virtual bool | isController () const override |
virtual bool | isHMD () const |
virtual bool | isLeft () const =0 |
Is currently in the left hand. More... | |
virtual bool | isRight () const =0 |
Is currently in the right hand. More... | |
virtual bool | justPressed (GKey b) const =0 |
Was this button pressed at least once since the previous simulation frame? More... | |
virtual bool | justReleased (GKey b) const =0 |
Was this button released at least once since the previous simulation frame? More... | |
virtual String | modelFilename () const =0 |
Name of an .ArticulatedModel.Any file to use as the 3D representation of this controller. More... | |
const String & | name () const |
Unique identifier. More... | |
int | nativeAPIIndex () const |
Index of this object in the underlying OS API (e.g., OVR, OpenVR, SteamVR) More... | |
const CFrame & | previousFrame () const |
Frame that was predicted at the previous HMD::submit() time. More... | |
virtual Vector2 | stickPosition (JoystickIndex s) const =0 |
Static Public Member Functions | |
static shared_ptr< Object > | create (int index, int nativeAPIIndex, const String &name) |
Protected Member Functions | |
Controller (int index, int nativeAPIIndex, const String &name) | |
Static Protected Member Functions | |
template<class T , class ... ArgTypes> | |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
Like std::make_shared, but works for protected constructors. More... | |
Protected Attributes | |
CFrame | m_frame |
int | m_index |
String | m_name |
int | m_nativeAPIIndex |
CFrame | m_previousFrame |
Wand with buttons and joysticks or equivalent.
The order of button press and release within a frame is not available under this API, however, it is almost impossible for a human to press and release a button in 11 ms for a 90 Hz renderer so the distinction is likely irrelevant.
|
inlineprotected |
|
pure virtual |
Value of the joystick axis a.
Returns the counter-clockwise angle in radians that the stick has rotated through since the last HMD::submit
Implemented in G3D::OpenVR::OpenVRController.
|
inlinestaticinherited |
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
|
pure virtual |
State (true = pressed, false = released) of the button at the end of the frame.
Implemented in G3D::OpenVR::OpenVRController.
|
pure virtual |
Implemented in G3D::OpenVR::OpenVRController.
|
inlineinherited |
Where the AR/VR system estimates the object will be at the time of the next HMD::submit() call, in the room coordinate frame.
|
pure virtual |
Implemented in G3D::OpenVR::OpenVRController.
|
pure virtual |
Implemented in G3D::OpenVR::OpenVRController.
|
inlineinherited |
Zero-based index in the XR::objectArray.
Referenced by G3D::XR::Object::create(), G3D::OpenVR::OpenVRController::create(), G3D::EmulatedXR::EmulatedHMD::create(), and G3D::XR::Hand::create().
|
inlineoverridevirtual |
Reimplemented from G3D::XR::Object.
|
inlinevirtualinherited |
Reimplemented in G3D::XR::HMD.
|
pure virtual |
Is currently in the left hand.
Implemented in G3D::OpenVR::OpenVRController.
|
pure virtual |
Is currently in the right hand.
Implemented in G3D::OpenVR::OpenVRController.
|
pure virtual |
Was this button pressed at least once since the previous simulation frame?
Implemented in G3D::OpenVR::OpenVRController.
|
pure virtual |
Was this button released at least once since the previous simulation frame?
Implemented in G3D::OpenVR::OpenVRController.
|
pure virtual |
Name of an .ArticulatedModel.Any file to use as the 3D representation of this controller.
Implemented in G3D::OpenVR::OpenVRController.
|
inlineinherited |
Unique identifier.
Referenced by G3D::XR::Object::create(), G3D::OpenVR::OpenVRController::create(), G3D::EmulatedXR::EmulatedHMD::create(), and G3D::XR::Hand::create().
|
inlineinherited |
Index of this object in the underlying OS API (e.g., OVR, OpenVR, SteamVR)
Referenced by G3D::XR::Object::create(), G3D::EmulatedXR::EmulatedHMD::create(), and G3D::XR::Hand::create().
|
inlineinherited |
Frame that was predicted at the previous HMD::submit() time.
|
pure virtual |
Implemented in G3D::OpenVR::OpenVRController.
|
protectedinherited |
Referenced by G3D::XR::Object::frame().
|
protectedinherited |
Referenced by G3D::XR::Object::index().
|
protectedinherited |
Referenced by G3D::XR::Object::name().
|
protectedinherited |
Referenced by G3D::XR::Object::nativeAPIIndex().
|
protectedinherited |
Referenced by G3D::XR::Object::previousFrame().