iMSTK
Interactive Medical Simulation Toolkit
imstkOpenHapticDeviceClient.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkDeviceClient.h"
10 
11 #include <array>
12 
13 namespace imstk
14 {
23 {
24 friend class OpenHapticDeviceManager;
25 
26 public:
27  ~OpenHapticDeviceClient() override = default;
28 
32  void update() override;
33 
38  OpenHapticDeviceClient(const std::string& name = "") : DeviceClient(name, "localhost")
39  {
40  m_buttons = { { 0, 0 }, { 1, 0 }, { 2, 0 }, { 3, 0 } };
41  }
42 
43 protected:
44 
48  void initialize();
49 
53  void disable();
54 
55 private:
56 
57  std::vector<std::pair<int, int>> m_events;
58 };
59 } // namespace imstk
The device client&#39;s represents the device and provides an interface to acquire data from a device...
void initialize()
Initialize the phantom omni device.
void update() override
Use callback to get tracking data from phantom omni.
Compound Geometry.
OpenHapticDeviceClient(const std::string &name="")
Constructor/Destructor, only the DeviceManager can construct.
void disable()
Disables the phantom omni device.
Subclass of DeviceClient for phantom omni Holds and updates the data sync or on its own thread Holder...