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

Point2D Class Reference

Two dimensional point or position. More...

#include <vigra/diff2d.hxx>

Inheritance diagram for Point2D:
Diff2D

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
Point2Doperator+= (Diff2D const &offset)
Point2D operator- () const
Point2Doperator-= (Diff2D const &offset)
pointer operator-> () const
Point2Doperator= (Diff2D const &v)
index_reference operator[] (Diff2D const &offset) const
 Point2D ()=default
 Point2D (Diff2D const &v)
 Point2D (int x, int y)
int px () const
int py () const
Public Member Functions inherited from Diff2D
column_iterator columnIterator () const
 Diff2D ()
 Diff2D (Diff2D const &v)
 Diff2D (int ax, int ay)
double magnitude () const
bool operator!= (Diff2D const &r) const
index_reference operator() (int const &dx, int const &dy) const
reference operator* () const
Diff2D operator* (double factor) const
Diff2D operator* (int factor) const
Diff2Doperator*= (double factor)
Diff2Doperator*= (int factor)
Diff2Doperator+= (Diff2D const &offset)
Diff2D operator- () const
Diff2Doperator-= (Diff2D const &offset)
pointer operator-> () const
Diff2D operator/ (double factor) const
Diff2D operator/ (int factor) const
Diff2Doperator/= (double factor)
Diff2Doperator/= (int factor)
Diff2Doperator= (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)];
Point2D()=default

#include <vigra/diff2d.hxx>
Namespace: vigra

Member Typedef Documentation

◆ PixelType

typedef Point2D PixelType

The iterator's value type: a coordinate.

◆ value_type

The iterator's value type: a coordinate.

◆ reference

typedef Point2D const& reference

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

◆ index_reference

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

◆ pointer

typedef Point2D const* pointer

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

Constructor & Destructor Documentation

◆ Point2D() [1/3]

Point2D ( )
default

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

◆ Point2D() [2/3]

Point2D ( int x,
int y )

Construct point at given position.

◆ Point2D() [3/3]

Point2D ( Diff2D const & v)
explicit

Explicit conversion Constructor.

Member Function Documentation

◆ px()

int px ( ) const

Query the points' x coordinate

◆ py()

int py ( ) const

Query the points' y coordinate

◆ operator=()

Point2D & operator= ( Diff2D const & v)

Copy Assigment.

◆ operator-()

Point2D operator- ( ) const

Unary negation.

◆ operator+=()

Point2D & operator+= ( Diff2D const & offset)

Increase point coordinates by specified offset.

◆ operator-=()

Point2D & operator-= ( Diff2D const & offset)

Decrease point coordinates by specified offset.

◆ operator*()

reference operator* ( ) const

Access current point coordinate.

◆ operator()()

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

Read point coordinate at an offset.

◆ operator[]()

index_reference operator[] ( Diff2D const & offset) const

Read point coordinate at an offset.

◆ operator->()

pointer operator-> ( ) const

Access current point coordinate.


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

© 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.12.3 ()