H3D API  2.4.1
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
H3D::OculusRiftSensor Class Reference

This is a X3DSensorNode for reading values from a Oculus Rift HMD. More...

#include <H3D/OculusRiftSensor.h>

Inheritance diagram for H3D::OculusRiftSensor:
Inheritance graph

Classes

class  RecenterTrackingField
 This class is an AutoUpdate class that sets the field accumulatedRotation to its input value and also sets accumulatedYaw, accumulatedPitch and accumulatedRoll to a value dependent on input value. More...
 

Public Member Functions

 OculusRiftSensor (Inst< SFBool > _enabled=0, Inst< SFNode > _metadata=0, Inst< SFBool > _isActive=0, Inst< SFVec3f > _headPosition=0, Inst< SFRotation > _headOrientation=0, Inst< PerformanceStatsField > _performanceStats=0, Inst< RecenterTrackingField > _recenterTracking=0, Inst< MSAAEnabledField > _MSAAEnabled=0, Inst< SFVec3f > _leftHandPosition=0, Inst< SFRotation > _leftHandOrientation=0, Inst< SFFloat > _leftHandTrigger=0, Inst< SFFloat > _leftHandIndexTrigger=0, Inst< SFVec2f > _leftHandThumbstick=0, Inst< SFFloat > _leftHandVibrationFrequency=0, Inst< SFFloat > _leftHandVibrationAmplitude=0, Inst< SFVec3f > _rightHandPosition=0, Inst< SFRotation > _rightHandOrientation=0, Inst< SFFloat > _rightHandTrigger=0, Inst< SFFloat > _rightHandIndexTrigger=0, Inst< SFVec2f > _rightHandThumbstick=0, Inst< SFFloat > _rightHandVibrationFrequency=0, Inst< SFFloat > _rightHandVibrationAmplitude=0, Inst< SFInt32 > _buttons=0, Inst< SFInt32 > _touches=0)
 Constructor.
 
- Public Member Functions inherited from H3D::X3DSensorNode
 X3DSensorNode (Inst< SFBool > _enabled=0, Inst< SFNode > _metadata=0, Inst< SFBool > _isActive=0)
 Constructor.
 
- Public Member Functions inherited from H3D::X3DChildNode
 X3DChildNode (Inst< SFNode > _metadata=0)
 Constructor.
 
- Public Member Functions inherited from H3D::X3DNode
 X3DNode (Inst< SFNode > _metadata=0)
 Constructor.
 
X3DMetadataObjectgetMetadataByName (const string &_name)
 Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More...
 
- Public Member Functions inherited from H3D::Node
 Node ()
 Constructor.
 
virtual Nodeclone (bool deepCopy=true, DeepCopyMap *deepCopyMap=NULL)
 Returns a new instance of this node type with the same state as this one. More...
 
virtual ~Node ()
 Destructor.
 
X3DPrototypeInstancegetProtoInstanceParent ()
 If this node is the root node in the proto body of a X3DPrototypeInstance then this will return that node. More...
 
void setProtoInstanceParent (X3DPrototypeInstance *p)
 Set the X3DPrototypeInstance this node is the the root node if applicaple.
 
virtual void render ()
 the render() function is used for the depth-first rendering traversal of the scene-graph. More...
 
virtual void traverseSG (TraverseInfo &ti)
 traverseSG is called once per scenegraph loop on the scene in order to traverse the scenegraph. More...
 
virtual bool lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result)
 Detect intersection between a line segment and the Node. More...
 
virtual void closestPoint (const Vec3f &p, NodeIntersectResult &result)
 Find closest point on Node to p. More...
 
virtual bool movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result)
 Detect collision between a moving sphere and the Node. More...
 
virtual string defaultXMLContainerField ()
 Returns the default xml containerField attribute value. More...
 
virtual FieldgetField (const string &_name) const
 return a pointer to the field specified by name within this instance
 
int addDestructCallback (void(*func)(Node *, void *), void *args)
 Add a callback function to be run on destruction of node. More...
 
int removeDestructCallback (void(*func)(Node *, void *), void *args)
 Add a callback function to be run on destruction of node. More...
 

Public Attributes

H3DUniquePtr< SFVec3fheadPosition
 Contains the current head translation as reported by the device. More...
 
H3DUniquePtr< SFRotationheadOrientation
 Contains the current head orientation around the x-axis as reported by the device. More...
 
H3DUniquePtr< PerformanceStatsField > performanceStats
 Makes it possible to show performance stats of the oculus. More...
 
H3DUniquePtr< RecenterTrackingFieldrecenterTracking
 Recenter the tracking for oculus. More...
 
H3DUniquePtr< MSAAEnabledField > MSAAEnabled
 Controls multi sample anti aliasing on the oculus. More...
 
H3DUniquePtr< SFVec3fleftHandPosition
 The position of the left touch controller. More...
 
H3DUniquePtr< SFRotationleftHandOrientation
 The orientation of the left touch controller. More...
 
H3DUniquePtr< SFFloatleftHandTrigger
 The value for the left hand trigger. More...
 
H3DUniquePtr< SFFloatleftHandIndexTrigger
 The value for the left hand index trigger. More...
 
H3DUniquePtr< SFVec2fleftHandThumbstick
 The value for the left hand thumb stick. More...
 
H3DUniquePtr< SFFloatleftHandVibrationFrequency
 Used to control the vibration frequency of the left touch controller. More...
 
H3DUniquePtr< SFFloatleftHandVibrationAmplitude
 Used to control the vibration amplitude of the left touch controller. More...
 
H3DUniquePtr< SFVec3frightHandPosition
 The position of the right touch controller. More...
 
H3DUniquePtr< SFRotationrightHandOrientation
 The orientation of the right touch controller. More...
 
H3DUniquePtr< SFFloatrightHandTrigger
 The value for the right hand trigger. More...
 
H3DUniquePtr< SFFloatrightHandIndexTrigger
 The value for the right hand index trigger. More...
 
H3DUniquePtr< SFVec2frightHandThumbstick
 The value for the right hand thumb stick. More...
 
H3DUniquePtr< SFFloatrightHandVibrationFrequency
 Used to control the vibration frequency of the right touch controller. More...
 
H3DUniquePtr< SFFloatrightHandVibrationAmplitude
 Used to control the vibration amplitude of the right touch controller. More...
 
H3DUniquePtr< SFInt32buttons
 Indicates which buttons are pressed. More...
 
H3DUniquePtr< SFInt32touches
 Setting some touched output state. More...
 
- Public Attributes inherited from H3D::X3DSensorNode
H3DUniquePtr< SFBoolenabled
 If enabled is true the sensor node is enabled otherwise it is disabled and will not generate any output. More...
 
H3DUniquePtr< SFBoolisActive
 A sensor is active when some special conditions are fulfilled and it will then generate extra output. More...
 
- Public Attributes inherited from H3D::X3DNode
H3DUniquePtr< SFNodemetadata
 Meta data about the node. More...
 

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 
- Static Public Attributes inherited from H3D::X3DSensorNode
static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 
- Static Public Attributes inherited from H3D::X3DNode
static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 

Additional Inherited Members

- Public Types inherited from H3D::Node
typedef std::map< Node *, Node * > DeepCopyMap
 A map type used during a deep copy clone() to map from original nodes to cloned nodes.
 
- Static Public Member Functions inherited from H3D::Node
static unsigned int nrNodesAlive ()
 Returns the nr of nodes currently alive, i.e. nodes created but not destructed.
 
static int nrNodesCreated ()
 Returns the number of nodes created in total since the start of the program.
 
- Protected Member Functions inherited from H3D::Node
void cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for the clone() method. More...
 
- Static Protected Member Functions inherited from H3D::Node
static NodegetClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for nodes that implement clone() More...
 

Detailed Description

This is a X3DSensorNode for reading values from a Oculus Rift HMD.

Examples:

Internal routes:

Member Data Documentation

◆ buttons

H3DUniquePtr< SFInt32 > H3D::OculusRiftSensor::buttons

Indicates which buttons are pressed.

Access type: outputOnly

◆ headOrientation

H3DUniquePtr< SFRotation> H3D::OculusRiftSensor::headOrientation

Contains the current head orientation around the x-axis as reported by the device.

Access type: outputOnly

◆ headPosition

H3DUniquePtr< SFVec3f> H3D::OculusRiftSensor::headPosition

Contains the current head translation as reported by the device.

Access type: outputOnly

◆ leftHandIndexTrigger

H3DUniquePtr< SFFloat > H3D::OculusRiftSensor::leftHandIndexTrigger

The value for the left hand index trigger.

Access type: outputOnly

◆ leftHandOrientation

H3DUniquePtr< SFRotation> H3D::OculusRiftSensor::leftHandOrientation

The orientation of the left touch controller.

Access type: outputOnly

◆ leftHandPosition

H3DUniquePtr< SFVec3f> H3D::OculusRiftSensor::leftHandPosition

The position of the left touch controller.

Access type: outputOnly

◆ leftHandThumbstick

H3DUniquePtr< SFVec2f > H3D::OculusRiftSensor::leftHandThumbstick

The value for the left hand thumb stick.

Access type: outputOnly

◆ leftHandTrigger

H3DUniquePtr< SFFloat > H3D::OculusRiftSensor::leftHandTrigger

The value for the left hand trigger.

Access type: outputOnly

◆ leftHandVibrationAmplitude

H3DUniquePtr< SFFloat > H3D::OculusRiftSensor::leftHandVibrationAmplitude

Used to control the vibration amplitude of the left touch controller.

Access type: inputOutput
Default value: 0

Referenced by OculusRiftSensor().

◆ leftHandVibrationFrequency

H3DUniquePtr< SFFloat > H3D::OculusRiftSensor::leftHandVibrationFrequency

Used to control the vibration frequency of the left touch controller.

Access type: inputOutput
Default value: 0

Referenced by OculusRiftSensor().

◆ MSAAEnabled

H3DUniquePtr< MSAAEnabledField > H3D::OculusRiftSensor::MSAAEnabled

Controls multi sample anti aliasing on the oculus.

Access type: inputOutput
Default value: true

Referenced by OculusRiftSensor().

◆ performanceStats

H3DUniquePtr< PerformanceStatsField> H3D::OculusRiftSensor::performanceStats

Makes it possible to show performance stats of the oculus.

Access type: inputOutput
Default value: "OFF"
Valid values: "OFF" "PERF_SUMMARY" "LATENCY_TIMING" "APP_RENDER_TIMING" "COMP_RENDER_TIMING" "VERSION_INFO"

Referenced by OculusRiftSensor().

◆ recenterTracking

H3DUniquePtr< RecenterTrackingField> H3D::OculusRiftSensor::recenterTracking

Recenter the tracking for oculus.

Access type: inputOutput

Referenced by OculusRiftSensor().

◆ rightHandIndexTrigger

H3DUniquePtr< SFFloat > H3D::OculusRiftSensor::rightHandIndexTrigger

The value for the right hand index trigger.

Access type: outputOnly

◆ rightHandOrientation

H3DUniquePtr< SFRotation> H3D::OculusRiftSensor::rightHandOrientation

The orientation of the right touch controller.

Access type: outputOnly

◆ rightHandPosition

H3DUniquePtr< SFVec3f> H3D::OculusRiftSensor::rightHandPosition

The position of the right touch controller.

Access type: outputOnly

◆ rightHandThumbstick

H3DUniquePtr< SFVec2f > H3D::OculusRiftSensor::rightHandThumbstick

The value for the right hand thumb stick.

Access type: outputOnly

◆ rightHandTrigger

H3DUniquePtr< SFFloat > H3D::OculusRiftSensor::rightHandTrigger

The value for the right hand trigger.

Access type: outputOnly

◆ rightHandVibrationAmplitude

H3DUniquePtr< SFFloat > H3D::OculusRiftSensor::rightHandVibrationAmplitude

Used to control the vibration amplitude of the right touch controller.

Access type: inputOutput
Default value: 0

Referenced by OculusRiftSensor().

◆ rightHandVibrationFrequency

H3DUniquePtr< SFFloat > H3D::OculusRiftSensor::rightHandVibrationFrequency

Used to control the vibration frequency of the right touch controller.

Access type: inputOutput
Default value: 0

Referenced by OculusRiftSensor().

◆ touches

H3DUniquePtr< SFInt32 > H3D::OculusRiftSensor::touches

Setting some touched output state.

Access type: outputOnly


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