38 #ifndef HPP_FCL_TRANSFORM_H 39 #define HPP_FCL_TRANSFORM_H 48 static inline std::ostream&
operator<<(std::ostream& o,
const Quaternion3f& q) {
49 o <<
"(" << q.w() <<
" " << q.x() <<
" " << q.y() <<
" " << q.z() <<
")";
70 template <
typename Matrixx3Like,
typename Vector3Like>
72 const Eigen::MatrixBase<Vector3Like>& T_)
76 template <
typename Vector3Like>
77 Transform3f(
const Quaternion3f& q_,
const Eigen::MatrixBase<Vector3Like>& T_)
78 : R(q_.toRotationMatrix()), T(T_) {}
121 template <
typename Matrix3Like,
typename Vector3Like>
123 const Eigen::MatrixBase<Vector3Like>& T_) {
130 R = q_.toRotationMatrix();
135 template <
typename Derived>
141 template <
typename Derived>
148 R = q_.toRotationMatrix();
152 template <
typename Derived>
159 R.transposeInPlace();
166 return Transform3f(R.transpose(), -R.transpose() * T);
171 return Transform3f(R.transpose() * other.
R, R.transpose() * (other.
T - T));
189 Eigen::NumTraits<FCL_REAL>::dummy_precision())
const {
190 return R.isIdentity(prec) && T.isZero(prec);
205 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
208 template <
typename Derived>
211 return Quaternion3f(Eigen::AngleAxis<FCL_REAL>(angle, axis));
Eigen::Matrix< FCL_REAL, 3, 3 > Matrix3f
Quaternion3f fromAxisAngle(const Eigen::MatrixBase< Derived > &axis, FCL_REAL angle)
static std::ostream & operator<<(std::ostream &o, const Quaternion3f &q)
Eigen::Quaternion< FCL_REAL > Quaternion3f
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f