22 o <<
"*****" << std::endl;
23 o <<
"a_pos" << std::endl;
24 o <<
"*****" << std::endl;
25 o <<
"This is a pose class (position + orientation)" << std::endl;
26 o <<
"Commands:" << std::endl;
27 o <<
"--------" << std::endl;
28 o <<
"translate x y z" << std::endl;
29 o <<
"translate a_point" << std::endl;
30 o <<
"rotateX angle (degree)" << std::endl;
31 o <<
"rotateY angle (degree)" << std::endl;
32 o <<
"rotateZ angle (degree)" << std::endl;
33 o <<
"rotate a_quaternion" << std::endl;
34 o <<
"orient a_point (new z axis)" << std::endl;
40 for (
int i = 0; i<4; i++)
42 for (
int j = 0; j<4; j++)
50 for (
int i = 0; i<3; i++)
64 m(1,1) = m(2,2) = cos(v);
75 m(0,0) = m(2,2) = cos(v);
86 m(0,0) = m(1,1) = cos(v);
133 m(0,0) = 1.-2.*y*y-2.*z*z;
134 m(0,1) = 2.*
x*y-2.*z*w;
135 m(0,2) = 2.*
x*z+2.*y*w;
136 m(1,0) = 2.*
x*y+2.*z*w;
137 m(1,1) = 1.-2.*
x*
x-2.*z*z;
138 m(1,2) = 2.*y*z-2.*
x*w;
139 m(2,0) = 2.*
x*z-2.*y*w;
140 m(2,1) = 2.*y*z+2.*
x*w;
141 m(2,2) = 1.-2.*
x*
x-2.*y*y;
a_point cross(const a_point &a, const a_point &b)
std::valarray< double > & x() const
a_pos & rotateY(double v)
static const std::string help()
a_pos & orient(a_point dir)
a_pos & translate(double x, double y, double z)
a_pos & rotateX(double v)
a_pos & rotate(const a_quaternion &q)
a_pos & rotateZ(double v)