29 #ifndef __FORCEDIMENSIONDEVICE_H__
30 #define __FORCEDIMENSIONDEVICE_H__
54 virtual void onNewValue(
const bool &v );
60 virtual void onNewValue(
const bool &v );
66 virtual void onValueChange(
const bool &v );
72 virtual void onValueChange(
const H3DFloat &v );
78 virtual void onValueChange(
const bool &v );
87 bool call_hapi_function;
89 virtual void onValueChange(
const bool &v );
95 virtual void onNewValue(
const bool &v );
110 virtual void onNewValue(
const Vec3d &v );
115 Inst< SFVec3f > _devicePosition = 0,
116 Inst< SFRotation > _deviceOrientation = 0,
117 Inst< TrackerPosition > _trackerPosition = 0,
118 Inst< TrackerOrientation > _trackerOrientation = 0,
119 Inst< SFMatrix4f > _positionCalibration = 0,
120 Inst< SFRotation > _orientationCalibration = 0,
121 Inst< SFVec3f > _proxyPosition = 0,
122 Inst< WeightedProxy > _weightedProxyPosition = 0,
123 Inst< SFFloat > _proxyWeighting = 0,
124 Inst< SFBool > _mainButton = 0,
125 Inst< SFBool > _secondaryButton = 0,
126 Inst< SFInt32 > _buttons = 0,
127 Inst< SFVec3f > _force = 0,
128 Inst< SFVec3f > _torque = 0,
129 Inst< SFInt32 > _inputDOF = 0,
130 Inst< SFInt32 > _outputDOF = 0,
131 Inst< SFInt32 > _hapticsRate = 0,
132 Inst< SFInt32 > _desiredHapticsRate = 0,
133 Inst< SFNode > _stylus = 0,
134 Inst< SFHapticsRendererNode > _hapticsRenderer = 0,
135 Inst< MFVec3f > _proxyPositions = 0,
136 Inst< SFBool > _followViewpoint = 0,
137 Inst< GravityComp > _useGravityCompensation = 0,
138 Inst< Reset > _reset = 0,
139 Inst< WaitReset > _waitForReset = 0,
140 Inst< EffectorMass > _endEffectorMass = 0,
141 Inst< Brakes > _useBrakes = 0,
142 Inst< SFInt32 > _deviceType = 0,
143 Inst< EnableForce > _enableForce = 0,
144 Inst< SFFloat > _vibrationFrequency = 0,
145 Inst< SFFloat > _vibrationAmplitude = 0,
146 Inst< SFFloat > _gripperAngle = 0,
147 Inst< SFAutoCalibrate > _autoCalibrate = 0,
148 Inst< SFBool > _isAutoCalibrated = 0,
149 Inst< SFInt32 > _desiredComThreadRate = 0,
150 Inst< SFFloat > _gripperForce = 0,
151 Inst< SFBool > _flipGripperValues = 0,
152 Inst< SFReleasePosition > _releaseDevicePosition = 0 );
156 virtual ErrorCode initDevice();
161 virtual ErrorCode releaseDevice();
269 virtual void updateDeviceValues();
275 virtual void update();
278 H3DUniquePtr< ChangeVibration > changeVibration;
331 virtual void initialize();
Header file for H3DHapticsDevice.
Contains the MFString field class.
Header file for PeriodicUpdate, template field modifier.
Contains the SFVec3d field class.
Brakes specializes SFBool to toggle brakes on and off.
Definition: ForceDimensionDevice.h:77
EnableForce specializes SFFloat to handle vibration.
Definition: ForceDimensionDevice.h:273
EffectorMass specializes SFFloat to change the end effector mass at change of value.
Definition: ForceDimensionDevice.h:71
EnableForce specializes SFBool to toggle forces on and off.
Definition: ForceDimensionDevice.h:83
GravityComp specializes SFBool to toggle gravity compensation on and off.
Definition: ForceDimensionDevice.h:65
Reset specializes SFBool to go into reset mode when a true event is received.
Definition: ForceDimensionDevice.h:53
SFAutoCalibrate specializes SFBool to go into auto calibrate mode when a true event is received.
Definition: ForceDimensionDevice.h:94
SFReleasePosition specializes SFVec3d to go set the release position of the contained haptics device.
Definition: ForceDimensionDevice.h:100
bool value_is_set
Just a flag used to check if the value was set before the hapi_device pointer was set.
Definition: ForceDimensionDevice.h:107
SFReleasePosition()
Constructor.
Definition: ForceDimensionDevice.h:103
WaitReset specializes SFBool to go into wait on reset mode when a true event is received.
Definition: ForceDimensionDevice.h:59
A ForceDimensionDevice is a node for handling communication with a haptics device from ForceDimension...
Definition: ForceDimensionDevice.h:48
H3DUniquePtr< SFReleasePosition > releaseDevicePosition
If this value is set, and HAPI was compiled with DRD support then when the device is released the dev...
Definition: ForceDimensionDevice.h:327
H3DUniquePtr< WaitReset > waitForReset
When a true event is received, the device is put into RESET mode and wait for the user to calibrate t...
Definition: ForceDimensionDevice.h:183
H3DUniquePtr< SFBool > flipGripperValues
If true then the gripper angle output is negated with respect to what the underlying dhd api reports.
Definition: ForceDimensionDevice.h:317
H3DUniquePtr< SFFloat > vibrationFrequency
On some (custom) devices from force dimension there are vibration support.
Definition: ForceDimensionDevice.h:249
H3DUniquePtr< SFBool > useGravityCompensation
Enable/disable gravity compensation.
Definition: ForceDimensionDevice.h:170
H3DUniquePtr< SFBool > isAutoCalibrated
Indicates whether the device is calibrated.
Definition: ForceDimensionDevice.h:293
H3DUniquePtr< EnableForce > enableForce
On some (custom) devices from force dimension there is no button to enable/disable forces on the devi...
Definition: ForceDimensionDevice.h:237
H3DUniquePtr< SFInt32 > deviceType
Contains the device type of the Force Dimension device.
Definition: ForceDimensionDevice.h:225
H3DUniquePtr< SFFloat > gripperForce
Output field for the gripper force.
Definition: ForceDimensionDevice.h:307
H3DUniquePtr< SFBool > useBrakes
Enable/disable the device electromagnetic brakes.
Definition: ForceDimensionDevice.h:200
H3DUniquePtr< SFInt32 > desiredComThreadRate
The desired frequency for the thread that communicates with the haptics device.
Definition: ForceDimensionDevice.h:302
static H3DNodeDatabase database
Node database entry.
Definition: ForceDimensionDevice.h:240
H3DUniquePtr< SFFloat > gripperAngle
Output field for the gripper angle.
Definition: ForceDimensionDevice.h:264
H3DUniquePtr< SFFloat > endEffectorMass
Set the end effector mass used in gravity compensation in order to provide accurate gravity compensat...
Definition: ForceDimensionDevice.h:190
H3DUniquePtr< Reset > reset
When a true event is received, the device is put into RESET mode.
Definition: ForceDimensionDevice.h:177
H3DUniquePtr< SFFloat > vibrationAmplitude
On some (custom) devices from force dimension there are vibration support.
Definition: ForceDimensionDevice.h:259
H3DUniquePtr< SFAutoCalibrate > autoCalibrate
When a true event is received, the device is auto calibrated.
Definition: ForceDimensionDevice.h:288
Base class for all haptic devices.
Definition: H3DHapticsDevice.h:68
Template for adding the virtual function onNewValue that can be overridden in subclasses in order to ...
Definition: FieldTemplates.h:79
Template for adding the virtual function onValueChange that can be overridden in subclasses in order ...
Definition: FieldTemplates.h:49
The PeriodicUpdate is a template modifier that changes the way the field is updated.
Definition: PeriodicUpdate.h:74
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