71 #include "RotationOrder.h" 73 #include <boost/archive/text_iarchive.hpp> 74 #include <boost/archive/text_oarchive.hpp> 77 #include <PythonDVec3.h> 83 friend class boost::serialization::access;
84 template<
class Archive>
85 void serialize(Archive &ar,
const unsigned int version) {
86 ar &
q0 & q1 & q2 & q3;
92 double q0, q1, q2, q3;
98 Rotation(
double q0,
double q1,
double q2,
double q3,
bool needsNormalization);
99 Rotation(glm::dvec3 axis,
double angle);
100 Rotation(glm::dvec3 u, glm::dvec3 v);
116 void setQ0(
double q0) {this->q0 =
q0;}
123 void setQ1(
double q1) {this->q1 = q1;}
131 void setQ2(
double q2) {this->q2 = q2;}
138 void setQ3(
double q3) {this->q3 = q3;}
146 glm::dvec3
applyTo(glm::dvec3 u);
147 void applyTo(
double* in,
double* out);
169 #ifdef PYTHON_BINDING glm::dvec3 applyTo(glm::dvec3 u)
Definition: Rotation.cpp:250
Definition: Rotation.h:80
double q0
Definition: Rotation.h:92
double getQ0()
Get the scalar coordinate of the quaternion.
Definition: Rotation.h:115
double getQ3()
Get the third coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:137
double ** getMatrix()
Definition: Rotation.cpp:210
Definition: RotationOrder.h:18
Rotation revert()
Definition: Rotation.cpp:171
double getQ1()
Get the first coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:122
double getAngle()
Definition: Rotation.cpp:196
double getQ2()
Get the second coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:130
void getAngles(RotationOrder const *order, double &roll, double &pitch, double &yaw)
Get the roll, pitch and yaw for the Rotation.
Definition: Rotation.cpp:360
friend std::ostream & operator<<(std::ostream &out, Rotation &r)
Definition: Rotation.cpp:527
glm::dvec3 applyInverseTo(glm::dvec3 u)
Definition: Rotation.cpp:287
glm::dvec3 getAxis()
Definition: Rotation.cpp:179
Wrapper to communicate glm::dvec3 with python.
Definition: PythonDVec3.h:14