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 & operator=(const Quaternion &other)
std::ostream & writeBinary(std::ostream &s) const
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)
std::istream & read(std::istream &s)
void toRotMatrix(std::vector< double > &rot_matrix_3_3) const
const float & operator()(unsigned int i) const
bool operator==(const Quaternion &other) const
Quaternion inv() const
Inversion.
Quaternion normalized() const
This class represents a three-dimensional vector.
Vector3 toEuler() const
Conversion to Euler angles.
Vector3 rotate(const Vector3 &v) const
Rotate a vector.
Quaternion & inv_IP()
Inversion.
Quaternion()
Default constructor.
std::ostream & write(std::ostream &s) const
Quaternion operator*(const Quaternion &other) const
Quaternion multiplication.
This class represents a Quaternion.
std::istream & readBinary(std::istream &s)