Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Protected Attributes
jafar::lgl::QuadNode< T, RasterT > Class Template Reference

Quadtree abstract node T is the data that each leaf holds. More...


Detailed Description

template<typename T, class RasterT>
class jafar::lgl::QuadNode< T, RasterT >

Quadtree abstract node T is the data that each leaf holds.

Definition at line 152 of file Quadtree.hpp.

#include <Quadtree.hpp>

Inheritance diagram for jafar::lgl::QuadNode< T, RasterT >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  NODE_TYPE { INTERNAL_NODE, LEAF_NODE, ROOT_NODE }
 Node type. More...

Public Member Functions

 QuadNode (Quadtree< T, RasterT > *_tree, QuadNodeInternal< T, RasterT > *_parent, RasterRect _r)
 Constructor.
bool contains (const RasterCellIndex &cell) const
 Check if the current node contains RasterCellIndex or RasterRect.
bool contains (const RasterRect &_rect) const
QuadNodeInternal< T, RasterT > * getParent () const
Quadtree< T, RasterT > * getTree () const
void setParent (QuadNodeInternal< T, RasterT > *_parent)
 Set or change the parent cell.
int getxroot () const
int getyroot () const
int getxsize () const
int getysize () const
RasterRect getRect () const
virtual QuadNodeLeaf< T,
RasterT > * 
getLeafForCell (const RasterCellIndex &cell)=0
virtual NODE_TYPE getType () const =0

Protected Attributes

Quadtree< T, RasterT > * tree
 Pointer to the quadtree inside of which this node is.
QuadNodeInternal< T, RasterT > * parent
 Pointer to the parent cell null if first cell.
RasterRect rect

Member Enumeration Documentation

template<typename T, class RasterT>
enum jafar::lgl::QuadNode::NODE_TYPE

Node type.

We differentiate leaves from other nodes which are called internal nodes.

Definition at line 162 of file Quadtree.hpp.


Constructor & Destructor Documentation

template<typename T, class RasterT>
jafar::lgl::QuadNode< T, RasterT >::QuadNode ( Quadtree< T, RasterT > *  _tree,
QuadNodeInternal< T, RasterT > *  _parent,
RasterRect  _r 
)

Constructor.

A node is always attached to a tree

Definition at line 699 of file Quadtree.hpp.


Member Function Documentation

template<typename T, class RasterT>
void jafar::lgl::QuadNode< T, RasterT >::setParent ( QuadNodeInternal< T, RasterT > *  _parent)

Set or change the parent cell.

Parameters:
Ppointer to the parent cell

Definition at line 735 of file Quadtree.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:41 for Jafar by doxygen 1.7.6.1
LAAS-CNRS