Go to the documentation of this file.
38 #ifndef HPP_FCL_BROADPHASE_BROADPAHSESPATIALHASH_H
39 #define HPP_FCL_BROADPHASE_BROADPAHSESPATIALHASH_H
53 template <
typename HashTable = detail::SimpleHashTable<AABB, CollisionObject*,
54 detail::SpatialHash> >
61 const Vec3f& scene_max,
62 unsigned int default_table_size = 1000);
82 void update(
const std::vector<CollisionObject*>& updated_objs);
135 std::list<CollisionObject*>
objs;
158 template <
typename Container>
void setup()
initialize the manager, related with the specific type of manager
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
std::list< CollisionObject * > objs
all objects in the scene
virtual void update()
update the condition of manager
void clear()
clear the manager
spatial hashing collision mananger
HashTable * hash_table
objects in the scene limit (given by scene_min and scene_max) are in the spatial hash table
SpatialHashingCollisionManager(FCL_REAL cell_size, const Vec3f &scene_min, const Vec3f &scene_max, unsigned int default_table_size=1000)
size_t size() const
the number of objects managed by the manager
std::list< CollisionObject * > objs_partially_penetrating_scene_limit
objects partially penetrating (not totally inside nor outside) the scene limit are in another list
std::list< CollisionObject * > objs_outside_scene_limit
objects outside the scene limit are in another list
Base class for broad phase collision. It helps to accelerate the collision/distance between N objects...
void distance(CollisionObject *obj, DistanceCallBackBase *callback) const
perform distance computation between one object and all the objects belonging ot the manager
bool collide_(CollisionObject *obj, CollisionCallBackBase *callback) const
perform collision test between one object and all the objects belonging to the manager
Base callback class for distance queries. This class can be supersed by child classes to provide desi...
BroadPhaseCollisionManager Base
std::map< CollisionObject *, AABB > obj_aabb_map
store the map between objects and their aabbs. will make update more convenient
virtual std::vector< CollisionObject * > getObjects() const
return the objects managed by the manager
AABB scene_limit
the size of the scene
the object for collision or distance computation, contains the geometry and the transform information
A class describing the AABB collision structure, which is a box in 3D space determined by two diagona...
bool distanceObjectToObjects(CollisionObject *obj, const Container &objs, DistanceCallBackBase *callback, FCL_REAL &min_dist) const
void collide(CollisionObject *obj, CollisionCallBackBase *callback) const
perform collision test between one object and all the objects belonging to the manager
static void computeBound(std::vector< CollisionObject * > &objs, Vec3f &l, Vec3f &u)
compute the bound for the environent
Base callback class for collision queries. This class can be supersed by child classes to provide des...
~SpatialHashingCollisionManager()
bool empty() const
whether the manager is empty
void unregisterObject(CollisionObject *obj)
remove one object from the manager
void registerObject(CollisionObject *obj)
add one object to the manager
bool distance_(CollisionObject *obj, DistanceCallBackBase *callback, FCL_REAL &min_dist) const
perform distance computation between one object and all the objects belonging ot the manager
hpp-fcl
Author(s):
autogenerated on Fri Aug 2 2024 02:45:13