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