PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusOpenHapticsDevice.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2  Program: Plus
3  Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4  See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef __vtkPlusOpenHapticsDevice_h
8 #define __vtkPlusOpenHapticsDevice_h
9 
10 #include "vtkPlusDataCollectionExport.h"
11 
12 #include "vtkPlusDevice.h"
13 #include <HD/hd.h>
14 
15 class vtkMatrix4x4;
16 class vtkTransform;
17 
18 
24 class vtkPlusDataCollectionExport vtkPlusOpenHapticsDevice : public vtkPlusDevice
25 {
26 public:
27 
28  static vtkPlusOpenHapticsDevice* New();
30 
32  virtual std::string GetSdkVersion();
33 
34  virtual bool IsTracker() const { return true; }
35 
39  PlusStatus Probe();
40 
46 
47 
52 
54  virtual PlusStatus ReadConfiguration(vtkXMLDataElement* config);
55 
57  virtual PlusStatus WriteConfiguration(vtkXMLDataElement* config);
58 
59  vtkSetStdStringMacro(DeviceName);
60  vtkGetStdStringMacro(DeviceName);
61 
63 
64 
65 protected:
68 
70  unsigned int LastFrameNumber;
71 
72  unsigned int FrameNumber;
73 
74  std::string DeviceName;
75 
76 
77 private:
79  void operator=(const vtkPlusOpenHapticsDevice&);
80  static HDCallbackCode HDCALLBACK positionCallback(void* pData);
81 
82  HHD DeviceHandle;
83  vtkSmartPointer<vtkTransform> toolTransform;
84  vtkSmartPointer<vtkTransform> rotation;
85  vtkSmartPointer<vtkMatrix4x4> velMatrix;
86  vtkSmartPointer<vtkMatrix4x4> buttonMatrix;
87  vtkSmartPointer<vtkMatrix4x4> toolMatrix;
88 };
89 
90 #endif
Device interface for Open Haptics devices.
Abstract interface for tracker and video devices.
Definition: vtkPlusDevice.h:60
virtual PlusStatus InternalConnect()
igsioStatus PlusStatus
Definition: PlusCommon.h:40
virtual std::string GetSdkVersion()
virtual PlusStatus Probe()
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *)
virtual PlusStatus NotifyConfigured()
virtual PlusStatus InternalDisconnect()
virtual PlusStatus InternalUpdate()
static vtkPlusDevice * New()