INET Framework for OMNeT++/OMNEST
|
#include <QuadTree.h>
Public Types | |
typedef std::vector< const cObject * > | Points |
Public Member Functions | |
bool | move (const cObject *point, const Coord &newPos) |
bool | remove (const cObject *point) |
bool | insert (const cObject *point, const Coord &pos) |
void | rangeQuery (const Coord &pos, double range, const IVisitor *visitor) const |
void | strictRangeQuery (const Coord &pos, double range, const IVisitor *visitor) const |
QuadTree (const Coord &boundaryMin, const Coord &boundaryMax, unsigned int quadrantCapacity, QuadTree *parent) | |
~QuadTree () | |
Protected Member Functions | |
QuadTree * | searchQuadrant (const Coord &lastPos) |
unsigned int | whichQuadrant (const Coord &pos) const |
bool | hasChild () const |
void | setBoundary (Coord *minBoundaries, Coord *maxBoundaries) const |
void | splitPoints () |
void | setToLeaf () |
bool | isInRectangleRange (const Coord &pointCoord) const |
bool | doesIntersectWithQuadrant (const Coord &pos, double range) const |
void | tryToJoinChildQuadrants () |
Protected Attributes | |
std::map< const cObject *, Coord > * | lastPosition |
unsigned int | quadrantCapacity |
Coord | boundaryMin |
Coord | boundaryMax |
Points | points |
QuadTree * | quadrants [4] |
QuadTree * | parent |
typedef std::vector<const cObject *> inet::QuadTree::Points |
inet::QuadTree::QuadTree | ( | const Coord & | boundaryMin, |
const Coord & | boundaryMax, | ||
unsigned int | quadrantCapacity, | ||
QuadTree * | parent | ||
) |
Referenced by splitPoints().
inet::QuadTree::~QuadTree | ( | ) |
|
protected |
Referenced by rangeQuery(), and strictRangeQuery().
|
protected |
Referenced by insert(), rangeQuery(), searchQuadrant(), and strictRangeQuery().
bool inet::QuadTree::insert | ( | const cObject * | point, |
const Coord & | pos | ||
) |
Referenced by inet::physicallayer::QuadTreeNeighborCache::addRadio(), inet::physicallayer::QuadTreeNeighborCache::fillQuadTreeWithRadios(), move(), and splitPoints().
|
protected |
Referenced by insert(), searchQuadrant(), and whichQuadrant().
bool inet::QuadTree::move | ( | const cObject * | point, |
const Coord & | newPos | ||
) |
Referenced by inet::physicallayer::QuadTreeNeighborCache::sendToNeighbors().
bool inet::QuadTree::remove | ( | const cObject * | point | ) |
Referenced by inet::physicallayer::QuadTreeNeighborCache::removeRadio().
Referenced by move(), remove(), and searchQuadrant().
Referenced by splitPoints().
|
protected |
Referenced by QuadTree(), and tryToJoinChildQuadrants().
|
protected |
Referenced by insert().
void inet::QuadTree::strictRangeQuery | ( | const Coord & | pos, |
double | range, | ||
const IVisitor * | visitor | ||
) | const |
|
protected |
Referenced by tryToJoinChildQuadrants().
|
protected |
Referenced by splitPoints().
|
protected |
Referenced by doesIntersectWithQuadrant(), isInRectangleRange(), QuadTree(), and setBoundary().
|
protected |
Referenced by doesIntersectWithQuadrant(), isInRectangleRange(), QuadTree(), and setBoundary().
|
protected |
Referenced by QuadTree(), remove(), splitPoints(), and ~QuadTree().
|
protected |
Referenced by QuadTree(), tryToJoinChildQuadrants(), and ~QuadTree().
|
protected |
Referenced by insert(), move(), rangeQuery(), splitPoints(), strictRangeQuery(), and tryToJoinChildQuadrants().
|
protected |
Referenced by insert(), QuadTree(), splitPoints(), and tryToJoinChildQuadrants().
|
protected |
Referenced by hasChild(), insert(), rangeQuery(), searchQuadrant(), setToLeaf(), splitPoints(), strictRangeQuery(), tryToJoinChildQuadrants(), whichQuadrant(), and ~QuadTree().