vigra - Point2D Class Reference

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

| Point2D Class Reference Ranges and Points |

Two dimensional point or position. More...

`#include <vigra/diff2d.hxx>`

Inheritance diagram for Point2D:

## Public Types
typedef Point2D | index_reference
typedef Point2D | PixelType
typedef Point2D const * | pointer
typedef Point2D const & | reference
typedef Point2D | value_type
Public Types inherited from Diff2D
typedef IteratorAdaptor < Diff2DConstColumnIteratorPolicy < Diff2D > > | column_iterator
typedef Diff2D | difference_type
typedef Diff2D | index_reference
typedef image_traverser_tag | iterator_category
typedef int | MoveX
typedef int | MoveY
typedef Diff2D | PixelType
typedef Diff2D const * | pointer
typedef Diff2D const & | reference
typedef IteratorAdaptor < Diff2DConstRowIteratorPolicy < Diff2D > > | row_iterator
typedef Diff2D | 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 ()
| Point2D (int x, int y)
| Point2D (Point2D const &v)
| Point2D (Diff2D const &v)
int | px () const
int | py () const
Public Member Functions inherited from Diff2D
column_iterator | columnIterator () const
| Diff2D ()
| Diff2D (int ax, int ay)
| Diff2D (Diff2D const &v)
double | magnitude () const
bool | operator!= (Diff2D const &r) const
index_reference | operator() (int const &dx, int const &dy) const
Diff2D | operator* (int factor) const
Diff2D | operator* (double factor) const
reference | operator* () const
Diff2D & | operator*= (int factor)
Diff2D & | operator*= (double factor)
Diff2D & | operator+= (Diff2D const &offset)
Diff2D | operator- () const
Diff2D & | operator-= (Diff2D const &offset)
pointer | operator-> () const
Diff2D | operator/ (int factor) const
Diff2D | operator/ (double factor) const
Diff2D & | operator/= (int factor)
Diff2D & | operator/= (double factor)
Diff2D & | operator= (Diff2D const &v)
bool | operator== (Diff2D const &r) const
index_reference | operator[] (Diff2D const &offset) const
int | operator[] (int index) const
row_iterator | rowIterator () const
int | squaredMagnitude () const

## Additional Inherited Members
Public Attributes inherited from Diff2D
int | x
int | y

## 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/diff2d.hxx>
Namespace: vigra

## Member Typedef Documentation

typedef Point2D PixelType

The iterator's value type: a coordinate.

typedef Point2D value_type

The iterator's value type: a coordinate.

typedef Point2D const& reference

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

typedef Point2D index_reference

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

typedef Point2D const* pointer

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

## 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

int px | ( |  | ) | const

Query the points' x coordinate

int py | ( |  | ) | const

Query the points' y coordinate

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

Copy Assigment.

Point2D operator- | ( |  | ) | const

Unary negation.

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

Increase point coordinates by specified offset.

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

Decrease point coordinates by specified offset.

reference operator* | ( |  | ) | const

Access current point coordinate.

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

Read point coordinate at an offset.

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

Read point coordinate at an offset.

pointer operator-> | ( |  | ) | const

Access current point 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.10.0 (Mon Nov 18 2013)