116 memcpy( V.
data, a_x, 3*
sizeof(V.
data[0]) );
146 XAngle(
double v) : value(v) {}
154 YAngle(
double v) : value(v) {}
162 ZAngle(
double v) : value(v) {}
225 memcpy(y.
data, x, 4*
sizeof(y.
data[0]));
263 double x[4] = {a[0], a[1], a[2], angle};
362 RotMat(
double r11,
double r12,
double r13,
363 double r21,
double r22,
double r23,
364 double r31,
double r32,
double r33 ) :
375 double r21,
double r22,
double r23,
376 double r31,
double r32,
double r33 )
408 memcpy(y.
data, x, 9*
sizeof(y.
data[0]));
502 AxisAngle(
double x,
double y,
double z,
double theta ) :
535 double n = sqrt( x*x + y*y + z*z );
536 double a[4] = {x/n, y/n, z/n, theta};
545 memcpy(y.data, x, 4*
sizeof(y.data[0]));
685 double x_dual,
double y_dual,
double z_dual,
double w_dual ) {
697 memcpy(S.
data, s, 8*
sizeof(s[0]));
834 double t_x,
double t_y,
double t_z )
848 memcpy(qv.r.
data, a_r, 4*
sizeof(qv.r.
data[0]));
849 memcpy(qv.v.
data, a_v, 3*
sizeof(qv.v.
data[0]));
956 memcpy(T.
data, t, 12*
sizeof(T.
data[0]));
RotMat(const aa_tf_quat &p)
Construct a rotation matrix from a unit quaternion.
static aa_tf_axang from_axang(double x, double y, double z, double theta)
Create an axis angle from individual components.
AA_API void aa_tf_duqu_mul(const double d1[AA_RESTRICT 8], const double d2[AA_RESTRICT 8], double d3[AA_RESTRICT 8])
Dual quaternion multiplication.
QuatTran(const struct aa_tf_duqu *S)
Construct from a dual quaternion.
QuatTran(const struct aa_tf_qv &S)
Construct from another quaternion-translation.
static aa_tf_quat from_zangle(const double v)
Create a quaternion object rotation about z.
AA_API void aa_tf_quat2rotmat(const double quat[AA_RESTRICT 4], double rotmat[AA_RESTRICT 9])
convert quaternion to rotation matrix
AA_API void aa_tf_yxyz2duqu(double theta, double x, double y, double z, double d[AA_RESTRICT 8])
Convert y angle and translation to dual quaternion.
TfMat(const struct aa_tf_quat &_r, const struct aa_tf_vec3 &_v)
Construct a transformation matrix from a quaternion-translation.
static aa_tf_duqu from_dx(double *s, double *dx)
Create a dual quaternion derivative from a dual quaternion and the spatial velocity.
RotMat(const aa_tf_axang &p)
Construct a rotation matrix from an axis-angle.
Quat(const aa_tf_rotmat &p)
Construct from a rotation matrix.
AA_API void aa_tf_xyz2duqu(double x, double y, double z, double d[AA_RESTRICT 8])
Pure translation dual quaternion.
Vec3(const struct aa_tf_tfmat &T)
Extract the translation part of a transformation matrix.
AA_API void aa_tf_duqu2tfmat(const double d[AA_RESTRICT 8], double T[AA_RESTRICT 12])
Convert dual quaternion to transformation matrix.
QuatTran(const struct aa_tf_qv *S)
Construct from another quaternion-translation.
aa_tf_vec3_t v
the origin vector part
AxisAngle(const aa_tf_axang &p)
Construct an axis-angle from another axis-angle.
DualQuat(const struct aa_tf_duqu *S)
Construct from another dual quaternion.
static aa_tf_vec3 from_vec3(const double a_x[3])
Create a Vec3 from array.
RotMat(const aa_tf_quat *p)
Construct a rotation matrix from a unit quaternion.
static aa_tf_rotmat from_xangle(const double v)
Create a rotation matrix from a rotation about X.
static aa_tf_vec3 from_tfmat(const double T[12])
Create a Vec3 from translation part of transformation matrix.
AxisAngle()
Construct an idenity axis-angle.
void aa_tf_qutr_conj(const double a[7], double c[7])
quaternion-translation conjugate
AA_API void aa_tf_9mul(const double R0[AA_RESTRICT 9], const double R1[AA_RESTRICT 9], double R[AA_RESTRICT 9])
Multiply two rotation matrices.
A transformation matrix object.
aa_tf_qv conj()
Return the conjugate (inverse).
static aa_tf_duqu from_zxyz(double theta, double x, double y, double z)
Create a dual quaternion an Z axis rotation and translation components.
AxisAngle(const aa_tf_quat *p)
Construct an axis-angle from a unit quaternion.
TfMat(const struct aa_tf_duqu *S)
Construct a transformation matrix from a dual quaternion.
static aa_tf_duqu from_xyzw(double x_real, double y_real, double z_real, double w_real, double x_dual, double y_dual, double z_dual, double w_dual)
Create a dual quaternion from components.
Memory layout for a vector of length 3.
QuatTran(const struct aa_tf_quat &_r, const struct aa_tf_vec3 &_v)
Construct from another quaternion-translation.
AA_API void aa_tf_qmul(const double a[AA_RESTRICT 4], const double b[AA_RESTRICT 4], double c[AA_RESTRICT 4])
Quaternion multiplication.
Vec3(const struct aa_tf_duqu &S)
Extract the translation part of a unit dual quaternion.
QuatTran(const struct aa_tf_tfmat &T)
Construct from a transformation matrix.
static aa_tf_duqu from_qv(const double q[4], const double v[3])
Create a dual quaternion from a rotation quaternion and a translation vector.
TfMat(const struct aa_tf_duqu &S)
Construct a transformation matrix from a dual quaternion.
static const double aa_tf_ident[12]
Identity transformation matrix array.
static aa_tf_axang from_rotvec(const double x[3])
Create an axis angle from a rotation vector.
A rotation about the Y axis.
AA_API void aa_tf_tfmat2duqu(const double T[AA_RESTRICT 12], double d[AA_RESTRICT 8])
Convert transformation matrix to dual quaternion.
TfMat(const struct aa_tf_tfmat &T)
Construct a transformation matrix from another transformation matrix.
Memory layout for a transformation matrix.
DualQuat(const YAngle &r, const struct aa_tf_vec3 &v)
Construct from a rotation about Y and a translation vector.
static aa_tf_quat from_rotmat(const double x[9])
Create a quaternion object a rotation matrix.
RotMat(const aa_tf_rotmat *p)
Construct a rotation matrix from another rotation matrix.
static aa_tf_duqu from_xyz(double x, double y, double z)
Create a dual quaternion from and identity rotation and translation components.
DualQuat(const double *S)
Construct from another dual quaternion.
static aa_tf_rotmat from_rotmat(double r11, double r12, double r13, double r21, double r22, double r23, double r31, double r32, double r33)
Create a rotation matrix from individual components.
static aa_tf_tfmat from_tfmat(const double t[12])
Construct a transformation matrix from another transformation matrix.
static aa_tf_quat from_axang(const double x[4])
Create a quaternion object an axis-angle.
Vec3(const struct aa_tf_tfmat *T)
Extract the translation part of a transformation matrix.
Quat(const aa_tf_axang &p)
Construct from an axix angle rotation.
Quat(const aa_tf_axang *p)
Construct from an axix angle rotation.
AA_API void aa_tf_duqu_vel2diff(const double d[AA_RESTRICT 8], const double dx[AA_RESTRICT 6], double dd[AA_RESTRICT 8])
Dual quaternion derivative from velocity.
Quat(const XAngle &p)
Construct from a rotation about the x axis.
QuatTran()
Construct an idenity object.
A dual quaternion object.
static aa_tf_quat from_rotvec(const double x[3])
Create a quaternion object a rotation vector.
AA_API void aa_tf_axang2rotmat(const double ra[AA_RESTRICT 4], double R[AA_RESTRICT 9])
convert axis angle to rotation matrix
Vec3(const double *_xyz)
Construct from array.
AxisAngle(const double *_axis, double _angle)
Construct an axis-angle from an axis array and an angle.
RotMat(const ZAngle &p)
Construct a rotation matrix from a rotation about Z.
QuatTran(const struct aa_tf_quat *_r, const struct aa_tf_vec3 *_v)
Construct from another quaternion-translation.
static aa_tf_duqu from_duqu(const double s[8])
Create a dual quaternion from another dual quaternion.
TfMat(const struct aa_tf_qv *S)
Construct a transformation matrix from a quaternion-translation.
DualQuat()
Construct an identity dual quaternion.
static aa_tf_qv from_duqu(const double s[8])
Create a quaternion-translation from a dual quaternion.
static aa_tf_rotmat from_quat(const double x[4])
Create a rotation matrix from a unit quaternion.
TfMat(const struct aa_tf_quat *_r, const struct aa_tf_vec3 *_v)
Construct a transformation matrix from a quaternion-translation.
TfMat()
Construct an identity transformation matrix.
TfMat(const struct aa_tf_tfmat *T)
Construct a transformation matrix from another transformation matrix.
AA_API void aa_tf_rotmat2axang(const double R[AA_RESTRICT 9], double ra[AA_RESTRICT 4])
convert rotation matrix to axis angle
DualQuat(const struct aa_tf_qv &S)
Construct from a quaternion-vector.
AA_API void aa_tf_zangle2rotmat(double theta_z, double R[AA_RESTRICT 9])
Angle about z axis.
AA_API void aa_tf_yangle2quat(double theta_y, double q[AA_RESTRICT 4])
Unit quaternion for angle about y axis.
RotMat(const YAngle &p)
Construct a rotation matrix from a rotation about Y.
AA_API void aa_tf_qv2duqu(const double q[AA_RESTRICT 4], const double v[AA_RESTRICT 3], double d[AA_RESTRICT 8])
Convert orientation unit quaternion and translation vector to dual quaternion.
DualQuat(const struct aa_tf_duqu &S)
Construct from another dual quaternion.
Memory layout for a rotation matrix.
AA_API void aa_tf_rotvec2rotmat(const double rv[AA_RESTRICT 3], double R[AA_RESTRICT 9])
convert rotatoin vector to rotation matrix
AA_API void aa_tf_yangle2rotmat(double theta_y, double R[AA_RESTRICT 9])
Angle about y axis.
static aa_tf_qv from_tfmat(const double t[12])
Create a quaternion-translation from a transformation matrix.
DualQuat(const struct aa_tf_qv *S)
Construct from a quaternion-vector.
A rotation matrix object.
DualQuat(const ZAngle &r, const struct aa_tf_vec3 &v)
Construct from a rotation about Z and a translation vector.
AxisAngle(double x, double y, double z, double theta)
Construct an axis-angle from individual components.
AA_API void aa_tf_zxyz2duqu(double theta, double x, double y, double z, double d[AA_RESTRICT 8])
Convert z angle and translation to dual quaternion.
AxisAngle(const aa_tf_rotmat &p)
Construct an axis-angle from a rotation matrix.
AxisAngle(const aa_tf_axang *p)
Construct an axis-angle from another axis-angle.
Quat(const YAngle &p)
Construct from a rotation about the Y axis.
AA_API void aa_tf_rotvec2quat(const double rotvec[AA_RESTRICT 3], double q[AA_RESTRICT 4])
covert rotation vector to quaternion
static aa_tf_duqu from_xxyz(double theta, double x, double y, double z)
Create a dual quaternion an X axis rotation and translation components.
Memory layout for a quaternion, x,y,z,w order.
static aa_tf_rotmat from_axang(const double x[4])
Create a rotation matrix from an axis-angle.
static aa_tf_tfmat from_duqu(const double s[8])
Construct a transformation matrix from a dual quaternion.
QuatTran(const struct aa_tf_tfmat *T)
Construct from a transformation matrix.
static aa_tf_axang from_quat(const double x[4])
Create an axis angle from a unit quaternion.
static aa_tf_quat from_quat(const double x[4])
Create a quaternion object from a quaternion array.
double data[12]
data array
Quat(const ZAngle &p)
Construct from a rotation about the Z axis.
AA_API void aa_tf_xangle2quat(double theta_x, double q[AA_RESTRICT 4])
Unit quaternion for angle about x axis.
AxisAngle(const aa_tf_rotmat *p)
Construct an axis-angle from a rotation matrix.
RotMat(double r11, double r12, double r13, double r21, double r22, double r23, double r31, double r32, double r33)
Construct a rotation matrix from individual components.
static aa_tf_rotmat from_yangle(const double v)
Create a rotation matrix from a rotation about Y.
Memory layout for a dual quaternion .
Quat(const aa_tf_rotmat *p)
Construct from a rotation matrix.
DualQuat(const struct aa_tf_quat *r, const struct aa_tf_vec3 *v)
Construct from a quaternion-vector.
static aa_tf_qv from_qv(const double e[7])
Create a quaternion-translation from a rotation quaternion and a translation vector.
AA_API void aa_tf_xangle2rotmat(double theta_x, double R[AA_RESTRICT 9])
Angle about x axis.
AA_API void aa_tf_xxyz2duqu(double theta, double x, double y, double z, double d[AA_RESTRICT 8])
Convert x angle and translation to dual quaternion.
static aa_tf_tfmat from_qv(const double q[4], const double v[3])
Construct a transformation matrix from a rotation quaternion and translation vector.
static aa_tf_qv from_qv(const double a_r[4], const double a_v[3])
Create a quaternion-translation from a rotation quaternion and a translation vector.
Vec3(double _x, double _y, double _z)
Construct from individual components.
static aa_tf_vec3 from_duqu(const double S[8])
Create a Vec3 from translation part of unit dual quation.
DualQuat(const struct aa_tf_tfmat &T)
Construct from a transformation matrix.
static aa_tf_rotmat from_rotvec(const double x[3])
Create a rotation matrix from a rotation vector.
static aa_tf_axang from_rotmat(const double x[9])
Create an axis angle from a rotation matrix.
static aa_tf_duqu from_yxyz(double theta, double x, double y, double z)
Create a dual quaternion an Y axis rotation and translation components.
DualQuat conj()
Return the conjugate of this.
RotMat(const XAngle &p)
Construct a rotation matrix from a rotation about X.
AA_API void aa_tf_duqu_conj(const double d[AA_RESTRICT 8], double dconj[AA_RESTRICT 8])
Dual quaternion conjugate.
static aa_tf_quat from_yangle(const double v)
Create a quaternion object rotation about y.
static aa_tf_axang from_axang(const double x[4])
Create an axis angle from an axis angle array.
TfMat(const struct aa_tf_qv &S)
Construct a transformation matrix from a quaternion-translation.
AA_API void aa_tf_axang2quat(const double axang[AA_RESTRICT 4], double q[AA_RESTRICT 4])
axis-angle to quaternion.
static aa_tf_vec3 from_xyz(double x, double y, double z)
Create a Vec3 from components.
RotMat(const aa_tf_axang *p)
Construct a rotation matrix from an axis-angle.
A rotation about the X axis.
RotMat()
Construct an identity rotation matrix.
static aa_tf_qv from_xyzw(double q_x, double q_y, double q_z, double q_w, double t_x, double t_y, double t_z)
Create a quaternion-translation from components.
AA_API void aa_tf_zangle2quat(double theta_z, double q[AA_RESTRICT 4])
Unit quaternion for angle about z axis.
Quat(const aa_tf_quat *p)
Construct from another quaternion.
aa_tf_vec3 translation()
Return the translation part of a unit dual quaternion.
Vec3(const struct aa_tf_duqu *S)
Extract the translation part of a unit dual quaternion.
AxisAngle(const aa_tf_quat &p)
Construct an axis-angle from a unit quaternion.
DualQuat(const XAngle &r, const struct aa_tf_vec3 &v)
Construct from a rotation about X and a translation vector.
Quat()
Construct an identity quaternion.
AA_API void aa_tf_quat2axang(const double q[AA_RESTRICT 4], double axang[AA_RESTRICT 4])
Quaternion to axis-angle.
AA_API void aa_tf_12chain(const double T1[AA_RESTRICT 12], const double T2[AA_RESTRICT 12], double T[AA_RESTRICT 12])
chain two transforms
Quat(const aa_tf_quat &p)
Construct from another quaternion.
AA_API void aa_tf_duqu_trans(const double d[AA_RESTRICT 8], double v[AA_RESTRICT 3])
Extract dual quaternion translation vector.
QuatTran(const struct aa_tf_duqu &S)
Construct from a dual quaternion.
static aa_tf_quat from_xangle(const double v)
Create a quaternion object rotation about x.
A rotation quaternion and translation vector object.
AA_API void aa_tf_qv2tfmat(const double q[AA_RESTRICT 4], const double v[AA_RESTRICT 3], double T[AA_RESTRICT 12])
Convert orientation unit quaternion and translation vector to transformation matrix.
Memory layout for a Transformation as rotation quaternion and translation vector. ...
static aa_tf_rotmat from_rotmat(const double x[9])
Create a rotation matrix object from a rotation matrix array.
DualQuat(const struct aa_tf_tfmat *T)
Construct from a transformation matrix.
DualQuat(const aa_tf_axang &r, const struct aa_tf_vec3 &v)
Construct from an axis-angle rotation and a translation vector.
A rotation about the Z axis.
DualQuat(const struct aa_tf_quat &r, const struct aa_tf_vec3 &v)
Construct from a quaternion-vector.
AA_API void aa_tf_qv_chain(const double q0[AA_RESTRICT 4], const double v0[AA_RESTRICT 3], const double q1[AA_RESTRICT 4], const double v1[AA_RESTRICT 3], double q[AA_RESTRICT 4], double v[AA_RESTRICT 3])
chain two transforms
RotMat(const aa_tf_rotmat &p)
Construct a rotation matrix from another rotation matrix.
static aa_tf_quat from_axang(const double a[3], double angle)
Create a quaternion object an axis-angle.
static aa_tf_quat from_xyzw(double x, double y, double z, double w)
Create a quaternion object from components.
DualQuat(const struct aa_tf_vec3 &v)
Construct from an identity rotation and a translation vector.
static aa_tf_duqu from_tfmat(const double T[12])
Create a dual quaternion from a transformation matrix.
AA_API void aa_tf_duqu2qv(const double d[AA_RESTRICT 8], double q[AA_RESTRICT 4], double v[AA_RESTRICT 3])
Convert dual quaternion to orientation unit quaternion and translation vector.
AA_API void aa_tf_rotvec2axang(const double rotvec[AA_RESTRICT 3], double axang[AA_RESTRICT 4])
convert rotation vector to axis-angle
AA_API void aa_tf_rotmat2quat(const double rotmat[AA_RESTRICT 9], double quat[AA_RESTRICT 4])
convert rotation matrix to quaternion
static aa_tf_axang from_axang(const double axis[3], double angle)
Create an axis angle from an axis array and an angle.
static aa_tf_rotmat from_zangle(const double v)
Create a rotation matrix from a rotation about Z.