H3D API  2.4.1
CyberGloveSensor.h
Go to the documentation of this file.
1 // Copyright 2004-2019, SenseGraphics AB
3 //
4 // This file is part of H3D API.
5 //
6 // H3D API is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // H3D API is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with H3D API; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // A commercial license is also available. Please contact us at
21 // www.sensegraphics.com for more information.
22 //
23 //
27 //
29 #ifndef __CYBERGLOVESENSOR_H__
30 #define __CYBERGLOVESENSOR_H__
31 
32 // H3D includes
34 
35 namespace H3D {
36 
51  class H3DAPI_API CyberGloveSensor : public VirtualHandGloveSensor {
52  public:
53 
55  CyberGloveSensor( Inst< OnEnable > _enabled = 0,
56  Inst< SFNode > _metadata = 0,
57  Inst< SFBool > _isActive = 0,
58  Inst< SFString > _host = 0,
59  Inst< SFString > _port = 0,
60  Inst< SFInt32 > _comPort = 0,
61  Inst< SFInt32 > _hardwareSpeed = 0,
62  Inst< MFDouble > _thumb = 0,
63  Inst< MFDouble > _index = 0,
64  Inst< MFDouble > _middle = 0,
65  Inst< MFDouble > _ring = 0,
66  Inst< MFDouble > _pinky = 0 );
67 
76  H3DUniquePtr< SFInt32> comPort;
77 
84  H3DUniquePtr< SFInt32> hardwareSpeed;
85 
91  H3DUniquePtr< MFDouble> thumb;
92 
98  H3DUniquePtr< MFDouble> index;
99 
105  H3DUniquePtr< MFDouble> middle;
106 
112  H3DUniquePtr< MFDouble> ring;
113 
119  H3DUniquePtr< MFDouble> pinky;
120 
123 
124  private:
126  virtual void updateValues();
127 
129  virtual bool connect();
130 
132  virtual void disconnect();
133  };
134 }
135 
136 #endif
Header file for VirtualHandGloveSensor.
Connects to a CyberGlove through the Virtual HandSDK.
Definition: CyberGloveSensor.h:51
H3DUniquePtr< MFDouble > ring
Outputs the angles for the joints on the ring finger.
Definition: CyberGloveSensor.h:112
H3DUniquePtr< SFInt32 > hardwareSpeed
Describes the connection speed.
Definition: CyberGloveSensor.h:84
H3DUniquePtr< MFDouble > index
Outputs the angles for the joints on the index finger.
Definition: CyberGloveSensor.h:98
H3DUniquePtr< MFDouble > pinky
Outputs the angles for the joints on the pinky.
Definition: CyberGloveSensor.h:119
H3DUniquePtr< SFInt32 > comPort
Describes how the physical device is connected to host.
Definition: CyberGloveSensor.h:76
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: CyberGloveSensor.h:122
H3DUniquePtr< MFDouble > middle
Outputs the angles for the joints on the middle finger.
Definition: CyberGloveSensor.h:105
H3DUniquePtr< MFDouble > thumb
Outputs the angles for the joints on the thumb.
Definition: CyberGloveSensor.h:91
This is the base class for all sensors that handles connection to the vhtGlove class in Virtual Hand ...
Definition: VirtualHandGloveSensor.h:49
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