29 #ifndef __RAZERHYDRASENSOR_H__
30 #define __RAZERHYDRASENSOR_H__
62 virtual void onValueChange(
const bool &new_value );
67 Inst< EnableHydraSensor > _enabled = 0,
68 Inst< SFNode > _metadata = 0,
69 Inst< SFBool > _isActive = 0,
70 Inst< SFVec3f > _c0Position = 0,
71 Inst< SFRotation > _c0Orientation = 0,
72 Inst< SFVec2f > _c0Joystick = 0,
73 Inst< SFFloat > _c0Trigger = 0,
74 Inst< SFInt32 > _c0Buttons = 0,
75 Inst< SFBool > _c0Connected = 0,
76 Inst< SFBool > _c0Docked = 0,
77 Inst< SFInt32 > _c0WhichHand = 0,
78 Inst< SFBool > _c0HemiTrackingEnabled = 0,
79 Inst< SFBool > _c0Button1 = 0,
80 Inst< SFBool > _c0Button2 = 0,
81 Inst< SFBool > _c0Button3 = 0,
82 Inst< SFBool > _c0Button4 = 0,
83 Inst< SFBool > _c0ButtonStart = 0,
84 Inst< SFBool > _c0ButtonBumper = 0,
85 Inst< SFBool > _c0ButtonJoystick = 0,
87 Inst< SFVec3f > _c1Position = 0,
88 Inst< SFRotation > _c1Orientation = 0,
89 Inst< SFVec2f > _c1Joystick = 0,
90 Inst< SFFloat > _c1Trigger = 0,
91 Inst< SFInt32 > _c1Buttons = 0,
92 Inst< SFBool > _c1Connected = 0,
93 Inst< SFBool > _c1Docked = 0,
94 Inst< SFInt32 > _c1WhichHand = 0,
95 Inst< SFBool > _c1HemiTrackingEnabled = 0,
96 Inst< SFBool > _c1Button1 = 0,
97 Inst< SFBool > _c1Button2 = 0,
98 Inst< SFBool > _c1Button3 = 0,
99 Inst< SFBool > _c1Button4 = 0,
100 Inst< SFBool > _c1ButtonStart = 0,
101 Inst< SFBool > _c1ButtonBumper = 0,
102 Inst< SFBool > _c1ButtonJoystick = 0
410 struct RazerHydraData {
416 bool connected, docked, hemi_tracking_enabled;
419 list< RazerHydraData > hydra_data;
425 static H3DUniquePtr< H3DUtil::PeriodicThread > thread_handle;
426 static list< RazerHydraSensor * > razer_hydra_instances;
427 static vector< unsigned char > last_sequence_number;
433 void transferValues(
const vector< RazerHydraData > &new_data );
Contains the SFFloat field class.
Contains the SFInt32 field class.
Contains the SFRotation field class.
Contains the SFVec2f field class.
Contains the SFVec3f field class.
Header file for X3DSensorNode, X3D scene-graph node.
Template for adding the virtual function onValueChange that can be overridden in subclasses in order ...
Definition: FieldTemplates.h:49
This is a X3DSensorNode for reading values from a Razer hydra sensor.
Definition: RazerHydraSensor.h:56
H3DUniquePtr< SFBool > c0Docked
c0Docked is true if controller c0 is docked.
Definition: RazerHydraSensor.h:177
H3DUniquePtr< SFVec3f > c0Position
c0Position is the position for controller c0.
Definition: RazerHydraSensor.h:118
H3DUniquePtr< SFInt32 > c1WhichHand
c1WhichHand is 0 until controller c1 is docked.
Definition: RazerHydraSensor.h:332
H3DUniquePtr< SFBool > c0Button1
c0Button1 is true if button 1 of controller c0 has been pressed.
Definition: RazerHydraSensor.h:203
H3DUniquePtr< SFBool > c1Button2
c1Button2 is true if button 2 of controller c1 has been pressed.
Definition: RazerHydraSensor.h:358
H3DUniquePtr< SFBool > c0Button4
c0Button4 is true if button 4 of controller c0 has been pressed.
Definition: RazerHydraSensor.h:230
H3DUniquePtr< SFVec3f > c1Position
c1Position is the position for controller c1.
Definition: RazerHydraSensor.h:264
H3DUniquePtr< SFInt32 > c0WhichHand
c0WhichHand is 0 until controller c0 is docked.
Definition: RazerHydraSensor.h:186
H3DUniquePtr< SFBool > c1HemiTrackingEnabled
c1HemiTrackingEnabled is false until both controllers have been docked.
Definition: RazerHydraSensor.h:340
H3DUniquePtr< SFFloat > c1Trigger
c1Trigger is the status of the analog trigger for controller c1.
Definition: RazerHydraSensor.h:290
H3DUniquePtr< SFInt32 > c0Buttons
c0Buttons is a bit mask describing the state of each button for controller c0.
Definition: RazerHydraSensor.h:162
H3DUniquePtr< SFBool > c0ButtonStart
c0ButtonStart is true if start button of controller c0 has been pressed.
Definition: RazerHydraSensor.h:239
H3DUniquePtr< SFBool > c1Button3
c1Button3 is true if button 3 of controller c1 has been pressed.
Definition: RazerHydraSensor.h:367
H3DUniquePtr< SFBool > c1Docked
c1Docked is true if controller c1 is docked.
Definition: RazerHydraSensor.h:323
H3DUniquePtr< SFFloat > c0Trigger
c0Trigger is the status of the analog trigger for controller c0.
Definition: RazerHydraSensor.h:144
H3DUniquePtr< SFBool > c1Connected
c1Connected is true if controller c1 is connected.
Definition: RazerHydraSensor.h:315
H3DUniquePtr< SFBool > c1ButtonBumper
c1ButtonBumper is true if bumper button of controller c1 has been pressed.
Definition: RazerHydraSensor.h:394
H3DUniquePtr< SFBool > c0Button2
c0Button2 is true if button 2 of controller c0 has been pressed.
Definition: RazerHydraSensor.h:212
H3DUniquePtr< SFInt32 > c1Buttons
c1Buttons is a bit mask describing the state of each button for controller c1.
Definition: RazerHydraSensor.h:308
H3DUniquePtr< SFVec2f > c0Joystick
c0Joystick is the position of the (thumb) joystick for controller c0.
Definition: RazerHydraSensor.h:135
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: RazerHydraSensor.h:406
H3DUniquePtr< SFRotation > c1Orientation
c1Orientation is the orientation for controller c1.
Definition: RazerHydraSensor.h:271
H3DUniquePtr< SFBool > c1Button4
c1Button4 is true if button 4 of controller c1 has been pressed.
Definition: RazerHydraSensor.h:376
H3DUniquePtr< SFVec2f > c1Joystick
c1Joystick is the position of the (thumb) joystick for controller c1.
Definition: RazerHydraSensor.h:281
H3DUniquePtr< SFBool > c1Button1
c1Button1 is true if button 1 of controller c1 has been pressed.
Definition: RazerHydraSensor.h:349
H3DUniquePtr< SFBool > c0Connected
c0Connected is true if controller c0 is connected.
Definition: RazerHydraSensor.h:169
H3DUniquePtr< SFRotation > c0Orientation
c0Orientation is the orientation for controller c0.
Definition: RazerHydraSensor.h:125
H3DUniquePtr< SFBool > c0ButtonBumper
c0ButtonBumper is true if bumper button of controller c0 has been pressed.
Definition: RazerHydraSensor.h:248
H3DUniquePtr< SFBool > c0HemiTrackingEnabled
c0HemiTrackingEnabled is false until both controllers have been docked.
Definition: RazerHydraSensor.h:194
H3DUniquePtr< SFBool > c0ButtonJoystick
c0ButtonJoystick is true if joystick button of controller c0 has been pressed.
Definition: RazerHydraSensor.h:257
H3DUniquePtr< SFBool > c1ButtonJoystick
c1ButtonJoystick is true if joystick button of controller c1 has been pressed.
Definition: RazerHydraSensor.h:403
H3DUniquePtr< SFBool > c1ButtonStart
c1ButtonStart is true if start button of controller c1 has been pressed.
Definition: RazerHydraSensor.h:385
H3DUniquePtr< SFBool > c0Button3
c0Button3 is true if button 3 of controller c0 has been pressed.
Definition: RazerHydraSensor.h:221
TraverseInfo is a structure that is passed along when traversing the scene graph.
Definition: TraverseInfo.h:57
This abstract node type is the base type for all sensors.
Definition: X3DSensorNode.h:40
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194