41 #include "fcl/math/bv/OBB.h" 47 template <
typename S_>
58 static kIOS_Sphere encloseSphere(
59 const kIOS_Sphere& s0,
const kIOS_Sphere& s1);
85 bool contain(
const Vector3<S>& p)
const;
97 const Vector3<S>&
center()
const;
117 Vector3<S>* P =
nullptr, Vector3<S>* Q =
nullptr)
const;
119 static constexpr S ratio() {
return 1.5; }
120 static constexpr S invSinA() {
return 2; }
121 static S cosA() {
return std::sqrt(3.0) / 2.0; }
128 template <
typename S,
typename Derived>
130 const kIOS<S>& bv,
const Eigen::MatrixBase<Derived>& t);
135 template <
typename S,
typename DerivedA,
typename DerivedB>
137 const Eigen::MatrixBase<DerivedA>& R0,
138 const Eigen::MatrixBase<DerivedB>& T0,
144 template <
typename S>
146 const Transform3<S>& tf,
152 template <
typename S,
typename DerivedA,
typename DerivedB>
154 const Eigen::MatrixBase<DerivedA>& R0,
155 const Eigen::MatrixBase<DerivedB>& T0,
158 Vector3<S>* P =
nullptr,
159 Vector3<S>* Q =
nullptr);
163 template <
typename S>
165 const Transform3<S>& tf,
168 Vector3<S>* P =
nullptr,
169 Vector3<S>* Q =
nullptr);
173 #include "fcl/math/bv/kIOS-inl.h" kIOS< S > operator+(const kIOS< S > &other) const
Return the merged kIOS of current kIOS and the other one.
Definition: kIOS-inl.h:148
Main namespace.
Definition: broadphase_bruteforce-inl.h:45
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 overlap(const kIOS< S > &other) const
Check collision between two kIOS.
Definition: kIOS-inl.h:80
S width() const
Width of the kIOS.
Definition: kIOS-inl.h:173
S depth() const
Depth of the kIOS.
Definition: kIOS-inl.h:187
OBB< S > obb
OBB related with kIOS.
Definition: kIOS.h:72
unsigned int num_spheres
The number of spheres, no larger than 5.
Definition: kIOS.h:69
S distance(const kIOS< S > &other, Vector3< S > *P=nullptr, Vector3< S > *Q=nullptr) const
The distance between two kIOS.
Definition: kIOS-inl.h:208
const Vector3< S > & center() const
Center of the kIOS.
Definition: kIOS-inl.h:166
S size() const
size of the kIOS (used in BV_Splitter to order two kIOSs)
Definition: kIOS-inl.h:201
S height() const
Height of the kIOS.
Definition: kIOS-inl.h:180
S volume() const
Volume of the kIOS.
Definition: kIOS-inl.h:194
bool contain(const Vector3< S > &p) const
Check whether the kIOS contains a point.
Definition: kIOS-inl.h:108
A class describing the kIOS collision structure, which is a set of spheres.
Definition: kIOS.h:48
kIOS< S > & operator+=(const Vector3< S > &p)
A simple way to merge the kIOS and a point.
Definition: kIOS-inl.h:122
kIOS_Sphere spheres[5]
The (at most) five spheres for intersection.
Definition: kIOS.h:66