44 x = (*this)(0); z = (*this)(2);
45 (*this)(0) = (
float) (z * sin(pitch) + x * cos(pitch));
46 (*this)(2) = (
float) (z * cos(pitch) - x * sin(pitch));
50 x = (*this)(0); y = (*this)(1);
51 (*this)(0) = (
float) (x * cos(yaw) - y * sin(yaw));
52 (*this)(1) = (
float) (x * sin(yaw) + y * cos(yaw));
55 y = (*this)(1); z = (*this)(2);
56 (*this)(1) = (
float) (y * cos(roll) - z * sin(roll));
57 (*this)(2) = (
float) (y * sin(roll) + z * cos(roll));
72 for (
unsigned int i=0; i<3; i++)
80 for (
unsigned int i=0; i<3; i++)
81 s <<
" " <<
operator()(i);
89 s.read((
char*)&temp,
sizeof(temp));
91 for (
unsigned int i=0; i<3; i++) {
92 s.read((
char*)&val,
sizeof(val));
101 s.write((
char*)&temp,
sizeof(temp));
103 for (
unsigned int i=0; i<3; i++) {
105 s.write((
char*)&val,
sizeof(val));
112 return out <<
'(' << v.
x() <<
' ' << v.
y() <<
' ' << v.
z() <<
')';
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)
const float & operator()(unsigned int i) const
std::ostream & write(std::ostream &s) const
Vector3 & rotate_IP(double roll, double pitch, double yaw)
std::istream & readBinary(std::istream &s)
std::ostream & writeBinary(std::ostream &s) const
This class represents a three-dimensional vector.