Go to the documentation of this file.
53 const std::vector<CollisionObject*>& other_objs) {
54 std::copy(other_objs.begin(), other_objs.end(), std::back_inserter(
objs));
82 std::vector<CollisionObject*>& objs_)
const {
83 objs_.resize(
objs.size());
84 std::copy(
objs.begin(),
objs.end(), objs_.begin());
91 if (
size() == 0)
return;
93 for (
auto* obj2 :
objs) {
102 if (
size() == 0)
return;
104 FCL_REAL min_dist = (std::numeric_limits<FCL_REAL>::max)();
105 for (
auto* obj2 :
objs) {
107 if ((*
callback)(obj, obj2, min_dist))
return;
115 if (
size() == 0)
return;
117 for (
typename std::list<CollisionObject*>::const_iterator it1 =
objs.begin(),
120 typename std::list<CollisionObject*>::const_iterator it2 = it1;
122 for (; it2 != end; ++it2) {
123 if ((*it1)->getAABB().overlap((*it2)->getAABB())) {
124 if ((*
callback)(*it1, *it2))
return;
133 if (
size() == 0)
return;
135 FCL_REAL min_dist = (std::numeric_limits<FCL_REAL>::max)();
136 for (
typename std::list<CollisionObject*>::const_iterator it1 =
objs.begin(),
139 typename std::list<CollisionObject*>::const_iterator it2 = it1;
141 for (; it2 != end; ++it2) {
142 if ((*it1)->getAABB().distance((*it2)->getAABB()) < min_dist) {
143 if ((*
callback)(*it1, *it2, min_dist))
return;
156 if ((
size() == 0) || (other_manager->
size() == 0))
return;
158 if (
this == other_manager) {
163 for (
auto* obj1 :
objs) {
164 for (
auto* obj2 : other_manager->
objs) {
165 if (obj1->getAABB().overlap(obj2->getAABB())) {
166 if ((*
callback)(obj1, obj2))
return;
179 if ((
size() == 0) || (other_manager->
size() == 0))
return;
181 if (
this == other_manager) {
186 FCL_REAL min_dist = (std::numeric_limits<FCL_REAL>::max)();
187 for (
auto* obj1 :
objs) {
188 for (
auto* obj2 : other_manager->
objs) {
189 if (obj1->getAABB().distance(obj2->getAABB()) < min_dist) {
190 if ((*
callback)(obj1, obj2, min_dist))
return;
Base class for broad phase collision. It helps to accelerate the collision/distance between N objects...
Base callback class for distance queries. This class can be supersed by child classes to provide desi...
std::list< CollisionObject * > objs
objects belonging to the manager are stored in a list structure
virtual void update()
update the condition of manager
size_t size() const
the number of objects managed by the manager
void collide(CollisionObject *obj, CollisionCallBackBase *callback) const
perform collision test between one object and all the objects belonging to the manager
virtual std::vector< CollisionObject * > getObjects() const
return the objects managed by the manager
the object for collision or distance computation, contains the geometry and the transform information
FCL_REAL distance(const AABB &other) const
Distance between two AABBs.
void distance(CollisionObject *obj, DistanceCallBackBase *callback) const
perform distance computation between one object and all the objects belonging to the manager
void registerObjects(const std::vector< CollisionObject * > &other_objs)
add objects to the manager
void setup()
initialize the manager, related with the specific type of manager
void clear()
clear the manager
Brute force N-body collision manager.
const AABB & getAABB() const
get the AABB in world space
Base callback class for collision queries. This class can be supersed by child classes to provide des...
void unregisterObject(CollisionObject *obj)
remove one object from the manager
bool empty() const
whether the manager is empty
void registerObject(CollisionObject *obj)
add one object to the manager
hpp-fcl
Author(s):
autogenerated on Fri Aug 2 2024 02:45:12