FrameObject.hpp
Go to the documentation of this file.
1 /*
2  * RDL - Robot Dynamics Library
3  * Copyright (c) 2017 Jordan Lack <jlack1987@gmail.com>
4  *
5  * Licensed under the zlib license. See LICENSE for more details.
6  */
7 
8 #ifndef __RDL_FRAME_OBJECT_HPP__
9 #define __RDL_FRAME_OBJECT_HPP__
10 
20 
21 namespace RobotDynamics
22 {
29 {
30  public:
31  explicit FrameObject(ReferenceFramePtr referenceFrame) : referenceFrame(referenceFrame)
32  {
33  }
34 
38  virtual ~FrameObject()
39  {
40  }
41 
46  virtual void changeFrame(ReferenceFramePtr desiredFrame);
47 
53  {
54  return referenceFrame;
55  }
56 
62  {
63  referenceFrame = frame;
64  }
65 
70  void checkReferenceFramesMatch(const FrameObject* frameObject) const
71  {
72  getReferenceFrame()->checkReferenceFramesMatch(frameObject->getReferenceFrame());
73  }
74 
75  void checkReferenceFramesMatch(FrameObject* frameObject) const
76  {
77  getReferenceFrame()->checkReferenceFramesMatch(frameObject->getReferenceFrame());
78  }
79 
80  protected:
82 
90 };
91 } // namespace RobotDynamics
92 #endif // ifndef __RDL_FRAME_OBJECT_HPP__
ReferenceFramePtr getReferenceFrame() const
Get a pointer to the reference frame this FrameObject is expressed in.
Definition: FrameObject.hpp:52
FrameObject(ReferenceFramePtr referenceFrame)
Definition: FrameObject.hpp:31
ReferenceFramePtr referenceFrame
Definition: FrameObject.hpp:81
void setReferenceFrame(ReferenceFramePtr frame)
Set frame objects internal reference frame.
Definition: FrameObject.hpp:61
virtual ~FrameObject()
Destructor.
Definition: FrameObject.hpp:38
void checkReferenceFramesMatch(const FrameObject *frameObject) const
Check if two ReferenceFrameHolders hold the same ReferenceFrame.
Definition: FrameObject.hpp:70
The TransformableGeometricObject class is an essential interface because it forces all geometric obje...
Definition: rdl_eigenmath.h:43
std::shared_ptr< ReferenceFrame > ReferenceFramePtr
virtual void changeFrame(ReferenceFramePtr desiredFrame)
Change the ReferenceFrame this FrameObject is expressed in.
Definition: FrameObject.cpp:12
virtual Math::TransformableGeometricObject * getTransformableGeometricObject()=0
Pure virtual method that FrameObjects are required to implement so the FrameObject::changeFrame metho...
void checkReferenceFramesMatch(FrameObject *frameObject) const
Definition: FrameObject.hpp:75
An interface that objects with a ReferenceFrame extend to inherit the FrameObject::changeFrame method...
Definition: FrameObject.hpp:28
Namespace for all structures of the RobotDynamics library.
Definition: Body.h:21


rdl_dynamics
Author(s):
autogenerated on Tue Apr 20 2021 02:25:27