MIRA
Public Member Functions | Protected Member Functions | Friends | List of all members
DistanceLUT::Region Class Reference

Provides a view on a portion of the Distance LUT and can be obtained by calling DistanceLUT::getRegion(). More...

#include <geometry/DistanceLUT.h>

Public Member Functions

const Rect2igetRect () const
 Returns a Rect containing the boundaries of this region. More...
 
int getXmin () const
 Returns the minimum x-boundary. More...
 
int getXmax () const
 Returns the maximum x-boundary. More...
 
int getYmin () const
 Returns the minimum y-boundary. More...
 
int getYmax () const
 Returns the maximum y-boundary. More...
 
int getWidth () const
 Returns the region's width. More...
 
int getHeight () const
 Returns the region's height. More...
 
iterator getIterator (int x, int y) const
 Returns an iterator to the given cell. More...
 
iterator begin (int y) const
 Returns line iterator starting in the specified line. More...
 
iterator end (int y) const
 Returns end iterator for the specified line. More...
 

Protected Member Functions

 Region (CellDistArrayPtr array, CellDist *data, int stride, const Rect2i &region)
 The constructor of the region. More...
 

Friends

class DistanceLUT
 

Detailed Description

Provides a view on a portion of the Distance LUT and can be obtained by calling DistanceLUT::getRegion().

The region can be traversed using an iterator that provides access to each cell within the region. Finally, each cell stores the distance to a given central point, that was specified in the call to DistanceLUT::getRegion().

Constructor & Destructor Documentation

◆ Region()

Region ( CellDistArrayPtr  array,
CellDist data,
int  stride,
const Rect2i region 
)
inlineprotected

The constructor of the region.

Parameters
[in]datathe iterator of the LUT
[in]stridethe length of one LUT line
[in]regionthe region boundaries in cells

Member Function Documentation

◆ getRect()

const Rect2i& getRect ( ) const
inline

Returns a Rect containing the boundaries of this region.

◆ getXmin()

int getXmin ( ) const
inline

Returns the minimum x-boundary.

◆ getXmax()

int getXmax ( ) const
inline

Returns the maximum x-boundary.

◆ getYmin()

int getYmin ( ) const
inline

Returns the minimum y-boundary.

◆ getYmax()

int getYmax ( ) const
inline

Returns the maximum y-boundary.

◆ getWidth()

int getWidth ( ) const
inline

Returns the region's width.

◆ getHeight()

int getHeight ( ) const
inline

Returns the region's height.

◆ getIterator()

iterator getIterator ( int  x,
int  y 
) const
inline

Returns an iterator to the given cell.

Parameters
[in]xthe x coordinate of the region point
[in]ythe y coordinate of the region point

◆ begin()

iterator begin ( int  y) const
inline

Returns line iterator starting in the specified line.

Parameters
[in]ythe number of the specified line

◆ end()

iterator end ( int  y) const
inline

Returns end iterator for the specified line.

Parameters
[in]ythe number of the specified line

Friends And Related Function Documentation

◆ DistanceLUT

friend class DistanceLUT
friend

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