Visual Computing Library
Loading...
Searching...
No Matches
vcl::RegularGrid< Scalar, N > Class Template Reference

Public Types

using PointType = Point< Scalar, N >
 
using BBoxType = Box< PointType >
 
using ScalarType = Scalar
 
using CellCoord = Point< uint, N >
 
using CellIterator = vcl::CellIterator< N >
 
using CellView = View< CellIterator >
 

Public Member Functions

 RegularGrid (const Point< Scalar, N > &min, const Point< Scalar, N > &max, const Point< uint, N > &size)
 
 RegularGrid (const Box< Point< Scalar, N > > &bbox, const Point< uint, N > &size)
 
Point< Scalar, N > min () const
 
Point< Scalar, N > max () const
 
Scalar length (uint d) const
 Returns the edge legth of the bounding box of the grid in the d-th dimension.
 
Point< Scalar, N > lengths () const
 Returns the edge legths of the bounding box of the grid.
 
uint cellNumber (uint d) const
 Returns the number of cells of the Grid in the d-th dimension.
 
Point< uint, N > cellNumbers () const
 Returns the number of cells for each dimension of the grid.
 
uint indexOfCell (const CellCoord &c) const
 Return an unique index that can be associated to the given cell coordinate.
 
CellCoord cellOfIndex (uint index) const
 Returns the cell coordinate associated to the given unique index.
 
Scalar cellLength (uint d) const
 Returns the length of a cell of the grid in the d-th dimension.
 
Point< Scalar, N > cellLengths () const
 Returns the lengths of a cell of the grid for each dimension.
 
Scalar cellDiagonal () const
 
uint cell (uint d, const Scalar &s) const
 
CellCoord cell (const Point< Scalar, N > &p) const
 
Point< Scalar, N > cellLowerCorner (const CellCoord &c) const
 
BBoxType cellBox (const CellCoord &c) const
 
CellIterator cellBegin () const
 
CellIterator cellBegin (const CellCoord &first, const CellCoord &last) const
 
CellIterator cellEnd () const
 
CellView cells () const
 
CellView cells (const CellCoord &first, const CellCoord &last) const
 

Static Public Attributes

static const int DIM = N
 

Protected Member Functions

void set (const Box< Point< Scalar, N > > &box, const Point< uint, N > &size)
 

Private Attributes

BBoxType mBBox
 
Point< uint, N > mSize
 

Member Function Documentation

◆ cellLength()

template<typename Scalar , int N>
Scalar vcl::RegularGrid< Scalar, N >::cellLength ( uint  d) const
inline

Returns the length of a cell of the grid in the d-th dimension.

Parameters
d
Returns

◆ cellLengths()

template<typename Scalar , int N>
Point< Scalar, N > vcl::RegularGrid< Scalar, N >::cellLengths ( ) const
inline

Returns the lengths of a cell of the grid for each dimension.

Returns

◆ cellNumber()

template<typename Scalar , int N>
uint vcl::RegularGrid< Scalar, N >::cellNumber ( uint  d) const
inline

Returns the number of cells of the Grid in the d-th dimension.

Parameters
d
Returns

◆ cellNumbers()

template<typename Scalar , int N>
Point< uint, N > vcl::RegularGrid< Scalar, N >::cellNumbers ( ) const
inline

Returns the number of cells for each dimension of the grid.

Returns

◆ cellOfIndex()

template<typename Scalar , int N>
CellCoord vcl::RegularGrid< Scalar, N >::cellOfIndex ( uint  index) const
inline

Returns the cell coordinate associated to the given unique index.

Parameters
index
Returns

◆ indexOfCell()

template<typename Scalar , int N>
uint vcl::RegularGrid< Scalar, N >::indexOfCell ( const CellCoord c) const
inline

Return an unique index that can be associated to the given cell coordinate.

Parameters
c
Returns

◆ length()

template<typename Scalar , int N>
Scalar vcl::RegularGrid< Scalar, N >::length ( uint  d) const
inline

Returns the edge legth of the bounding box of the grid in the d-th dimension.

Returns

◆ lengths()

template<typename Scalar , int N>
Point< Scalar, N > vcl::RegularGrid< Scalar, N >::lengths ( ) const
inline

Returns the edge legths of the bounding box of the grid.

Returns

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