Go to the documentation of this file.
34 #ifndef OCTOMATH_QUATERNION_H
35 #define OCTOMATH_QUATERNION_H
97 Quaternion(
double roll,
double pitch,
double yaw);
113 void toRotMatrix(std::vector <double>& rot_matrix_3_3)
const;
178 inline float&
u() {
return data[0]; }
179 inline float&
x() {
return data[1]; }
180 inline float&
y() {
return data[2]; }
181 inline float&
z() {
return data[3]; }
183 inline const float&
u()
const {
return data[0]; }
184 inline const float&
x()
const {
return data[1]; }
185 inline const float&
y()
const {
return data[2]; }
186 inline const float&
z()
const {
return data[3]; }
188 std::istream&
read(std::istream &s);
189 std::ostream&
write(std::ostream &s)
const;
Quaternion()
Default constructor.
Definition: Quaternion.h:66
void toRotMatrix(std::vector< double > &rot_matrix_3_3) const
Definition: Quaternion.cpp:167
float & x()
Definition: Quaternion.h:179
std::ostream & operator<<(std::ostream &s, const Pose6D &p)
user friendly output in format (x y z, u x y z) which is (translation, rotation)
Definition: Pose6D.cpp:152
Vector3 toEuler() const
Conversion to Euler angles.
Definition: Quaternion.cpp:124
const float & u() const
Definition: Quaternion.h:183
float norm() const
Definition: Quaternion.cpp:99
std::istream & read(std::istream &s)
Definition: Quaternion.cpp:261
std::ostream & writeBinary(std::ostream &s) const
Definition: Quaternion.cpp:291
std::ostream & write(std::ostream &s) const
Definition: Quaternion.cpp:270
bool operator==(const Quaternion &other) const
Definition: Quaternion.cpp:113
Quaternion normalized() const
Definition: Quaternion.cpp:241
This class represents a three-dimensional vector.
Definition: Vector3.h:50
const float & y() const
Definition: Quaternion.h:185
Vector3 rotate(const Vector3 &v) const
Rotate a vector.
Definition: Quaternion.cpp:255
const float & operator()(unsigned int i) const
Definition: Quaternion.h:116
Quaternion & normalize()
Definition: Quaternion.cpp:234
float & y()
Definition: Quaternion.h:180
Quaternion inv() const
Inversion.
Definition: Quaternion.h:156
Quaternion operator*(const Quaternion &other) const
Quaternion multiplication.
Definition: Quaternion.cpp:219
float & u()
Definition: Quaternion.h:178
const float & x() const
Definition: Quaternion.h:184
float data[4]
Definition: Quaternion.h:194
void operator/=(float x)
Definition: Quaternion.cpp:107
std::istream & readBinary(std::istream &s)
Definition: Quaternion.cpp:279
float & z()
Definition: Quaternion.h:181
Quaternion & operator=(const Quaternion &other)
Definition: Quaternion.cpp:211
Quaternion & inv_IP()
Inversion.
Definition: Quaternion.cpp:248
This class represents a Quaternion.
Definition: Quaternion.h:56
const float & z() const
Definition: Quaternion.h:186