iMSTK
Interactive Medical Simulation Toolkit
Source
Devices
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
{
22
class
OpenHapticDeviceClient
:
public
DeviceClient
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
imstk::DeviceClient
The device client's represents the device and provides an interface to acquire data from a device...
Definition:
imstkDeviceClient.h:53
imstk::OpenHapticDeviceClient::initialize
void initialize()
Initialize the phantom omni device.
Definition:
imstkOpenHapticDeviceClient.cpp:13
imstk::OpenHapticDeviceClient::update
void update() override
Use callback to get tracking data from phantom omni.
Definition:
imstkOpenHapticDeviceClient.cpp:19
imstk
Compound Geometry.
Definition:
OctreeDebugModel.cpp:10
imstk::OpenHapticDeviceClient::OpenHapticDeviceClient
OpenHapticDeviceClient(const std::string &name="")
Constructor/Destructor, only the DeviceManager can construct.
Definition:
imstkOpenHapticDeviceClient.h:38
imstk::OpenHapticDeviceClient::disable
void disable()
Disables the phantom omni device.
Definition:
imstkOpenHapticDeviceClient.cpp:33
imstk::OpenHapticDeviceManager
Devices manager using HDAPI.
Definition:
imstkOpenHapticDeviceManager.h:25
imstk::OpenHapticDeviceClient
Subclass of DeviceClient for phantom omni Holds and updates the data sync or on its own thread Holder...
Definition:
imstkOpenHapticDeviceClient.h:22
Generated by
1.8.13