SixenseDevice.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_DEVICES_SIXENSE_SIXENSEDEVICE_H
#define SURGSIM_DEVICES_SIXENSE_SIXENSEDEVICE_H
#include <memory>
#include <string>
#include "SurgSim/Input/CommonDevice.h"
namespace SurgSim
{
namespace Devices
{
class SixenseScaffold;
SURGSIM_STATIC_REGISTRATION(SixenseDevice);
class SixenseDevice : public SurgSim::Input::CommonDevice
{
public:
explicit SixenseDevice(const std::string& uniqueName);
SURGSIM_CLASSNAME(SurgSim::Devices::SixenseDevice);
virtual ~SixenseDevice();
bool initialize() override;
bool isInitialized() const override;
private:
friend class SixenseScaffold;
bool finalize() override;
std::shared_ptr<SixenseScaffold> m_scaffold;
};
}; // namespace Devices
}; // namespace SurgSim
#endif // SURGSIM_DEVICES_SIXENSE_SIXENSEDEVICE_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Devices::SixenseScaffold
A class that manages Sixense devices, such as the Razer Hydra.
Definition: SixenseScaffold.h:35
SurgSim::Devices::SixenseDevice::~SixenseDevice
virtual ~SixenseDevice()
Destructor.
Definition: SixenseDevice.cpp:35
SurgSim::Devices::SixenseDevice::initialize
bool initialize() override
Fully initialize the device.
Definition: SixenseDevice.cpp:44
SurgSim::Devices::SixenseDevice::m_scaffold
std::shared_ptr< SixenseScaffold > m_scaffold
Definition: SixenseDevice.h:75
SurgSim::Devices::SixenseDevice::isInitialized
bool isInitialized() const override
Definition: SixenseDevice.cpp:67
SurgSim::Devices::SixenseDevice::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SurgSim::Devices::SixenseDevice)
SurgSim::Devices::SixenseDevice
A class implementing the communication with one Sixense controller, for example one of the two on the...
Definition: SixenseDevice.h:53
SurgSim::Devices::SixenseDevice::SixenseDevice
SixenseDevice(const std::string &uniqueName)
Constructor.
Definition: SixenseDevice.cpp:29
SurgSim::Input::CommonDevice
A class that implements some common management code on top of the DeviceInterface.
Definition: CommonDevice.h:35
CommonDevice.h
SurgSim::Devices::SixenseDevice::finalize
bool finalize() override
Finalize (de-initialize) the device.
Definition: SixenseDevice.cpp:59