FlightGear next
|
Classes | |
class | Branch |
class | Leaf |
class | Node |
Octree node base class, tracks its bounding box and provides various queries relating to it. More... | |
class | Ordered |
Decorate an object with a double value, and use that value to order items, for the purpoises of the STL algorithms. More... | |
Typedefs | |
typedef Ordered< Node * > | OrderedNode |
typedef std::greater< OrderedNode > | FNPQCompare |
typedef std::priority_queue< OrderedNode, std::vector< OrderedNode >, FNPQCompare > | FindNearestPQueue |
the priority queue is fundamental to our search algorithm. | |
typedef Ordered< FGPositioned * > | OrderedPositioned |
typedef std::vector< OrderedPositioned > | FindNearestResults |
typedef std::deque< Node * > | FindLinesDeque |
Functions | |
Node * | globalTransientOctree () |
Node * | globalPersistentOctree () |
static bool | boxContainsBox (const SGBoxd &a, const SGBoxd &b) |
bool | findNearestN (const SGVec3d &aPos, unsigned int aN, double aCutoffM, FGPositioned::Filter *aFilter, FGPositionedList &aResults, int aCutoffMsec) |
bool | findAllWithinRange (const SGVec3d &aPos, double aRangeM, FGPositioned::Filter *aFilter, FGPositionedList &aResults, int aCutoffMsec) |
Variables | |
static std::unique_ptr< Node > | global_spatialOctree |
static std::unique_ptr< Node > | global_transientOctree |
double | RADIUS_EARTH_M = 7000 * 1000.0 |
const double | LEAF_SIZE = SG_NM_TO_METER * 8.0 |
const double | LEAF_SIZE_SQR = LEAF_SIZE * LEAF_SIZE |
typedef std::deque<Node*> flightgear::Octree::FindLinesDeque |
Definition at line 106 of file PositionedOctree.hxx.
typedef std::priority_queue<OrderedNode, std::vector<OrderedNode>, FNPQCompare> flightgear::Octree::FindNearestPQueue |
the priority queue is fundamental to our search algorithm.
When searching, we know the front of the queue is the nearest unexpanded node (to the search location). The default STL pqueue returns the 'largest' item from top(), so to get the smallest, we need to replace the default Compare functor (less<>) with greater<>.
Definition at line 99 of file PositionedOctree.hxx.
typedef std::vector<OrderedPositioned> flightgear::Octree::FindNearestResults |
Definition at line 102 of file PositionedOctree.hxx.
typedef std::greater<OrderedNode> flightgear::Octree::FNPQCompare |
Definition at line 90 of file PositionedOctree.hxx.
typedef Ordered<Node*> flightgear::Octree::OrderedNode |
Definition at line 89 of file PositionedOctree.hxx.
Definition at line 101 of file PositionedOctree.hxx.
|
static |
Definition at line 217 of file PositionedOctree.cxx.
bool flightgear::Octree::findAllWithinRange | ( | const SGVec3d & | aPos, |
double | aRangeM, | ||
FGPositioned::Filter * | aFilter, | ||
FGPositionedList & | aResults, | ||
int | aCutoffMsec ) |
Definition at line 373 of file PositionedOctree.cxx.
bool flightgear::Octree::findNearestN | ( | const SGVec3d & | aPos, |
unsigned int | aN, | ||
double | aCutoffM, | ||
FGPositioned::Filter * | aFilter, | ||
FGPositionedList & | aResults, | ||
int | aCutoffMsec ) |
Definition at line 331 of file PositionedOctree.cxx.
Node * flightgear::Octree::globalPersistentOctree | ( | ) |
Definition at line 44 of file PositionedOctree.cxx.
Node * flightgear::Octree::globalTransientOctree | ( | ) |
Definition at line 34 of file PositionedOctree.cxx.
|
static |
Definition at line 29 of file PositionedOctree.cxx.
|
static |
Definition at line 30 of file PositionedOctree.cxx.
const double flightgear::Octree::LEAF_SIZE = SG_NM_TO_METER * 8.0 |
Definition at line 36 of file PositionedOctree.hxx.
Definition at line 37 of file PositionedOctree.hxx.
double flightgear::Octree::RADIUS_EARTH_M = 7000 * 1000.0 |
Definition at line 32 of file PositionedOctree.cxx.