3 #include "RotationOrder.h"
5 #include <boost/archive/text_iarchive.hpp>
6 #include <boost/archive/text_oarchive.hpp>
9 #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);
152 glm::dvec3 operator*(glm::dvec3 u) {
return applyTo(u);}
171 #ifdef PYTHON_BINDING
Definition: RotationOrder.h:18
Definition: Rotation.h:80
double getAngle()
Definition: Rotation.cpp:196
glm::dvec3 getAxis()
Definition: Rotation.cpp:179
friend std::ostream & operator<<(std::ostream &out, Rotation &r)
Definition: Rotation.cpp:527
double getQ2() const
Get the second coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:130
double getQ1() const
Get the first coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:122
void getAngles(RotationOrder const *order, double &roll, double &pitch, double &yaw)
Get the roll, pitch and yaw for the Rotation.
Definition: Rotation.cpp:360
double q0
Definition: Rotation.h:92
double ** getMatrix()
Definition: Rotation.cpp:210
Rotation revert()
Definition: Rotation.cpp:171
glm::dvec3 applyTo(glm::dvec3 u)
Definition: Rotation.cpp:250
glm::dvec3 applyInverseTo(glm::dvec3 u)
Definition: Rotation.cpp:287
double getQ3() const
Get the third coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:137
double getQ0() const
Get the scalar coordinate of the quaternion.
Definition: Rotation.h:115
Wrapper to communicate glm::dvec3 with python.
Definition: PythonDVec3.h:16