Pose.hpp
Go to the documentation of this file.
1 
18 #pragma once
19 
20 #include <sstream>
21 #include <string>
22 #include <ostream>
23 #include "Quaternion.hpp"
24 #include "Point.hpp"
25 #include "Serializable.hpp"
26 
27 namespace ISM {
28 
32 class Pose : public Serializable
33 {
34 public:
37 
38  Pose()
39  {
40  this->point = PointPtr(new Point(0, 0, 0));
41  this->quat = QuaternionPtr(new Quaternion(1.0, 0, 0, 0));
42  };
43 
44  Pose(const Pose& other)
45  {
46  this->point = PointPtr(new Point(*(other.point)));
47  this->quat = QuaternionPtr(new Quaternion(*(other.quat)));
48  };
49 
51  {
52  this->point = PointPtr(p);
53  this->quat = QuaternionPtr(q);
54  };
55 
56  Pose(Point *p, QuaternionPtr q) : quat(q)
57  {
58  this->point = PointPtr(p);
59  };
60 
61  Pose(PointPtr p, Quaternion* q) : point(p)
62  {
63  this->quat = QuaternionPtr(q);
64  };
65 
66  Pose(PointPtr p, QuaternionPtr quat) : point(p), quat(quat) {};
67 
68  virtual void serialize(std::ostream& strm) const;
69 
76  void convertPoseIntoFrame(const boost::shared_ptr<Pose>& pFrame, boost::shared_ptr<Pose>& pResult);
77 
78 };
79 typedef boost::shared_ptr<Pose> PosePtr;
80 
81 bool operator==(const PosePtr& pose1, const PosePtr& pose2);
82 bool operator==(const Pose& pose1, const Pose& pose2);
83 
84 std::ostream& operator<<(std::ostream &strm, const ISM::Pose &p);
85 std::ostream& operator<<(std::ostream &strm, const ISM::PosePtr &p);
86 }
Pose(PointPtr p, Quaternion *q)
Definition: Pose.hpp:61
boost::shared_ptr< Quaternion > QuaternionPtr
Definition: Quaternion.hpp:39
Pose(Point *p, QuaternionPtr q)
Definition: Pose.hpp:56
Pose(PointPtr p, QuaternionPtr quat)
Definition: Pose.hpp:66
boost::shared_ptr< Point > PointPtr
Definition: Point.hpp:45
Pose()
Definition: Pose.hpp:38
Pose(Point *p, Quaternion *q)
Definition: Pose.hpp:50
virtual void serialize(std::ostream &strm) const
Definition: Pose.cpp:41
PointPtr point
Definition: Pose.hpp:35
std::ostream & operator<<(std::ostream &strm, const ISM::ObjectRelation &r)
bool operator==(const PointPtr &p1, const PointPtr &p2)
Definition: Point.cpp:39
boost::shared_ptr< Pose > PosePtr
Definition: Pose.hpp:79
void convertPoseIntoFrame(const boost::shared_ptr< Pose > &pFrame, boost::shared_ptr< Pose > &pResult)
Definition: Pose.cpp:48
Pose(const Pose &other)
Definition: Pose.hpp:44
this namespace contains all generally usable classes.
QuaternionPtr quat
Definition: Pose.hpp:36


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:40