opensurgsim
Representation.h
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_FRAMEWORK_REPRESENTATION_H
17 #define SURGSIM_FRAMEWORK_REPRESENTATION_H
18 
19 #include <memory>
20 
21 #include "SurgSim/Framework/Component.h"
23 
24 namespace SurgSim
25 {
26 
27 namespace Framework
28 {
29 
33 class Representation : public Component
34 {
35 public:
38  explicit Representation(const std::string& name);
40  virtual ~Representation();
41 
44  virtual void setLocalPose(const SurgSim::Math::RigidTransform3d& pose);
45 
49 
53 
54 private:
57 
58  bool doInitialize() override;
59  bool doWakeUp() override;
60 };
61 
62 }; // namespace Framework
63 }; // namespace SurgSim
64 
65 #endif // SURGSIM_FRAMEWORK_REPRESENTATION_H
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
virtual SurgSim::Math::RigidTransform3d getPose() const
Get the pose of the representation in world coordinates.
Definition: Representation.cpp:54
Component is the main interface class to pass information to the system managers each will decide whe...
Definition: Component.h:42
Definitions of 2x2 and 3x3 rigid (isometric) transforms.
Representation(const std::string &name)
Constructor.
Definition: Representation.cpp:28
virtual void setLocalPose(const SurgSim::Math::RigidTransform3d &pose)
Set the pose of the representation with respect to the Scene Element.
Definition: Representation.cpp:49
Representations are manifestations of a SceneElement.
Definition: Representation.h:33
virtual SurgSim::Math::RigidTransform3d getLocalPose() const
Get the pose of the representation with respect to the Scene Element.
Definition: Representation.cpp:67
virtual ~Representation()
Destructor.
Definition: Representation.cpp:35