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

Internal node of the quadtree. More...


Detailed Description

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

Internal node of the quadtree.

Definition at line 215 of file Quadtree.hpp.

#include <Quadtree.hpp>

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

List of all members.

Public Member Functions

 QuadNodeInternal (Quadtree< T, RasterT > *_tree, QuadNodeInternal< T, RasterT > *_parent, RasterRect rect, bool xbalance=true, bool ybalance=true)
 Size holder element.
QuadNode< T, RasterT >::NODE_TYPE getType () const
QuadNodeLeaf< T, RasterT > * getLeafForCell (const RasterCellIndex &cell)
QuadNode< T, RasterT > * getChild (int index)
 Returns pointer to the Cell number 's' if 's' is comprise in [1, BMA_TREE_CARDINALITY].
int getChildPos (QuadNode< T, RasterT > *child)
bool setChildren (QuadNode< T, RasterT > *S1, QuadNode< T, RasterT > *S2, QuadNode< T, RasterT > *S3, QuadNode< T, RasterT > *S4)
 Set or change the child cells.
bool setChild (QuadNode< T, RasterT > *child, int index)

Protected Attributes

QuadNode< T, RasterT > * children [4]
 Array of pointers to the Four child cells.

Private Member Functions

bool divide (const RasterRect &_rect, bool xbalance=true, bool ybalance=true)
 Divide this internal node to 4 nodes (leaves or internal nodes)

Friends

template<typename U , class URasterT >
std::ostream & operator<< (std::ostream &out, const QuadNodeInternal< U, URasterT > &node)

Constructor & Destructor Documentation

template<typename T, class RasterT>
jafar::lgl::QuadNodeInternal< T, RasterT >::QuadNodeInternal ( Quadtree< T, RasterT > *  _tree,
QuadNodeInternal< T, RasterT > *  _parent,
RasterRect  rect,
bool  xbalance = true,
bool  ybalance = true 
)

Size holder element.

Create an internal node.

Create an internal node

Definition at line 746 of file Quadtree.hpp.

References jafar::lgl::QuadNodeInternal< T, RasterT >::children, and jafar::lgl::QuadNodeInternal< T, RasterT >::divide().


Member Function Documentation

template<typename T, class RasterT>
bool jafar::lgl::QuadNodeInternal< T, RasterT >::setChildren ( QuadNode< T, RasterT > *  S1,
QuadNode< T, RasterT > *  S2,
QuadNode< T, RasterT > *  S3,
QuadNode< T, RasterT > *  S4 
)

Set or change the child cells.

Sub-Cells Positions : ----------------- | 1 | 2 | ----------------- | 3 | 4 | -----------------

Parameters:
S1pointer to the child cell at position 1.
S2pointer to the child cell at position 2.
S3pointer to the child cell at position 3.
S4pointer to the child cell at position 4.
Returns:
BMA_SUCCESS on success, BMA_FAIL is S1 is NULL

Definition at line 967 of file Quadtree.hpp.


Member Data Documentation

template<typename T, class RasterT>
QuadNode<T,RasterT>* jafar::lgl::QuadNodeInternal< T, RasterT >::children[4] [protected]

Array of pointers to the Four child cells.

Sub-Cells Positions : ----------------- | TOP-LEFT | TOP-RIGHT | ----------------------------------- | BOTTOM-LEFT | BOTTOM-RIGHT | -----------------

Definition at line 287 of file Quadtree.hpp.

Referenced by jafar::lgl::QuadNodeInternal< T, RasterT >::QuadNodeInternal().


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