#include <spatial_hashing_grid.h>
List of all members.
Detailed Description
template<typename real_vector3, typename int_vector3, typename data_type_, typename hash_function_type>
class OpenTissue::spatial_hashing::Grid< real_vector3, int_vector3, data_type_, hash_function_type >
Hash Grid. This class stores an infinite uniform 3D grid as a 1D hash tabel. It is tailored to work in 3D. However, an end user could use it in 2D or even 1D by ignoring second or third coordinates (i.e. set them all to the same value).
The hash grid needs a hash function, a hash function must surply the following interface
size_t operator(int ,int , int)const size_t size()const void resize(size_t)
Important: The hash function is responsible for picking the proper hash table size. Thus if resize is invoked and the implemented hash function for instance implements something like:
m_size = new_size + (new_size % 10)
In which case the hash grid will automatically make sure that m_size is used to allocate the number of hash cells. The size() method is expected to return the value of m_size.
The operator(int,int,int) should convert a discretized point into a 1D hash key. The hash key value is expected to be within the interval 0..m_size-1.
Member Typedef Documentation
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
Type of continuous points.
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
Type of discretized points.
Constructor & Destructor Documentation
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
Member Function Documentation
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
Find the hash cell containing the grid cell enclosing the discretized point.
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
Find the hash cell containing the grid cell enclosing the continuous point.
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
Point Discretization.
- Parameters:
-
| p | A 3D point in continious space |
- Returns:
- A discretized point identifying the grid cell (not the hash cell!) which the contineous point lies inside.
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
Set Grid Cell Spacing. Observe that a grid cell is not the same as a hash-cell, data inside a grid cell is mapped to a hash-cell, this is not a one-to-one mapping. In fact multiple grid cells can be mapped to the same hash-cell (this is called a hash-collision).
To reduce the chance of this, try increase the hash-table size, this will decrease the chance of hash-collisions.
For point type data, the grid spacing should usually be set to the average size of the query data used.
For volumetric data, the grid spacing should usually be set to the average size of the volumetric data.
- Parameters:
-
| delta | The new grid cell spacing size, must be a positive number. |
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
Member Data Documentation
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
template<typename real_vector3 , typename int_vector3 , typename data_type_ , typename hash_function_type >
The documentation for this class was generated from the following file:
- /home/hauberg/Dokumenter/Capture/humim-tracker-0.1/src/OpenTissue/OpenTissue/collision/spatial_hashing/spatial_hashing_grid.h