Octree implementation.
More...
#include <iOctree.h>
◆ iOctree()
igor::iOctree::iOctree |
( |
const iAACubed & |
box, |
|
|
float64 |
halfMinResolution = 1.0 , |
|
|
uint64 |
objectCountMaxThreashold = 8 , |
|
|
uint64 |
objectCountMinThreashold = 2 |
|
) |
| |
creates the octree including the root node
- Parameters
-
box | volume of the whole octree |
halfMinResolution | half of the minimum size a octree nodes volume has |
objectCountMaxThreashold | maximum amount of objects before splitting the parenting octree node |
objectCountMinThreashold | minimum amount of objects in the child nodes of a node before merging them together |
◆ ~iOctree()
igor::iOctree::~iOctree |
( |
| ) |
|
|
virtual |
◆ addFilter() [1/3]
void igor::iOctree::addFilter |
( |
const iaSphered & |
sphere | ) |
|
adds sphere to filter set
- Parameters
-
sphere | the sphere to filter with |
◆ addFilter() [2/3]
void igor::iOctree::addFilter |
( |
const iFrustumd & |
frustum | ) |
|
adds frustum to filter set
- Parameters
-
◆ addFilter() [3/3]
void igor::iOctree::addFilter |
( |
const iPlaned & |
plane | ) |
|
adds plane to filter set
- Parameters
-
plane | the plane to filter with |
◆ clearFilter()
void igor::iOctree::clearFilter |
( |
| ) |
|
◆ draw()
void igor::iOctree::draw |
( |
| ) |
|
draws the octrees structure
only use for debugging!
◆ filter() [1/2]
void igor::iOctree::filter |
( |
| ) |
|
filters the octree using the current filter set
use getResult to get the result
◆ filter() [2/2]
void igor::iOctree::filter |
( |
const iFrustumd & |
frustum | ) |
|
filters the octree with given frustum
use getResult to get the result
- Parameters
-
◆ getResult()
const std::vector< void * > & igor::iOctree::getResult |
( |
| ) |
const |
returns the result of filtering
- Returns
- the filtered user data
◆ insert()
void igor::iOctree::insert |
( |
void * |
userData, |
|
|
const iaSphered & |
sphere |
|
) |
| |
insert user data to octree
- Parameters
-
userData | pointer to user data |
◆ remove()
void igor::iOctree::remove |
( |
void * |
userData | ) |
|
remove user data from octree
- Parameters
-
userData | pointer to user data |
◆ update()
void igor::iOctree::update |
( |
void * |
userData, |
|
|
const iaSphered & |
sphere |
|
) |
| |
update user data in octree
this is called usually if the user data changed it's position
- Parameters
-
userData | pointer to user data |
The documentation for this class was generated from the following files:
- /home/maddin/dev/Igor/src/igor/igor/data/iOctree.h
- /home/maddin/dev/Igor/src/igor/igor/data/iOctree.cpp