#include <collide_serial.h>
Public Member Functions | |
CollideOctant (int size, bbox3d myTerritory) | |
virtual | ~CollideOctant () |
void | setBbox (const bbox3d &b) |
const bbox3d & | getBbox (void) const |
const bbox3d & | getTerritory (void) const |
bool | x_inTerritory (real v) const |
bool | y_inTerritory (real v) const |
bool | z_inTerritory (real v) const |
int | getTotal (void) const |
int | getHome (void) const |
void | markHome (int h) |
void | growTo (const CollideObjRec *b) |
void | addIfBoundary (const CollideObjRec *b) |
CollideOctant * | divide (int alongAxis) |
void | check (void) const |
void | print (const char *desc=NULL) const |
virtual void | add (const CollideObjRec *) |
void | findCollisions (int splitAxis, CollisionList &dest) |
void | findCollisions (CollisionList &dest) |
Private Types | |
typedef growableBufferT< const CollideObjRec * > | parent |
Private Member Functions | |
int | splitAt (int alongAxis) |
Private Attributes | |
int | nHome |
bbox3d | box |
bbox3d | territory |
Definition at line 47 of file collide_serial.h.
typedef growableBufferT<const CollideObjRec *> CollideOctant::parent [private] |
Definition at line 49 of file collide_serial.h.
Definition at line 58 of file collide_serial.h.
References box, bbox3d::empty(), and nHome.
Referenced by divide().
CollideOctant::~CollideOctant | ( | ) | [virtual] |
Definition at line 119 of file collide_serial.C.
void CollideOctant::setBbox | ( | const bbox3d & | b | ) | [inline] |
Definition at line 63 of file collide_serial.h.
References box.
Referenced by collideVoxel::collide().
const bbox3d& CollideOctant::getBbox | ( | void | ) | const [inline] |
Definition at line 64 of file collide_serial.h.
References box.
Referenced by check().
const bbox3d& CollideOctant::getTerritory | ( | void | ) | const [inline] |
Definition at line 66 of file collide_serial.h.
References bbox3d::axis(), seg1dT< T >::containsHalf(), and territory.
Referenced by simpleFindCollisions().
Definition at line 67 of file collide_serial.h.
References bbox3d::axis(), seg1dT< T >::containsHalf(), and territory.
Referenced by simpleFindCollisions().
Definition at line 68 of file collide_serial.h.
References bbox3d::axis(), seg1dT< T >::containsHalf(), and territory.
Referenced by simpleFindCollisions().
int CollideOctant::getTotal | ( | void | ) | const [inline] |
Definition at line 71 of file collide_serial.h.
References growableBufferT< const CollideObjRec * >::length().
Referenced by simpleFindCollisions().
int CollideOctant::getHome | ( | void | ) | const [inline] |
Definition at line 73 of file collide_serial.h.
References nHome.
Referenced by findCollisions(), and simpleFindCollisions().
void CollideOctant::markHome | ( | int | h | ) | [inline] |
Definition at line 75 of file collide_serial.h.
References nHome.
Referenced by collideVoxel::collide().
void CollideOctant::growTo | ( | const CollideObjRec * | b | ) | [inline] |
Definition at line 78 of file collide_serial.h.
References bbox3d::add(), box, CollideObjRec::getBbox(), and growableBufferT< const CollideObjRec * >::push_fast().
void CollideOctant::addIfBoundary | ( | const CollideObjRec * | b | ) | [inline] |
Definition at line 83 of file collide_serial.h.
References box, CollideObjRec::getBbox(), bbox3d::intersects(), and growableBufferT< const CollideObjRec * >::push_fast().
Referenced by divide().
CollideOctant * CollideOctant::divide | ( | int | alongAxis | ) |
Definition at line 206 of file collide_serial.C.
References bbox3d::add(), addIfBoundary(), bufferT< const CollideObjRec * >::at(), bufferT< T >::at(), box, check(), CollideOctant(), CollideObjRec::getBbox(), growableBufferT< T >::length(), growableBufferT< const CollideObjRec * >::length(), nHome, splitAt(), and territory.
Referenced by findCollisions().
void CollideOctant::check | ( | void | ) | const |
Definition at line 98 of file collide_serial.C.
References bufferT< const CollideObjRec * >::at(), box, bbox3d::contains(), bbox3d::containsOpen(), CollideObjRec::getBbox(), getBbox(), bbox3d::getSmallest(), bbox3d::intersects(), bbox3d::isEmpty(), growableBufferT< const CollideObjRec * >::length(), nHome, and PUP::s.
Referenced by divide().
void CollideOctant::print | ( | const char * | desc = NULL |
) | const |
Definition at line 36 of file collide_serial.C.
References box, growableBufferT< const CollideObjRec * >::length(), nHome, and bbox3d::print().
void CollideOctant::add | ( | const CollideObjRec * | p | ) | [virtual] |
Implements CollideObjConsumer.
Definition at line 120 of file collide_serial.C.
References growableBufferT< const CollideObjRec * >::push_back().
void CollideOctant::findCollisions | ( | int | splitAxis, | |
CollisionList & | dest | |||
) |
Definition at line 289 of file collide_serial.C.
References bufferT< const CollideObjRec * >::at(), divide(), findCollisions(), getHome(), CollideObjRec::id, growableBufferT< const CollideObjRec * >::length(), n, CollideObjID::prio, and simpleFindCollisions().
Referenced by collideVoxel::collide(), and findCollisions().
void CollideOctant::findCollisions | ( | CollisionList & | dest | ) | [inline] |
Definition at line 97 of file collide_serial.h.
References findCollisions().
int CollideOctant::nHome [private] |
Definition at line 50 of file collide_serial.h.
Referenced by check(), CollideOctant(), divide(), getHome(), markHome(), print(), and splitAt().
bbox3d CollideOctant::box [private] |
Definition at line 51 of file collide_serial.h.
Referenced by addIfBoundary(), check(), CollideOctant(), divide(), getBbox(), growTo(), print(), and setBbox().
bbox3d CollideOctant::territory [private] |
Definition at line 52 of file collide_serial.h.
Referenced by divide(), getTerritory(), x_inTerritory(), y_inTerritory(), and z_inTerritory().