Skip to content
Snippets Groups Projects
Commit a0ddd364 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Add constructors for (center) pos, ori and extents

parent 9e418d81
No related branches found
No related tags found
No related merge requests found
......@@ -120,6 +120,26 @@ namespace simox
this->_t.template block<3, 1>(0, 3) = corner;
}
OrientedBox(const vector_t& center, const rotation_t& orientation, const vector_t& extents) :
OrientedBox(center - orientation * extents / 2,
orientation.col(0) * extents(0),
orientation.col(1) * extents(1),
orientation.col(2) * extents(2))
{
}
OrientedBox(const transform_t& center_pose, const vector_t& extents) :
OrientedBox(center_pose.template block<3, 1>(0, 3).eval(), center_pose.template block<3, 3>(0, 0).eval(), extents)
{
}
OrientedBox(const vector_t& center, const Eigen::Quaternion<FloatT>& ori, const vector_t& extents) :
OrientedBox(center, ori.toRotationMatrix(), extents)
{
}
OrientedBox(const base& b) : base(b) {}
template<class T>
OrientedBox<T> cast() const
......@@ -133,6 +153,7 @@ namespace simox
};
}
OrientedBox transformed(const rotation_t& t) const
{
return
......
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