Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
coal::IntervalTreeCollisionManager Class Reference

Collision manager based on interval tree. More...

#include <broadphase_interval_tree.h>

Inheritance diagram for coal::IntervalTreeCollisionManager:
Inheritance graph
[legend]

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< EndPointendpoints [3]
 vector stores all the end points More...
 
detail::IntervalTreeinterval_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...
 

Detailed Description

Collision manager based on interval tree.

Definition at line 50 of file coal/broadphase/broadphase_interval_tree.h.

Member Typedef Documentation

◆ Base

Definition at line 53 of file coal/broadphase/broadphase_interval_tree.h.

Constructor & Destructor Documentation

◆ IntervalTreeCollisionManager()

coal::IntervalTreeCollisionManager::IntervalTreeCollisionManager ( )

Definition at line 138 of file broadphase_interval_tree.cpp.

◆ ~IntervalTreeCollisionManager()

coal::IntervalTreeCollisionManager::~IntervalTreeCollisionManager ( )

Definition at line 143 of file broadphase_interval_tree.cpp.

Member Function Documentation

◆ checkColl()

bool coal::IntervalTreeCollisionManager::checkColl ( typename std::deque< detail::SimpleInterval * >::const_iterator  pos_start,
typename std::deque< detail::SimpleInterval * >::const_iterator  pos_end,
CollisionObject obj,
CollisionCallBackBase callback 
) const
protected

Definition at line 583 of file broadphase_interval_tree.cpp.

◆ checkDist()

bool coal::IntervalTreeCollisionManager::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
protected

Definition at line 602 of file broadphase_interval_tree.cpp.

◆ clear()

void coal::IntervalTreeCollisionManager::clear ( )
virtual

clear the manager

Implements coal::BroadPhaseCollisionManager.

Definition at line 280 of file broadphase_interval_tree.cpp.

◆ collide() [1/3]

void coal::IntervalTreeCollisionManager::collide ( BroadPhaseCollisionManager other_manager,
CollisionCallBackBase callback 
) const
virtual

perform collision test with objects belonging to another manager

Implements coal::BroadPhaseCollisionManager.

Definition at line 521 of file broadphase_interval_tree.cpp.

◆ collide() [2/3]

void coal::IntervalTreeCollisionManager::collide ( CollisionCallBackBase callback) const
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.

◆ collide() [3/3]

void coal::IntervalTreeCollisionManager::collide ( CollisionObject obj,
CollisionCallBackBase callback 
) const
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.

◆ collide_()

bool coal::IntervalTreeCollisionManager::collide_ ( CollisionObject obj,
CollisionCallBackBase callback 
) const
protected

Definition at line 327 of file broadphase_interval_tree.cpp.

◆ distance() [1/3]

void coal::IntervalTreeCollisionManager::distance ( BroadPhaseCollisionManager other_manager,
DistanceCallBackBase callback 
) const
virtual

perform distance test with objects belonging to another manager

Implements coal::BroadPhaseCollisionManager.

Definition at line 545 of file broadphase_interval_tree.cpp.

◆ distance() [2/3]

void coal::IntervalTreeCollisionManager::distance ( CollisionObject obj,
DistanceCallBackBase callback 
) const
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.

◆ distance() [3/3]

void coal::IntervalTreeCollisionManager::distance ( DistanceCallBackBase callback) const
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.

◆ distance_()

bool coal::IntervalTreeCollisionManager::distance_ ( CollisionObject obj,
DistanceCallBackBase callback,
CoalScalar min_dist 
) const
protected

Definition at line 370 of file broadphase_interval_tree.cpp.

◆ empty()

bool coal::IntervalTreeCollisionManager::empty ( ) const
virtual

whether the manager is empty

Implements coal::BroadPhaseCollisionManager.

Definition at line 573 of file broadphase_interval_tree.cpp.

◆ getObjects() [1/3]

virtual std::vector<CollisionObject*> coal::BroadPhaseCollisionManager::getObjects
inline

return the objects managed by the manager

Definition at line 87 of file coal/broadphase/broadphase_collision_manager.h.

◆ getObjects() [2/3]

void coal::IntervalTreeCollisionManager::getObjects ( std::vector< CollisionObject * > &  objs) const
virtual

return the objects managed by the manager

Implements coal::BroadPhaseCollisionManager.

Definition at line 306 of file broadphase_interval_tree.cpp.

◆ getObjects() [3/3]

virtual void coal::BroadPhaseCollisionManager::getObjects

return the objects managed by the manager

◆ registerObject()

void coal::IntervalTreeCollisionManager::registerObject ( CollisionObject obj)
virtual

remove one object from the manager

Implements coal::BroadPhaseCollisionManager.

Definition at line 146 of file broadphase_interval_tree.cpp.

◆ setup()

void coal::IntervalTreeCollisionManager::setup ( )
virtual

initialize the manager, related with the specific type of manager

Implements coal::BroadPhaseCollisionManager.

Definition at line 171 of file broadphase_interval_tree.cpp.

◆ size()

size_t coal::IntervalTreeCollisionManager::size ( ) const
virtual

the number of objects managed by the manager

Implements coal::BroadPhaseCollisionManager.

Definition at line 578 of file broadphase_interval_tree.cpp.

◆ unregisterObject()

void coal::IntervalTreeCollisionManager::unregisterObject ( CollisionObject obj)
virtual

add one object to the manager

Implements coal::BroadPhaseCollisionManager.

Definition at line 43 of file broadphase_interval_tree.cpp.

◆ update() [1/3]

void coal::IntervalTreeCollisionManager::update ( )
virtual

update the condition of manager

Implements coal::BroadPhaseCollisionManager.

Definition at line 207 of file broadphase_interval_tree.cpp.

◆ update() [2/3]

void coal::IntervalTreeCollisionManager::update ( CollisionObject updated_obj)
virtual

update the manager by explicitly given the object updated

Reimplemented from coal::BroadPhaseCollisionManager.

Definition at line 235 of file broadphase_interval_tree.cpp.

◆ update() [3/3]

void coal::IntervalTreeCollisionManager::update ( const std::vector< CollisionObject * > &  updated_objs)
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.

Member Data Documentation

◆ endpoints

std::vector<EndPoint> coal::IntervalTreeCollisionManager::endpoints[3]
protected

vector stores all the end points

Definition at line 156 of file coal/broadphase/broadphase_interval_tree.h.

◆ interval_trees

detail::IntervalTree* coal::IntervalTreeCollisionManager::interval_trees[3]
protected

interval tree manages the intervals

Definition at line 159 of file coal/broadphase/broadphase_interval_tree.h.

◆ obj_interval_maps

std::map<CollisionObject*, SAPInterval*> coal::IntervalTreeCollisionManager::obj_interval_maps[3]
protected

Definition at line 161 of file coal/broadphase/broadphase_interval_tree.h.

◆ setup_

bool coal::IntervalTreeCollisionManager::setup_
protected

tag for whether the interval tree is maintained suitably

Definition at line 164 of file coal/broadphase/broadphase_interval_tree.h.


The documentation for this class was generated from the following files:


hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:45:00