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

| Point2D [Two-dimensional Ranges and Points] |

Two dimensional point or position. More...

`#include <vigra/diff2d.hxx>`

Inheritance diagram for Point2D:

List of all members.

## Public Types
typedef Point2D | index_reference
typedef Point2D | PixelType
typedef Point2D const * | pointer
typedef Point2D const & | reference
typedef Point2D | value_type
## Public Member Functions
index_reference | operator() (int const &dx, int const &dy) const
reference | operator* () const
Point2D & | operator+= (Diff2D const &offset)
Point2D | operator- () const
Point2D & | operator-= (Diff2D const &offset)
pointer | operator-> () const
Point2D & | operator= (Diff2D const &v)
index_reference | operator[] (Diff2D const &offset) const
| Point2D (Diff2D const &v)
| Point2D (Point2D const &v)
| Point2D (int x, int y)
| Point2D ()
int | px () const
int | py () 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 | ( |  | ) |

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

Point2D | ( | int | x,
|  | int | y |
| ) |  |  |

Construct point at given position.

Point2D | ( | Point2D const & | v | ) |

Copy Constructor.

Point2D | ( | Diff2D const & | v | ) | `[explicit]`

Explicit conversion Constructor.

## Member Function Documentation

index_reference operator() | ( | int const & | dx,
|  | int const & | dy |
| ) |  |  | const

Read point coordinate at an offset.

Reimplemented from Diff2D.

reference operator* | ( |  | ) | const

Access current point coordinate.

Reimplemented from Diff2D.

Point2D& operator+= | ( | Diff2D const & | offset | ) |

Increase point coordinates by specified offset.

Reimplemented from Diff2D.

Point2D operator- | ( |  | ) | const

Unary negation.

Reimplemented from Diff2D.

Point2D& operator-= | ( | Diff2D const & | offset | ) |

Decrease point coordinates by specified offset.

Reimplemented from Diff2D.

pointer operator-> | ( |  | ) | const

Access current point coordinate.

Reimplemented from Diff2D.

Point2D& operator= | ( | Diff2D const & | v | ) |

Copy Assigment.

Reimplemented from Diff2D.

index_reference operator[] | ( | Diff2D const & | offset | ) | const

Read point coordinate at an offset.

Reimplemented from Diff2D.

int px | ( |  | ) | const

Query the points' x coordinate

int py | ( |  | ) | const

Query the points' y coordinate

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

- vigra/diff2d.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python VIGRA 1.6.0 (13 Aug 2008)