Representation.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_FRAMEWORK_REPRESENTATION_H
#define SURGSIM_FRAMEWORK_REPRESENTATION_H
#include <memory>
#include "SurgSim/Framework/Component.h"
#include "SurgSim/Math/RigidTransform.h"
namespace SurgSim
{
namespace Framework
{
class Representation : public Component
{
public:
explicit Representation(const std::string& name);
virtual ~Representation();
virtual void setLocalPose(const SurgSim::Math::RigidTransform3d& pose);
virtual SurgSim::Math::RigidTransform3d getLocalPose() const;
virtual SurgSim::Math::RigidTransform3d getPose() const;
private:
SurgSim::Math::RigidTransform3d m_localPose;
bool doInitialize() override;
bool doWakeUp() override;
};
}; // namespace Framework
}; // namespace SurgSim
#endif // SURGSIM_FRAMEWORK_REPRESENTATION_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Framework::Representation::m_localPose
SurgSim::Math::RigidTransform3d m_localPose
Local Pose of the Representation with respect to the SceneElement.
Definition: Representation.h:56
SurgSim::Framework::Representation::getPose
virtual SurgSim::Math::RigidTransform3d getPose() const
Get the pose of the representation in world coordinates.
Definition: Representation.cpp:54
SurgSim::Framework::Representation::doWakeUp
bool doWakeUp() override
Interface to be implemented by derived classes.
Definition: Representation.cpp:44
Component.h
SurgSim::Framework::Component
Component is the main interface class to pass information to the system managers each will decide whe...
Definition: Component.h:42
RigidTransform.h
Definitions of 2x2 and 3x3 rigid (isometric) transforms.
SurgSim::Framework::Representation::Representation
Representation(const std::string &name)
Constructor.
Definition: Representation.cpp:28
SurgSim::Math::RigidTransform3d
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
SurgSim::Framework::Representation::doInitialize
bool doInitialize() override
Interface to be implemented by derived classes.
Definition: Representation.cpp:39
SurgSim::Framework::Representation::setLocalPose
virtual void setLocalPose(const SurgSim::Math::RigidTransform3d &pose)
Set the pose of the representation with respect to the Scene Element.
Definition: Representation.cpp:49
SurgSim::Framework::Representation
Representations are manifestations of a SceneElement.
Definition: Representation.h:33
SurgSim::Framework::Representation::getLocalPose
virtual SurgSim::Math::RigidTransform3d getLocalPose() const
Get the pose of the representation with respect to the Scene Element.
Definition: Representation.cpp:67
SurgSim::Framework::Representation::~Representation
virtual ~Representation()
Destructor.
Definition: Representation.cpp:35