Simple SAP collision manager. More...
#include <broadphase_SSaP.h>
Public Member Functions | |
void | clear () |
clear the manager | |
void | collide (CollisionObject *obj, void *cdata, CollisionCallBack callback) const |
perform collision test between one object and all the objects belonging to the manager | |
void | collide (void *cdata, CollisionCallBack callback) const |
perform collision test for the objects belonging to the manager (i.e., N^2 self collision) | |
void | collide (BroadPhaseCollisionManager *other_manager, void *cdata, CollisionCallBack callback) const |
perform collision test with objects belonging to another manager | |
void | distance (CollisionObject *obj, void *cdata, DistanceCallBack callback) const |
perform distance computation between one object and all the objects belonging to the manager | |
void | distance (void *cdata, DistanceCallBack callback) const |
perform distance test for the objects belonging to the manager (i.e., N^2 self distance) | |
void | distance (BroadPhaseCollisionManager *other_manager, void *cdata, DistanceCallBack callback) const |
perform distance test with objects belonging to another manager | |
bool | empty () const |
whether the manager is empty | |
void | getObjects (std::vector< CollisionObject * > &objs) const |
return the objects managed by the manager | |
void | registerObject (CollisionObject *obj) |
remove one object from the manager | |
void | setup () |
initialize the manager, related with the specific type of manager | |
size_t | size () const |
the number of objects managed by the manager | |
SSaPCollisionManager () | |
void | unregisterObject (CollisionObject *obj) |
add one object to the manager | |
void | update () |
update the condition of manager | |
Protected Member Functions | |
bool | checkColl (std::vector< CollisionObject * >::const_iterator pos_start, std::vector< CollisionObject * >::const_iterator pos_end, CollisionObject *obj, void *cdata, CollisionCallBack callback) const |
check collision between one object and a list of objects, return value is whether stop is possible | |
bool | checkDis (std::vector< CollisionObject * >::const_iterator pos_start, std::vector< CollisionObject * >::const_iterator pos_end, CollisionObject *obj, void *cdata, DistanceCallBack callback, FCL_REAL &min_dist) const |
check distance between one object and a list of objects, return value is whether stop is possible | |
bool | collide_ (CollisionObject *obj, void *cdata, CollisionCallBack callback) const |
bool | distance_ (CollisionObject *obj, void *cdata, DistanceCallBack callback, FCL_REAL &min_dist) const |
Static Protected Member Functions | |
static size_t | selectOptimalAxis (const std::vector< CollisionObject * > &objs_x, const std::vector< CollisionObject * > &objs_y, const std::vector< CollisionObject * > &objs_z, std::vector< CollisionObject * >::const_iterator &it_beg, std::vector< CollisionObject * >::const_iterator &it_end) |
Protected Attributes | |
std::vector< CollisionObject * > | objs_x |
Objects sorted according to lower x value. | |
std::vector< CollisionObject * > | objs_y |
Objects sorted according to lower y value. | |
std::vector< CollisionObject * > | objs_z |
Objects sorted according to lower z value. | |
bool | setup_ |
tag about whether the environment is maintained suitably (i.e., the objs_x, objs_y, objs_z are sorted correctly |
Simple SAP collision manager.
Definition at line 47 of file broadphase_SSaP.h.
fcl::SSaPCollisionManager::SSaPCollisionManager | ( | ) | [inline] |
Definition at line 50 of file broadphase_SSaP.h.
bool fcl::SSaPCollisionManager::checkColl | ( | std::vector< CollisionObject * >::const_iterator | pos_start, |
std::vector< CollisionObject * >::const_iterator | pos_end, | ||
CollisionObject * | obj, | ||
void * | cdata, | ||
CollisionCallBack | callback | ||
) | const [protected] |
check collision between one object and a list of objects, return value is whether stop is possible
Definition at line 176 of file broadphase_SSaP.cpp.
bool fcl::SSaPCollisionManager::checkDis | ( | std::vector< CollisionObject * >::const_iterator | pos_start, |
std::vector< CollisionObject * >::const_iterator | pos_end, | ||
CollisionObject * | obj, | ||
void * | cdata, | ||
DistanceCallBack | callback, | ||
FCL_REAL & | min_dist | ||
) | const [protected] |
check distance between one object and a list of objects, return value is whether stop is possible
Definition at line 194 of file broadphase_SSaP.cpp.
void fcl::SSaPCollisionManager::clear | ( | ) | [virtual] |
clear the manager
Implements fcl::BroadPhaseCollisionManager.
Definition at line 162 of file broadphase_SSaP.cpp.
void fcl::SSaPCollisionManager::collide | ( | CollisionObject * | obj, |
void * | cdata, | ||
CollisionCallBack | callback | ||
) | const [virtual] |
perform collision test between one object and all the objects belonging to the manager
Implements fcl::BroadPhaseCollisionManager.
Definition at line 214 of file broadphase_SSaP.cpp.
void fcl::SSaPCollisionManager::collide | ( | void * | cdata, |
CollisionCallBack | callback | ||
) | const [virtual] |
perform collision test for the objects belonging to the manager (i.e., N^2 self collision)
Implements fcl::BroadPhaseCollisionManager.
Definition at line 374 of file broadphase_SSaP.cpp.
void fcl::SSaPCollisionManager::collide | ( | BroadPhaseCollisionManager * | other_manager, |
void * | cdata, | ||
CollisionCallBack | callback | ||
) | const [virtual] |
perform collision test with objects belonging to another manager
Implements fcl::BroadPhaseCollisionManager.
Definition at line 445 of file broadphase_SSaP.cpp.
bool fcl::SSaPCollisionManager::collide_ | ( | CollisionObject * | obj, |
void * | cdata, | ||
CollisionCallBack | callback | ||
) | const [protected] |
Definition at line 221 of file broadphase_SSaP.cpp.
void fcl::SSaPCollisionManager::distance | ( | CollisionObject * | obj, |
void * | cdata, | ||
DistanceCallBack | callback | ||
) | const [virtual] |
perform distance computation between one object and all the objects belonging to the manager
Implements fcl::BroadPhaseCollisionManager.
Definition at line 269 of file broadphase_SSaP.cpp.
void fcl::SSaPCollisionManager::distance | ( | void * | cdata, |
DistanceCallBack | callback | ||
) | const [virtual] |
perform distance test for the objects belonging to the manager (i.e., N^2 self distance)
Implements fcl::BroadPhaseCollisionManager.
Definition at line 430 of file broadphase_SSaP.cpp.
void fcl::SSaPCollisionManager::distance | ( | BroadPhaseCollisionManager * | other_manager, |
void * | cdata, | ||
DistanceCallBack | callback | ||
) | const [virtual] |
perform distance test with objects belonging to another manager
Implements fcl::BroadPhaseCollisionManager.
Definition at line 471 of file broadphase_SSaP.cpp.
bool fcl::SSaPCollisionManager::distance_ | ( | CollisionObject * | obj, |
void * | cdata, | ||
DistanceCallBack | callback, | ||
FCL_REAL & | min_dist | ||
) | const [protected] |
Definition at line 277 of file broadphase_SSaP.cpp.
bool fcl::SSaPCollisionManager::empty | ( | ) | const [virtual] |
whether the manager is empty
Implements fcl::BroadPhaseCollisionManager.
Definition at line 497 of file broadphase_SSaP.cpp.
void fcl::SSaPCollisionManager::getObjects | ( | std::vector< CollisionObject * > & | objs | ) | const [virtual] |
return the objects managed by the manager
Implements fcl::BroadPhaseCollisionManager.
Definition at line 170 of file broadphase_SSaP.cpp.
void fcl::SSaPCollisionManager::registerObject | ( | CollisionObject * | obj | ) | [virtual] |
remove one object from the manager
Implements fcl::BroadPhaseCollisionManager.
Definition at line 137 of file broadphase_SSaP.cpp.
static size_t fcl::SSaPCollisionManager::selectOptimalAxis | ( | const std::vector< CollisionObject * > & | objs_x, |
const std::vector< CollisionObject * > & | objs_y, | ||
const std::vector< CollisionObject * > & | objs_z, | ||
std::vector< CollisionObject * >::const_iterator & | it_beg, | ||
std::vector< CollisionObject * >::const_iterator & | it_end | ||
) | [inline, static, protected] |
simple sweep and prune method
Definition at line 108 of file broadphase_SSaP.h.
void fcl::SSaPCollisionManager::setup | ( | ) | [virtual] |
initialize the manager, related with the specific type of manager
Implements fcl::BroadPhaseCollisionManager.
Definition at line 145 of file broadphase_SSaP.cpp.
size_t fcl::SSaPCollisionManager::size | ( | ) | const [inline, virtual] |
the number of objects managed by the manager
Implements fcl::BroadPhaseCollisionManager.
Definition at line 93 of file broadphase_SSaP.h.
void fcl::SSaPCollisionManager::unregisterObject | ( | CollisionObject * | obj | ) | [virtual] |
add one object to the manager
Implements fcl::BroadPhaseCollisionManager.
Definition at line 90 of file broadphase_SSaP.cpp.
void fcl::SSaPCollisionManager::update | ( | ) | [virtual] |
update the condition of manager
Implements fcl::BroadPhaseCollisionManager.
Definition at line 156 of file broadphase_SSaP.cpp.
std::vector<CollisionObject*> fcl::SSaPCollisionManager::objs_x [protected] |
Objects sorted according to lower x value.
Definition at line 142 of file broadphase_SSaP.h.
std::vector<CollisionObject*> fcl::SSaPCollisionManager::objs_y [protected] |
Objects sorted according to lower y value.
Definition at line 145 of file broadphase_SSaP.h.
std::vector<CollisionObject*> fcl::SSaPCollisionManager::objs_z [protected] |
Objects sorted according to lower z value.
Definition at line 148 of file broadphase_SSaP.h.
bool fcl::SSaPCollisionManager::setup_ [protected] |
tag about whether the environment is maintained suitably (i.e., the objs_x, objs_y, objs_z are sorted correctly
Definition at line 151 of file broadphase_SSaP.h.