Skip to content
Snippets Groups Projects
Commit e2b7d16f authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Make Quaternion3f(w,x,y,z) and Quaternion3f(w, Vec(x,y,z)) public

parent 7db89c0f
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,22 @@ public:
data (other.derived())
{}
Quaternion3f(FCL_REAL w, FCL_REAL x, FCL_REAL y, FCL_REAL z)
{
data[W] = w;
data[X] = x;
data[Y] = y;
data[Z] = z;
}
template<typename Derived>
Quaternion3f(FCL_REAL _w, const Eigen::MatrixBase<Derived>& _vec)
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived, 3);
w() = _w;
vec().noalias() = _vec;
}
/// @brief Whether the rotation is identity
bool isIdentity() const
{
......@@ -251,22 +267,6 @@ public:
private:
Quaternion3f(FCL_REAL w, FCL_REAL x, FCL_REAL y, FCL_REAL z)
{
data[W] = w;
data[X] = x;
data[Y] = y;
data[Z] = z;
}
template<typename Derived>
Quaternion3f(FCL_REAL _w, const Eigen::MatrixBase<Derived>& _vec)
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived, 3);
w() = _w;
vec().noalias() = _vec;
}
FCL_REAL operator [] (std::size_t i) const
{
return data[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment