29 #ifndef __VIRTUALHANDGLOVESENSOR_H__
30 #define __VIRTUALHANDGLOVESENSOR_H__
38 #ifdef HAVE_VIRTUAL_HAND_SDK
40 #include <vhandtk/vhtGlove.h>
54 class OnEnable :
public AutoUpdate< OnValueChangeSField< SFBool > > {
56 virtual void onValueChange(
const bool &new_value) {
62 vhgs->
isActive->setValue(
true, vhgs->id );
66 vhgs->
isActive->setValue(
false, vhgs->id );
74 Inst< SFNode > _metadata = 0,
75 Inst< SFBool > _isActive = 0,
76 Inst< SFString > _host = 0,
77 Inst< SFString > _port = 0 );
81 #ifdef HAVE_VIRTUAL_HAND_SDK
92 virtual void initialize();
94 #ifdef HAVE_VIRTUAL_HAND_SDK
102 #ifdef HAVE_VIRTUAL_HAND_SDK
136 #ifdef HAVE_VIRTUAL_HAND_SDK
144 struct H3DAPI_API Update
148 (owner)->updateValues();
152 H3DUniquePtr< Update > update;
Contains the MFDouble field class.
Contains the SFInt32 field class.
Contains the SFString field class.
Header file for X3DSensorNode, X3D scene-graph node.
This is the base class for all sensors that handles connection to the vhtGlove class in Virtual Hand ...
Definition: VirtualHandGloveSensor.h:49
virtual void disconnect()=0
Virtual function that disconnects the vhtGlove.
~VirtualHandGloveSensor()
Destructor.
Definition: VirtualHandGloveSensor.h:80
vhtGlove * getGlove()
Return reference to the contained vhtGlove.
Definition: VirtualHandGloveSensor.h:96
H3DUniquePtr< SFString > host
Adress of the host running the VTIDM daemon process.
Definition: VirtualHandGloveSensor.h:113
H3DUniquePtr< SFString > port
The port number specified in the the Device Manager of Virtual Hand SDK.
Definition: VirtualHandGloveSensor.h:121
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: VirtualHandGloveSensor.h:124
virtual void updateValues()=0
Virtual function used to update field values in subclasses.
virtual bool connect()=0
Virtual function that connects the vhtGlove.
void resetGlove()
Reset glove to 0, needed in cleanup phase to not accidently try to delete instance of vhtGlove twice.
Definition: VirtualHandGloveSensor.h:101
This abstract node type is the base type for all sensors.
Definition: X3DSensorNode.h:40
H3DUniquePtr< SFBool > isActive
A sensor is active when some special conditions are fulfilled and it will then generate extra output.
Definition: X3DSensorNode.h:59
H3D API namespace.
Definition: Anchor.h:38
The AutoUpdate field is a template to force the BaseField to update itself as soon as an event is rec...
Definition: FieldTemplates.h:130
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194