TrackIRThread.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_DEVICES_TRACKIR_TRACKIRTHREAD_H
17 #define SURGSIM_DEVICES_TRACKIR_TRACKIRTHREAD_H
18 
21 
22 namespace SurgSim
23 {
24 namespace Devices
25 {
26 
30 {
31 public:
38 
40  virtual ~TrackIRThread();
41 
42 protected:
45  bool doInitialize() override;
48  bool doStartUp() override;
52  bool doUpdate(double dt) override;
53 
54 private:
55  // Pointer to the scaffold which will be updated by this thread.
57  // Pointer to the DeviceData object which will be updated by the scaffold.
59 };
60 
61 }; // namespace Devices
62 }; // namespace SurgSim
63 
64 #endif // SURGSIM_DEVICES_TRACKIR_TRACKIRTHREAD_H
SurgSim::Devices::TrackIRThread::~TrackIRThread
virtual ~TrackIRThread()
Destructor.
Definition: TrackIRThread.cpp:33
SurgSim::Devices::TrackIRThread
A class implementing the thread context for sampling TrackIR devices.
Definition: TrackIRThread.h:29
SurgSim::Devices::TrackIRThread::m_deviceData
TrackIRScaffold::DeviceData * m_deviceData
Definition: TrackIRThread.h:58
SurgSim::Devices::TrackIRThread::doStartUp
bool doStartUp() override
Start up this thread.
Definition: TrackIRThread.cpp:42
SurgSim::Devices::TrackIRThread::doUpdate
bool doUpdate(double dt) override
Update work of this thread.
Definition: TrackIRThread.cpp:47
TrackIRScaffold.h
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Framework::BasicThread
Basic thread implementation, tries to maintain a constant rate, supplies startup an initialization,...
Definition: BasicThread.h:48
SurgSim::Devices::TrackIRScaffold::DeviceData
Definition: TrackIRScaffold.cpp:49
SurgSim::Devices::TrackIRScaffold
A class that manages Natural Point TRACKIR devices.
Definition: TrackIRScaffold.h:38
BasicThread.h
SurgSim::Devices::TrackIRThread::TrackIRThread
TrackIRThread(TrackIRScaffold *scaffold, TrackIRScaffold::DeviceData *deviceData)
Constructor TrackIR sample rate: 120FPS.
Definition: TrackIRThread.cpp:25
SurgSim::Devices::TrackIRThread::doInitialize
bool doInitialize() override
Initialize this thread.
Definition: TrackIRThread.cpp:37
SurgSim::Devices::TrackIRThread::m_scaffold
TrackIRScaffold * m_scaffold
Definition: TrackIRThread.h:56