OpenNIDevice.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_OPENNI_OPENNIDEVICE_H
#define SURGSIM_DEVICES_OPENNI_OPENNIDEVICE_H
#include "SurgSim/Input/CommonDevice.h"
namespace SurgSim
{
namespace Devices
{
class OpenNIScaffold;
SURGSIM_STATIC_REGISTRATION(OpenNIDevice);
class OpenNIDevice : public SurgSim::Input::CommonDevice
{
public:
explicit OpenNIDevice(const std::string& name);
SURGSIM_CLASSNAME(SurgSim::Devices::OpenNIDevice);
virtual ~OpenNIDevice();
bool initialize() override;
bool isInitialized() const override;
private:
friend class OpenNIScaffold;
bool finalize() override;
std::shared_ptr<OpenNIScaffold> m_scaffold;
};
};
};
#endif //SURGSIM_DEVICES_OPENNI_OPENNIDEVICE_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Devices::OpenNIDevice::OpenNIDevice
OpenNIDevice(const std::string &name)
Constructor.
Definition: OpenNIDevice.cpp:27
SurgSim::Devices::OpenNIScaffold
A class that manages OpenNI devices.
Definition: OpenNIScaffold.h:40
SurgSim::Devices::OpenNIDevice::isInitialized
bool isInitialized() const override
Definition: OpenNIDevice.cpp:65
SurgSim::Devices::OpenNIDevice::~OpenNIDevice
virtual ~OpenNIDevice()
Destructor.
Definition: OpenNIDevice.cpp:33
SurgSim::Devices::OpenNIDevice::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SurgSim::Devices::OpenNIDevice)
SurgSim::Devices::OpenNIDevice::m_scaffold
std::shared_ptr< OpenNIScaffold > m_scaffold
Definition: OpenNIDevice.h:62
SurgSim::Devices::OpenNIDevice::finalize
bool finalize() override
Finalize (de-initialize) the device.
Definition: OpenNIDevice.cpp:57
SurgSim::Devices::OpenNIDevice::initialize
bool initialize() override
Fully initialize the device.
Definition: OpenNIDevice.cpp:42
SurgSim::Input::CommonDevice
A class that implements some common management code on top of the DeviceInterface.
Definition: CommonDevice.h:35
CommonDevice.h
SurgSim::Devices::OpenNIDevice
A class implementing the communication with one OpenNI compatible depth camera.
Definition: OpenNIDevice.h:41