Collision manager based on interval tree. More...
#include <broadphase_interval_tree.h>
Classes | |
struct | EndPoint |
SAP end point. More... | |
struct | SAPInterval |
Extention interval tree's interval to SAP interval, adding more information. More... | |
Public Types | |
typedef BroadPhaseCollisionManager | Base |
Public Member Functions | |
void | clear () |
clear the manager More... | |
void | collide (BroadPhaseCollisionManager *other_manager, CollisionCallBackBase *callback) const |
perform collision test with objects belonging to another manager More... | |
void | collide (CollisionCallBackBase *callback) const |
perform collision test for the objects belonging to the manager (i.e., N^2 self collision) More... | |
void | collide (CollisionObject *obj, CollisionCallBackBase *callback) const |
perform collision test between one object and all the objects belonging to the manager More... | |
void | distance (BroadPhaseCollisionManager *other_manager, DistanceCallBackBase *callback) const |
perform distance test with objects belonging to another manager More... | |
void | distance (CollisionObject *obj, DistanceCallBackBase *callback) const |
perform distance computation between one object and all the objects belonging to the manager More... | |
void | distance (DistanceCallBackBase *callback) const |
perform distance test for the objects belonging to the manager (i.e., N^2 self distance) More... | |
bool | empty () const |
whether the manager is empty More... | |
virtual std::vector< CollisionObject * > | getObjects () const |
return the objects managed by the manager More... | |
void | getObjects (std::vector< CollisionObject * > &objs) const |
return the objects managed by the manager More... | |
virtual void | getObjects (std::vector< CollisionObject * > &objs) const=0 |
return the objects managed by the manager More... | |
IntervalTreeCollisionManager () | |
void | registerObject (CollisionObject *obj) |
remove one object from the manager More... | |
void | setup () |
initialize the manager, related with the specific type of manager More... | |
size_t | size () const |
the number of objects managed by the manager More... | |
void | unregisterObject (CollisionObject *obj) |
add one object to the manager More... | |
virtual void | update () |
update the condition of manager More... | |
void | update (CollisionObject *updated_obj) |
update the manager by explicitly given the object updated More... | |
void | update (const std::vector< CollisionObject * > &updated_objs) |
update the manager by explicitly given the set of objects update More... | |
~IntervalTreeCollisionManager () | |
Public Member Functions inherited from coal::BroadPhaseCollisionManager | |
BroadPhaseCollisionManager () | |
virtual std::vector< CollisionObject * > | getObjects () const |
return the objects managed by the manager More... | |
virtual void | registerObjects (const std::vector< CollisionObject * > &other_objs) |
add objects to the manager More... | |
virtual | ~BroadPhaseCollisionManager () |
Protected Member Functions | |
bool | checkColl (typename std::deque< detail::SimpleInterval * >::const_iterator pos_start, typename std::deque< detail::SimpleInterval * >::const_iterator pos_end, CollisionObject *obj, CollisionCallBackBase *callback) const |
bool | checkDist (typename std::deque< detail::SimpleInterval * >::const_iterator pos_start, typename std::deque< detail::SimpleInterval * >::const_iterator pos_end, CollisionObject *obj, DistanceCallBackBase *callback, CoalScalar &min_dist) const |
bool | collide_ (CollisionObject *obj, CollisionCallBackBase *callback) const |
bool | distance_ (CollisionObject *obj, DistanceCallBackBase *callback, CoalScalar &min_dist) const |
Protected Member Functions inherited from coal::BroadPhaseCollisionManager | |
void | insertTestedSet (CollisionObject *a, CollisionObject *b) const |
bool | inTestedSet (CollisionObject *a, CollisionObject *b) const |
Protected Attributes | |
std::vector< EndPoint > | endpoints [3] |
vector stores all the end points More... | |
detail::IntervalTree * | interval_trees [3] |
interval tree manages the intervals More... | |
std::map< CollisionObject *, SAPInterval * > | obj_interval_maps [3] |
bool | setup_ |
tag for whether the interval tree is maintained suitably More... | |
Protected Attributes inherited from coal::BroadPhaseCollisionManager | |
bool | enable_tested_set_ |
std::set< std::pair< CollisionObject *, CollisionObject * > > | tested_set |
tools help to avoid repeating collision or distance callback for the pairs of objects tested before. It can be useful for some of the broadphase algorithms. More... | |
Collision manager based on interval tree.
Definition at line 50 of file coal/broadphase/broadphase_interval_tree.h.
Definition at line 53 of file coal/broadphase/broadphase_interval_tree.h.
coal::IntervalTreeCollisionManager::IntervalTreeCollisionManager | ( | ) |
Definition at line 138 of file broadphase_interval_tree.cpp.
coal::IntervalTreeCollisionManager::~IntervalTreeCollisionManager | ( | ) |
Definition at line 143 of file broadphase_interval_tree.cpp.
|
protected |
Definition at line 583 of file broadphase_interval_tree.cpp.
|
protected |
Definition at line 602 of file broadphase_interval_tree.cpp.
|
virtual |
clear the manager
Implements coal::BroadPhaseCollisionManager.
Definition at line 280 of file broadphase_interval_tree.cpp.
|
virtual |
perform collision test with objects belonging to another manager
Implements coal::BroadPhaseCollisionManager.
Definition at line 521 of file broadphase_interval_tree.cpp.
|
virtual |
perform collision test for the objects belonging to the manager (i.e., N^2 self collision)
Implements coal::BroadPhaseCollisionManager.
Definition at line 450 of file broadphase_interval_tree.cpp.
|
virtual |
perform collision test between one object and all the objects belonging to the manager
Implements coal::BroadPhaseCollisionManager.
Definition at line 319 of file broadphase_interval_tree.cpp.
|
protected |
Definition at line 327 of file broadphase_interval_tree.cpp.
|
virtual |
perform distance test with objects belonging to another manager
Implements coal::BroadPhaseCollisionManager.
Definition at line 545 of file broadphase_interval_tree.cpp.
|
virtual |
perform distance computation between one object and all the objects belonging to the manager
Implements coal::BroadPhaseCollisionManager.
Definition at line 361 of file broadphase_interval_tree.cpp.
|
virtual |
perform distance test for the objects belonging to the manager (i.e., N^2 self distance)
Implements coal::BroadPhaseCollisionManager.
Definition at line 504 of file broadphase_interval_tree.cpp.
|
protected |
Definition at line 370 of file broadphase_interval_tree.cpp.
|
virtual |
whether the manager is empty
Implements coal::BroadPhaseCollisionManager.
Definition at line 573 of file broadphase_interval_tree.cpp.
|
inline |
return the objects managed by the manager
Definition at line 87 of file coal/broadphase/broadphase_collision_manager.h.
|
virtual |
return the objects managed by the manager
Implements coal::BroadPhaseCollisionManager.
Definition at line 306 of file broadphase_interval_tree.cpp.
virtual void coal::BroadPhaseCollisionManager::getObjects |
return the objects managed by the manager
|
virtual |
remove one object from the manager
Implements coal::BroadPhaseCollisionManager.
Definition at line 146 of file broadphase_interval_tree.cpp.
|
virtual |
initialize the manager, related with the specific type of manager
Implements coal::BroadPhaseCollisionManager.
Definition at line 171 of file broadphase_interval_tree.cpp.
|
virtual |
the number of objects managed by the manager
Implements coal::BroadPhaseCollisionManager.
Definition at line 578 of file broadphase_interval_tree.cpp.
|
virtual |
add one object to the manager
Implements coal::BroadPhaseCollisionManager.
Definition at line 43 of file broadphase_interval_tree.cpp.
|
virtual |
update the condition of manager
Implements coal::BroadPhaseCollisionManager.
Definition at line 207 of file broadphase_interval_tree.cpp.
|
virtual |
update the manager by explicitly given the object updated
Reimplemented from coal::BroadPhaseCollisionManager.
Definition at line 235 of file broadphase_interval_tree.cpp.
|
virtual |
update the manager by explicitly given the set of objects update
Reimplemented from coal::BroadPhaseCollisionManager.
Definition at line 274 of file broadphase_interval_tree.cpp.
|
protected |
vector stores all the end points
Definition at line 156 of file coal/broadphase/broadphase_interval_tree.h.
|
protected |
interval tree manages the intervals
Definition at line 159 of file coal/broadphase/broadphase_interval_tree.h.
|
protected |
Definition at line 161 of file coal/broadphase/broadphase_interval_tree.h.
|
protected |
tag for whether the interval tree is maintained suitably
Definition at line 164 of file coal/broadphase/broadphase_interval_tree.h.