iMSTK
Interactive Medical Simulation Toolkit
imstkDummyClient.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 <unordered_map>
12 
13 namespace imstk
14 {
21 class DummyClient : public DeviceClient
22 {
23 public:
24  DummyClient(const std::string& name = "") : DeviceClient(name, "localhost") {}
25  ~DummyClient() override = default;
26 
27 protected:
31  void init(const unsigned int numButtons = 0);
32 
33  void run() = delete;
34  void cleanUp() = delete;
35 
36 public:
40  void setPosition(const Vec3d& pos);
41 
45  void setVelocity(const Vec3d& vel);
46 
50  void setOrientation(const Quatd& orient);
51 
55  void setOrientation(double* transform);
56 
60  void setButton(const unsigned int buttonId, const bool buttonStatus);
61 
62 protected:
63  std::unordered_map<int, bool> m_buttons;
64 };
65 } // namespace imstk
The device client&#39;s represents the device and provides an interface to acquire data from a device...
void setPosition(const Vec3d &pos)
Set position.
void init(const unsigned int numButtons=0)
Initialize the client.
void setButton(const unsigned int buttonId, const bool buttonStatus)
Set the button status if it exists.
Compound Geometry.
void setVelocity(const Vec3d &vel)
Set velocity.
void setOrientation(const Quatd &orient)
Set orientation.
Allows setting the pose of the device from external caller without a real device connected.