snark
Public Member Functions | List of all members
voxel_grid< V, P > Class Template Reference

#include <voxel_grid.h>

+ Inheritance diagram for voxel_grid< V, P >:

Public Member Functions

const column_type * column (const point_type &p) const
 return column of voxels
bool covers (const point_type &p) const
 return true, if voxel grid covers a datapoint
void erase_at (const point_type &p)
 erase voxel covering given point
const interval_typeextents () const
 return extents
index_type index_of (const point_type &p) const
 return index of the voxel covering a given datapoint
point_type origin (const index_type &i) const
 return voxel origin
point_type origin_at (const point_type &p) const
 return voxel origin
const point_type & resolution () const
 return resolution
voxel_type * touch_at (const point_type &d)
 create voxel that would cover given point and return index, if point is not out of bound
 voxel_grid (const interval_type &extents, const point_type &resolution, bool adjusted=false)
- Public Member Functions inherited from pin_screen< V >
iterator begin ()
 return begin
const_iterator begin () const
 return begin
void clear ()
 clean
const column_typecolumn (std::size_t i, std::size_t j) const
iterator end ()
 return end
const_iterator end () const
 return end
void erase (std::size_t i, std::size_t j, std::size_t k)
 erase element
void erase (const index_type &i)
 erase element
bool exists (std::size_t i, std::size_t j, std::size_t k) const
 return true, if element exists
bool exists (const index_type &i) const
 return true, if element exists
V * find (std::size_t i, std::size_t j, std::size_t k)
 return reference to element, if exists
V * find (const index_type &i)
 return reference to element, if exists
const V * find (std::size_t i, std::size_t j, std::size_t k) const
 return reference to element, if exists
const V * find (const index_type &i) const
 return reference to element, if exists
std::size_t height (std::size_t i, std::size_t j) const
 return column height
V & operator() (std::size_t i, std::size_t j, std::size_t k)
 return reference to element; creates element, if it does not exist
const V & operator() (std::size_t i, std::size_t j, std::size_t k) const
 return reference to element; crashes, if element does not exist (thus check Exists() first )
V & operator() (const index_type &i)
const V & operator() (const index_type &i) const
 return reference to element; crashes, if element does not exist (thus check Exists() first )
 pin_screen (std::size_t size1, std::size_t size2)
 constructor
 pin_screen (size_type size)
 constructor
size_type size () const
 return 2D array size
V & touch (std::size_t i, std::size_t j, std::size_t k)
 return reference to element, create, if it does not exist
V & touch (const index_type &i)
 return reference to element, create, if it does not exist

Additional Inherited Members

- Public Types inherited from pin_screen< V >
typedef std::map< std::size_t, V > column_type
 column type
typedef Eigen::Matrix
< std::size_t, 1, 3 > 
index_type
 index type
typedef Eigen::Matrix
< std::size_t, 1, 2 > 
size_type
 size type
typedef V value_type
 value type

Detailed Description

template<typename V = boost::none_t, typename P = Eigen::Vector3d>
class snark::voxel_grid< V, P >

voxel grid

Constructor & Destructor Documentation

voxel_grid ( const interval_type extents,
const point_type &  resolution,
bool  adjusted = false 
)
inline

constructor

Note
if adjusted, the actual extents will be extents - resolution / 2, extents + resolution / 2

The documentation for this class was generated from the following file: