43 #include "fcl/common/types.h" 44 #include "fcl/math/geometry.h" 50 template <
typename S_>
74 OBB(
const Matrix3<S>& axis,
76 const Vector3<S>& extent);
85 bool contain(
const Vector3<S>& p)
const;
112 const Vector3<S>
center()
const;
115 S
distance(
const OBB& other, Vector3<S>* P =
nullptr,
116 Vector3<S>* Q =
nullptr)
const;
118 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
126 template <
typename S>
127 void computeVertices(
const OBB<S>& b, Vector3<S> vertices[8]);
130 template <
typename S>
134 template <
typename S>
138 template <
typename S,
typename Derived>
140 const OBB<S>& bv,
const Eigen::MatrixBase<Derived>& t);
144 template <
typename S,
typename DerivedA,
typename DerivedB>
145 bool overlap(
const Eigen::MatrixBase<DerivedA>& R0,
146 const Eigen::MatrixBase<DerivedB>& T0,
152 template <
typename S>
157 const Vector3<S>& b);
162 template <
typename S>
164 const Transform3<S>& tf,
166 const Vector3<S>& b);
170 #include "fcl/math/bv/OBB-inl.h" S volume() const
Volume of the OBB.
Definition: OBB-inl.h:195
OBB< S > & operator+=(const Vector3< S > &p)
A simple way to merge the OBB and a point (the result is not compact).
Definition: OBB-inl.h:138
Main namespace.
Definition: broadphase_bruteforce-inl.h:45
S distance(const OBB &other, Vector3< S > *P=nullptr, Vector3< S > *Q=nullptr) const
Distance between two OBBs, not implemented.
Definition: OBB-inl.h:216
AABB< S > translate(const AABB< S > &aabb, const Eigen::MatrixBase< Derived > &t)
translate the center of AABB by t
Definition: AABB-inl.h:345
bool contain(const Vector3< S > &p) const
Check whether the OBB contains a point.
Definition: OBB-inl.h:118
S width() const
Width of the OBB.
Definition: OBB-inl.h:174
bool overlap(const OBB< S > &other) const
Check collision between two OBB, return true if collision happens.
Definition: OBB-inl.h:96
OBB< S > operator+(const OBB< S > &other) const
Return the merged OBB of current OBB and the other one (the result is not compact).
Definition: OBB-inl.h:157
Vector3< S > extent
Half dimensions of OBB.
Definition: OBB.h:68
Matrix3< S > axis
Orientation of OBB. The axes of the rotation matrix are the principle directions of the box...
Definition: OBB.h:62
S size() const
Size of the OBB (used in BV_Splitter to order two OBBs)
Definition: OBB-inl.h:202
const Vector3< S > center() const
Center of the OBB.
Definition: OBB-inl.h:209
S depth() const
Depth of the OBB.
Definition: OBB-inl.h:188
OBB()
Constructor.
Definition: OBB-inl.h:79
Vector3< S > To
Center of OBB.
Definition: OBB.h:65
S height() const
Height of the OBB.
Definition: OBB-inl.h:181
Oriented bounding box class.
Definition: OBB.h:51