38 #ifndef HPP_FCL_TRANSFORM_H
39 #define HPP_FCL_TRANSFORM_H
48 typedef Eigen::Quaternion<FCL_REAL>
Quatf;
50 static inline std::ostream& operator<<(std::ostream& o,
const Quatf& q) {
51 o <<
"(" << q.w() <<
" " << q.x() <<
" " << q.y() <<
" " << q.z() <<
")";
72 template <
typename Matrixx3Like,
typename Vector3Like>
74 const Eigen::MatrixBase<Vector3Like>& T_)
78 template <
typename Vector3Like>
80 : R(q_.toRotationMatrix()), T(T_) {}
123 template <
typename Matrix3Like,
typename Vector3Like>
125 const Eigen::MatrixBase<Vector3Like>& T_) {
132 R = q_.toRotationMatrix();
137 template <
typename Derived>
143 template <
typename Derived>
152 template <
typename Derived>
158 template <
typename Derived>
160 return R.transpose() * (v - T);
165 R.transposeInPlace();
172 return Transform3f(R.transpose(), -R.transpose() * T);
177 return Transform3f(R.transpose() * other.R, R.transpose() * (other.T - T));
195 Eigen::NumTraits<FCL_REAL>::dummy_precision())
const {
196 return R.isIdentity(prec) && T.isZero(prec);
217 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
220 template <
typename Derived>
223 return Quatf(Eigen::AngleAxis<FCL_REAL>(angle, axis));
235 const FCL_REAL mult2 = std::sqrt(u1);
238 FCL_REAL s2 = std::sin(2 * PI_value * u2);
239 FCL_REAL c2 = std::cos(2 * PI_value * u2);
240 FCL_REAL s3 = std::sin(2 * PI_value * u3);
241 FCL_REAL c3 = std::cos(2 * PI_value * u3);
263 basis.col(2) = vec.normalized();
264 basis.col(1) = -vec.unitOrthogonal();
265 basis.col(0) = basis.col(1).cross(vec);
#define HPP_FCL_DLLAPI
Definition: config.hh:88
#define HPP_FCL_DEPRECATED
Definition: deprecated.hh:37
Matrix3f constructOrthonormalBasisFromVector(const Vec3f &vec)
Construct othonormal basis from vector. The z-axis is the normalized input vector.
Definition: transform.h:261
Eigen::Matrix< FCL_REAL, 3, 3 > Matrix3f
Definition: data_types.h:71
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:67
Eigen::Quaternion< FCL_REAL > Quatf
Definition: transform.h:48
Eigen::Quaternion< FCL_REAL > Quaternion3f
Definition: transform.h:47
Quatf uniformRandomQuaternion()
Uniformly random quaternion sphere. Code taken from Pinocchio (https://github.com/stack-of-tasks/pino...
Definition: transform.h:228
double FCL_REAL
Definition: data_types.h:66
Quatf fromAxisAngle(const Eigen::MatrixBase< Derived > &axis, FCL_REAL angle)
Definition: transform.h:221
Main namespace.
Definition: broadphase_bruteforce.h:44