public

Inheritance Graph

graph BT
	QuadTree
	click QuadTree "classRendering_1_1MeshUtils_1_1QuadtreeMeshBuilder_1_1QuadTree"

Description

quad tree used to subdivide the texture into areas

Public Attributes

   
   
std::unique_ptr< QuadTree > NW
   
std::unique_ptr< QuadTree > NE
   
std::unique_ptr< QuadTree > SW
   
std::unique_ptr< QuadTree > SE
   
QuadTree * WEST
   
QuadTree * NORTH
   
QuadTree * EAST
   
QuadTree * SOUTH

Public Functions

   
   
  QuadTree(uint16_t x, uint16_t y, uint16_t _width, uint16_t _height)
   
  QuadTree( QuadTree * parent, uint16_t x, uint16_t y, uint16_t _width, uint16_t _height)
   
  ~QuadTree()
   
bool isLeaf() const
   
uint16_t getWidth() const
   
uint16_t getHeight() const
   
uint16_t getX() const
   
uint16_t getY() const
   
const QuadTree * getParent() const
   
const QuadTree * getWestNeighbor() const
   
const QuadTree * getNorthNeighbor() const
   
const QuadTree * getEastNeighbor() const
   
const QuadTree * getSouthNeighbor() const
   
const QuadTree * getNorthWestChild() const
   
const QuadTree * getNorthEastChild() const
   
const QuadTree * getSouthWestChild() const
   
const QuadTree * getSouthEastChild() const
   
bool split()
   
void collectLeaves(std::deque< QuadTree * > & leaves)
   
uint8_t collectVertices(std::vector< vertex_t > & vertices) const

Documentation

variable
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::NW

public
 
 
std::unique_ptr< QuadTree > NW

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:45


variable
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::NE

public
 
 
std::unique_ptr< QuadTree > NE

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:46


variable
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::SW

public
 
 
std::unique_ptr< QuadTree > SW

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:47


variable
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::SE

public
 
 
std::unique_ptr< QuadTree > SE

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:48


variable
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::WEST

public
 
 
QuadTree * WEST

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:53


variable
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::NORTH

public
 
 
QuadTree * NORTH

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:54


variable
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::EAST

public
 
 
QuadTree * EAST

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:55


variable
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::SOUTH

public
 
 
QuadTree * SOUTH

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:56


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::QuadTree

public
     
     
QuadTree( uint16_t x,
  uint16_t y,
  uint16_t _width,
  uint16_t _height
)    

[ctor] creates a QuadTree-root width specified x, y, width and height

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:82


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::QuadTree

public
     
     
QuadTree( QuadTree * parent,
  uint16_t x,
  uint16_t y,
  uint16_t _width,
  uint16_t _height
)    

[ctor] creates a QuadTree-node with specified parent, x, y, width and height

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:85


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::~QuadTree

public
   
   
~QuadTree( )

[dtor]

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:88


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::isLeaf

public const inline
   
   
bool isLeaf( ) const

checks whether current quad-tree is leaf (has got no children)

Returns

true if current quad-tree has no children, otherwise false

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:94


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getWidth

public const inline
   
   
uint16_t getWidth( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:96


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getHeight

public const inline
   
   
uint16_t getHeight( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:97


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getX

public const inline
   
   
uint16_t getX( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:98


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getY

public const inline
   
   
uint16_t getY( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:99


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getParent

public const inline
   
   
const QuadTree * getParent( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:101


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getWestNeighbor

public const inline
   
   
const QuadTree * getWestNeighbor( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:103


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getNorthNeighbor

public const inline
   
   
const QuadTree * getNorthNeighbor( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:104


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getEastNeighbor

public const inline
   
   
const QuadTree * getEastNeighbor( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:105


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getSouthNeighbor

public const inline
   
   
const QuadTree * getSouthNeighbor( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:106


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getNorthWestChild

public const inline
   
   
const QuadTree * getNorthWestChild( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:108


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getNorthEastChild

public const inline
   
   
const QuadTree * getNorthEastChild( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:109


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getSouthWestChild

public const inline
   
   
const QuadTree * getSouthWestChild( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:110


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::getSouthEastChild

public const inline
   
   
const QuadTree * getSouthEastChild( ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:111


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::split

public
   
   
bool split( )

simply tries to split the current node into four smaller nodes

Returns

true if splitting was successful, or false if the node has been already split

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:117


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::collectLeaves

public
     
     
void collectLeaves( std::deque< QuadTree * > & leaves )

collects all leaf-nodes from current node’s subtree

Parameters

leaves
: list to that all leaves will be collected

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:123


function
Rendering::MeshUtils::QuadtreeMeshBuilder::QuadTree::collectVertices

public const
     
     
uint8_t collectVertices( std::vector< vertex_t > & vertices ) const

Defined in Rendering/MeshUtils/QuadtreeMeshBuilder.h:124