mln::win::rectangle2d Struct Reference
[2D windows]

Rectangular window defined on the 2D square grid. More...

#include <rectangle2d.hh>

Inherits classical_window_base< dpoint2d, rectangle2d >.

List of all members.

Public Member Functions

unsigned area () const
 Give the rectangle area.
unsigned height () const
 Give the rectangle height.
 rectangle2d (unsigned height, unsigned width)
 Constructor.
const std::vector< dpoint2d > & std_vector () const
 Give the std vector of delta-points.
unsigned width () const
 Give the rectangle width.


Detailed Description

Rectangular window defined on the 2D square grid.

A rectangle2d is a 2D window with rectangular shape. It is centered and symmetric.

For instance:

     *  o o o o o
     *  o o x o o
     *  o o o o o
     * 
is defined with height = 3 and width = 5.

Constructor & Destructor Documentation

mln::win::rectangle2d::rectangle2d ( unsigned  height,
unsigned  width 
) [inline]

Constructor.

Parameters:
[in] height Height of the rectangle2d.
[in] width Width of the rectangle2d.
Precondition:
Height and width are odd.


Member Function Documentation

unsigned mln::win::rectangle2d::area (  )  const [inline]

Give the rectangle area.

unsigned mln::win::rectangle2d::height (  )  const [inline]

Give the rectangle height.

const std::vector< dpoint2d > & mln::win::rectangle2d::std_vector (  )  const [inline]

Give the std vector of delta-points.

unsigned mln::win::rectangle2d::width (  )  const [inline]

Give the rectangle width.


Generated on Tue Jul 14 16:33:22 2009 for Milena (Olena) by  doxygen 1.5.9