RigidRepresentationState.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_PHYSICS_RIGIDREPRESENTATIONSTATE_H
17 #define SURGSIM_PHYSICS_RIGIDREPRESENTATIONSTATE_H
18 
22 #include "SurgSim/Math/Vector.h"
23 
24 namespace SurgSim
25 {
26 
27 namespace Physics
28 {
29 
32 {
33 public:
36 
39 
44 
46  virtual ~RigidRepresentationState();
47 
49 
53  bool operator==(const RigidRepresentationState& rhs) const;
54 
58  bool operator!=(const RigidRepresentationState& rhs) const;
59 
65  void reset();
66 
70 
74 
78 
82 
85  void setPose(const SurgSim::Math::RigidTransform3d& pose);
86 
90 
91 private:
94 
97 
100 
103 };
104 
105 }; // Physics
106 }; // SurgSim
107 
108 #endif // SURGSIM_PHYSICS_RIGIDREPRESENTATIONSTATE_H
Definition: DriveElementFromInputBehavior.cpp:27
bool operator!=(const RigidRepresentationState &rhs) const
Comparison operator.
Definition: RigidRepresentationState.cpp:71
const SurgSim::Math::RigidTransform3d & getPose() const
Get the rigid representation pose.
Definition: RigidRepresentationState.cpp:108
void addSerializableProperty()
Register accessors of serializable properties.
Definition: RigidRepresentationState.cpp:41
const SurgSim::Math::Vector3d & getLinearVelocity() const
Get the linear velocity.
Definition: RigidRepresentationState.cpp:83
virtual ~RigidRepresentationState()
Destructor.
Definition: RigidRepresentationState.cpp:62
SurgSim::Math::Vector3d m_v
Linear velocity.
Definition: RigidRepresentationState.h:96
SURGSIM_CLASSNAME(SurgSim::Physics::RigidRepresentationState)
bool operator==(const RigidRepresentationState &rhs) const
Comparison operator.
Definition: RigidRepresentationState.cpp:66
const SurgSim::Math::Vector3d & getAngularVelocity() const
Get the angular velocity.
Definition: RigidRepresentationState.cpp:88
RigidRepresentationState()
Default constructor.
Definition: RigidRepresentationState.cpp:25
SurgSim::Math::Vector3d m_w
Angular velocity.
Definition: RigidRepresentationState.h:99
Definitions of 2x2 and 3x3 rigid (isometric) transforms.
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
Definitions of small fixed-size vector types.
RigidRepresentationState & operator=(const RigidRepresentationState &rhs)
Copy assignment.
Definition: RigidRepresentationState.cpp:52
Mixin class for enabling a property system on OSS classes, the instance still needs to initialize pro...
Definition: Accessible.h:36
void setAngularVelocity(const SurgSim::Math::Vector3d &w)
Set the angular velocity.
Definition: RigidRepresentationState.cpp:98
SurgSim::Math::RigidTransform3d m_pose
Rigid representation pose (translation + rotation)
Definition: RigidRepresentationState.h:102
void reset()
Reset the state to default values Vectors will be filled with 0 Rotations will be set to identity (qu...
Definition: RigidRepresentationState.cpp:76
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:56
The RigidRepresentationState class describes a state (position and velocity information).
Definition: RigidRepresentationState.h:31
void setLinearVelocity(const SurgSim::Math::Vector3d &v)
Set the linear velocity.
Definition: RigidRepresentationState.cpp:93
void setPose(const SurgSim::Math::RigidTransform3d &pose)
Set the rigid representation pose.
Definition: RigidRepresentationState.cpp:103