[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]

details Point2D Class Reference VIGRA

Two dimensional point or position. More...

#include "vigra/diff2d.hxx"

Inheritance diagram for Point2D:

Diff2D List of all members.

Public Types

typedef Point2D PixelType
typedef Point2D value_type
typedef Point2D const & reference
typedef Point2D index_reference
typedef Point2D const * pointer

Public Methods

 Point2D ()
 Point2D (int x, int y)
 Point2D (Point2D const &v)
 Point2D (Diff2D const &v)
int px () const
int py () const
Point2D & operator= (Diff2D const &v)
Point2D operator- () const
Point2D & operator+= (Diff2D const &offset)
Point2D & operator-= (Diff2D const &offset)
reference operator * () const
index_reference operator() (int const &dx, int const &dy) const
index_reference operator[] (Diff2D const &offset) const
pointer operator-> () const


Detailed Description


Two dimensional point or position.

Specializes Diff2D for the specification of a 2-dimensional point or position, in contrast to an extent (for the latter use Size2D).

    // access an image at a point
    value = image[Point2D(10, 20)];

#include "vigra/utilities.hxx"
Namespace: vigra


Member Typedef Documentation


typedef Point2D index_reference

 

the iterator's index reference type (return type of iter[diff])

Reimplemented from Diff2D.


typedef Point2D PixelType

 

The iterator's value type: a coordinate.

Reimplemented from Diff2D.


typedef Point2D const* pointer

 

the iterator's pointer type (return type of iter.operator->())

Reimplemented from Diff2D.


typedef Point2D const& reference

 

the iterator's reference type (return type of *iter)

Reimplemented from Diff2D.


typedef Point2D value_type

 

The iterator's value type: a coordinate.

Reimplemented from Diff2D.


Constructor & Destructor Documentation


Point2D   [inline]

 

Default Constructor. Init point at position (0,0)


Point2D int    x,
int    y
[inline]

 

Construct point at given position.


Point2D Point2D const &    v [inline]

 

Copy Constructor.


Point2D Diff2D const &    v [inline, explicit]

 

Explicit conversion Constructor.


Member Function Documentation


reference operator *   const [inline]

 

Access current point coordinate.

Reimplemented from Diff2D.


index_reference operator() int const &    dx,
int const &    dy
const [inline]

 

Read point coordinate at an offset.

Reimplemented from Diff2D.


Point2D& operator+= Diff2D const &    offset [inline]

 

Increase point coordinates by specified offset.

Reimplemented from Diff2D.


Point2D operator-   const [inline]

 

Unary negation.

Reimplemented from Diff2D.


Point2D& operator-= Diff2D const &    offset [inline]

 

Decrease point coordinates by specified offset.

Reimplemented from Diff2D.


pointer operator->   const [inline]

 

Access current point coordinate.

Reimplemented from Diff2D.


Point2D& operator= Diff2D const &    v [inline]

 

Copy Assigment.

Reimplemented from Diff2D.


index_reference operator[] Diff2D const &    offset const [inline]

 

Read point coordinate at an offset.

Reimplemented from Diff2D.


int px   const [inline]

 

Query the points' x coordinate


int py   const [inline]

 

Query the points' y coordinate


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

© Ullrich Köthe (koethe@informatik.uni-hamburg.de)
Cognitive Systems Group, University of Hamburg, Germany

html generated using doxygen and Python
VIGRA 1.4.0 (21 Dec 2005)