hpp-fcl
2.4.1
HPP fork of FCL -- The Flexible Collision Library
|
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;
156 enum ObjectStatus { Inside, PartiallyPenetrating, Outside };
158 template <
typename Container>
void setup()
initialize the manager, related with the specific type of manager
Definition: broadphase_spatialhash-inl.h:106
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:66
std::list< CollisionObject * > objs
all objects in the scene
Definition: broadphase_spatialhash.h:135
virtual void update()
update the condition of manager
Definition: broadphase_spatialhash-inl.h:112
void clear()
clear the manager
Definition: broadphase_spatialhash-inl.h:238
spatial hashing collision mananger
Definition: broadphase_spatialhash.h:55
HashTable * hash_table
objects in the scene limit (given by scene_min and scene_max) are in the spatial hash table
Definition: broadphase_spatialhash.h:153
SpatialHashingCollisionManager(FCL_REAL cell_size, const Vec3f &scene_min, const Vec3f &scene_max, unsigned int default_table_size=1000)
Definition: broadphase_spatialhash-inl.h:48
size_t size() const
the number of objects managed by the manager
Definition: broadphase_spatialhash-inl.h:496
std::list< CollisionObject * > objs_partially_penetrating_scene_limit
objects partially penetrating (not totally inside nor outside) the scene limit are in another list
Definition: broadphase_spatialhash.h:139
std::list< CollisionObject * > objs_outside_scene_limit
objects outside the scene limit are in another list
Definition: broadphase_spatialhash.h:142
Base class for broad phase collision. It helps to accelerate the collision/distance between N objects...
Definition: broadphase_collision_manager.h:54
void distance(CollisionObject *obj, DistanceCallBackBase *callback) const
perform distance computation between one object and all the objects belonging ot the manager
Definition: broadphase_spatialhash-inl.h:263
bool collide_(CollisionObject *obj, CollisionCallBackBase *callback) const
perform collision test between one object and all the objects belonging to the manager
Definition: broadphase_spatialhash-inl.h:272
double FCL_REAL
Definition: data_types.h:65
Base callback class for distance queries. This class can be supersed by child classes to provide desi...
Definition: broadphase_callbacks.h:73
BroadPhaseCollisionManager Base
Definition: broadphase_spatialhash.h:57
std::map< CollisionObject *, AABB > obj_aabb_map
store the map between objects and their aabbs. will make update more convenient
Definition: broadphase_spatialhash.h:149
virtual std::vector< CollisionObject * > getObjects() const
return the objects managed by the manager
Definition: broadphase_collision_manager.h:88
AABB scene_limit
the size of the scene
Definition: broadphase_spatialhash.h:145
Main namespace.
Definition: broadphase_bruteforce.h:44
the object for collision or distance computation, contains the geometry and the transform information
Definition: collision_object.h:215
A class describing the AABB collision structure, which is a box in 3D space determined by two diagona...
Definition: AABB.h:54
void collide(CollisionObject *obj, CollisionCallBackBase *callback) const
perform collision test between one object and all the objects belonging to the manager
Definition: broadphase_spatialhash-inl.h:255
static void computeBound(std::vector< CollisionObject * > &objs, Vec3f &l, Vec3f &u)
compute the bound for the environent
Definition: broadphase_spatialhash-inl.h:502
Base callback class for collision queries. This class can be supersed by child classes to provide des...
Definition: broadphase_callbacks.h:50
~SpatialHashingCollisionManager()
Definition: broadphase_spatialhash-inl.h:58
bool empty() const
whether the manager is empty
Definition: broadphase_spatialhash-inl.h:490
void unregisterObject(CollisionObject *obj)
remove one object from the manager
Definition: broadphase_spatialhash-inl.h:85
void registerObject(CollisionObject *obj)
add one object to the manager
Definition: broadphase_spatialhash-inl.h:64
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
Definition: broadphase_spatialhash-inl.h:311