#include <hashGrid.h>
External Iterators | |
typedef HashGridBox3< Item > * | BoxIteratorPosition |
typedef ForwardIterator< HashGrid3< Item >, HashGridBox3< Item >, BoxIteratorPosition, BoxIteratorTraits > | BoxIterator |
typedef ConstForwardIterator< HashGrid3< Item >, HashGridBox3< Item >, BoxIteratorPosition, BoxIteratorTraits > | ConstBoxIterator |
BoxIterator | beginBox () throw () |
BoxIterator | endBox () throw () |
ConstBoxIterator | beginBox () const throw () |
ConstBoxIterator | endBox () const throw () |
class | BoxIteratorTraits |
Internal Iterators | |
bool | apply (UnaryProcessor< Item > &processor) throw () |
bool | apply (UnaryProcessor< HashGridBox3< Item > > &processor) throw () |
const Item * | getClosestItem (const Vector3 &point, Size distance) const throw () |
Get the nearest item for a point. | |
float | calculateMinSpacing (LongIndex memory, const Vector3 &size) throw () |
Calculate the minimum required spacing to build a HashGrid3 with the given size and less than the given memory consumption. | |
Public Member Functions | |
Constructors and destructor | |
HashGrid3 () throw () | |
Default constructor. | |
HashGrid3 (const Vector3 &origin, Size dimension_x, Size dimension_y, Size dimension_z, float spacing_x, float spacing_y, float spacing_z) throw () | |
Constructor using origin, dimensions, and spacings of the grid. | |
HashGrid3 (const Vector3 &origin, Size dimension_x, Size dimension_y, Size dimension_z, float spacing) throw () | |
Constructor using origin, dimensions, and a single spacing (only cubic grids). | |
HashGrid3 (const Vector3 &origin, const Vector3 &size, float spacing) throw () | |
Constructor using two vectors and a single spacing. | |
HashGrid3 (const HashGrid3 &grid, bool deep=true) throw () | |
Copy constructor. | |
virtual | ~HashGrid3 () throw () |
Destructor. | |
virtual void | clear () throw () |
Clears the whole grid. | |
void | clear (Position x, Position y, Position z) throw () |
Clears the HashGridBox3 at position (x, y, z). | |
void | clear (const Vector3 &vector) throw () |
Clears the HashGridBox3 at position vector . | |
void | destroy () throw () |
Destroys the grid (obsolete, only calls clear()). | |
void | destroy (Position x, Position y, Position z) throw () |
Destroys a box of the grid (obsolete, only calls clear()). | |
void | destroy (const Vector3 &vector) throw () |
Destroys a box of the grid (obsolete, only calls clear()). | |
Assignment | |
void | set (const Vector3 &origin, const Vector3 &unit, Size dimension_x, Size dimension_y, Size dimension_z) throw () |
assigns the content of a hash grid (obsolete) | |
void | set (const Vector3 &origin, float unit, Size size) throw () |
assigns the content of a hash grid (obsolete) | |
void | set (const HashGrid3 &grid, bool deep=true) throw () |
assigns the content of a hash grid (obsolete) | |
const HashGrid3 & | operator= (const HashGrid3 &grid) throw () |
Assignment operator. | |
void | get (Vector3 &origin, Vector3 &unit, Size &dimension_x, Size &dimension_y, Size &dimension_z) const throw () |
void | get (HashGrid3 &grid, bool deep=true) const throw () |
Accessors | |
Size | countNonEmptyBoxes () const throw () |
Counts the non-empty boxes of a grid. | |
Size | getSize () const throw () |
Returns the size of a grid, i. e. ????? | |
Vector3 & | getOrigin () throw () |
Returns the origin of the grid. | |
const Vector3 & | getOrigin () const throw () |
Returns a const reference of the grid origin. | |
Vector3 & | getUnit () throw () |
Returns the unit of the grid. | |
const Vector3 & | getUnit () const throw () |
Returns the unit of the grid (const version). | |
Size | getSizeX () const throw () |
Get the x dimension of the grid. | |
Size | getSizeY () const throw () |
Get the y dimension of the grid. | |
Size | getSizeZ () const throw () |
Get the z dimension of the grid. | |
HashGridBox3< Item > * | getBox (Position x, Position y, Position z) throw () |
Return the HashGridBox3 at position (x, y, z). | |
const HashGridBox3< Item > * | getBox (Position x, Position y, Position z) const throw () |
Return the HashGridBox3 at position (x, y, z) (const version). | |
HashGridBox3< Item > * | getBox (const Vector3 &vector) throw () |
Return the HashGridBox3 at position vector. | |
const HashGridBox3< Item > * | getBox (const Vector3 &vector) const throw () |
Return the HashGridBox3 at position vector (const version). | |
bool | getIndices (const HashGridBox3< Item > &box, Position &x, Position &y, Position &z) const throw () |
Get the position indices of a HashGridBox3. | |
void | insert (Position x, Position y, Position z, const Item &item) throw () |
Insert an item at position (x, y, z). | |
void | insert (const Vector3 &vector, const Item &item) throw () |
Insert an item at position vector . | |
bool | remove (Position x, Position y, Position z, const Item &item) throw () |
Remove an item from position (x, y ,z). | |
bool | remove (const Vector3 &vector, const Item &item) throw () |
Remove an item from position vector . | |
Miscellaneous | |
void | host (Visitor< HashGrid3 > &visitor) throw () |
Predicates | |
bool | operator== (const HashGrid3 &grid) const throw () |
Equality operator. | |
bool | operator!= (const HashGrid3 &grid) const throw () |
Inequality operator. | |
bool | isEmpty () const throw () |
Tests, whether this is empty. | |
Debugging and Diagnostics | |
virtual bool | isValid () const throw () |
Validity check. | |
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const throw () |
Dump the contents of a HashGrid3 to a stream. |
?????
|
Constructor using origin, dimensions, and spacings of the grid.
It creates a hashgrid at
|
|
Constructor using two vectors and a single spacing.
This constructor creates a hash grid at
|
|
Calculate the minimum required spacing to build a HashGrid3 with the given size and less than the given memory consumption.
|
|
Get the nearest item for a point.
|