38 #ifndef FCL_BROAD_PHASE_SAP_H 39 #define FCL_BROAD_PHASE_SAP_H 122 class FCL_EXPORT isUnregistered;
125 class FCL_EXPORT isNotValidPair;
127 void update_(
SaPAABB* updated_aabb);
135 std::vector<EndPoint*> velist[3];
151 void addToOverlapPairs(
const SaPPair& p);
153 void removeFromOverlapPairs(
const SaPPair& p);
160 template <
typename S>
167 typename SaPCollisionManager<S>::EndPoint*
lo;
170 typename SaPCollisionManager<S>::EndPoint*
hi;
177 template <
typename S>
184 typename SaPCollisionManager<S>::SaPAABB*
aabb;
193 const Vector3<S>& getVal()
const;
196 Vector3<S>& getVal();
198 S getVal(
size_t i)
const;
205 template <
typename S>
213 bool operator == (
const SaPPair& other)
const;
217 template <
typename S>
225 bool operator() (
const SaPPair& pair)
const;
229 template <
typename S>
238 bool operator() (
const SaPPair& pair);
End point for an interval.
template void minmax(double a, double b, double &minv, double &maxv)
CollisionObject< S > * obj1
EndPoint * next[3]
the next end point in the end point list
SAP interval for one object.
SaPCollisionManager< S >::EndPoint * hi
higher bound end point of the interval
CollisionObject< S > * obj1
S distance(const Eigen::MatrixBase< DerivedA > &R0, const Eigen::MatrixBase< DerivedB > &T0, const kIOS< S > &b1, const kIOS< S > &b2, Vector3< S > *P, Vector3< S > *Q)
Approximate distance between two kIOS bounding volumes.
SaPCollisionManager< S >::EndPoint * lo
lower bound end point of the interval
SaPCollisionManager< S >::SaPAABB * aabb
back pointer to SAP interval
std::list< SaPAABB * > AABB_arr
SAP interval list.
bool(*)(CollisionObject< S > *o1, CollisionObject< S > *o2, void *cdata) CollisionCallBack
Callback for collision between two objects. Return value is whether can stop now. ...
template FCL_EXPORT std::size_t collide(const CollisionObject< double > *o1, const CollisionObject< double > *o2, const CollisionRequest< double > &request, CollisionResult< double > &result)
bool(*)(CollisionObject< S > *o1, CollisionObject< S > *o2, void *cdata, S &dist) DistanceCallBack
Callback for distance between two objects, Return value is whether can stop now, also return the mini...
EndPoint * prev[3]
the previous end point in the end point list
std::list< SaPPair > overlap_pairs
The pair of objects that should further check for collision.
AABB< S > cached
cached AABB<S> value
the object for collision or distance computation, contains the geometry and the transform information...
CollisionObject< S > * obj2
CollisionObject< S > * obj2
CollisionObject< S > * obj
Base class for broad phase collision. It helps to accelerate the collision/distance between N objects...
A pair of objects that are not culling away and should further check collision.
CollisionObject< S > * obj
object
std::map< CollisionObject< S > *, SaPAABB * > obj_aabb_map
Rigorous SAP collision manager.