# mln::Point< P > Struct Template Reference

Base class for implementation of point classes. More...

`#include <point.hh>`

Inheritance diagram for mln::Point< P >:

List of all members.

## Public Types

typedef P point
The associated point type is itself.

## Public Member Functions

const P & to_point () const
It is a Point so it returns itself.

## Related Functions

(Note that these are not member functions.)

template<typename P , typename D >
P & operator+= (Point< P > &p, const Dpoint< D > &dp)
Shift a point `by` a delta-point `dp`.
template<typename P , typename D >
P & operator-= (Point< P > &p, const Dpoint< D > &dp)
Shift a point `by` the negate of a delta-point `dp`.
template<typename P , typename D >
P & operator/ (Point< P > &p, const value::Scalar< D > &dp)
Divise a point `by` a scalar `s`.

## Detailed Description

### template<typename P> struct mln::Point< P >

Base class for implementation of point classes.

A point is an element of a space.

For instance, mln::point2d is the type of elements defined on the discrete square grid of the 2D plane.

## Member Typedef Documentation

template<typename P >
 typedef P mln::Point< P >::point

The associated point type is itself.

## Member Function Documentation

template<typename P >
 const P & mln::Point< P >::to_point ( ) const` [inline]`

It is a Point so it returns itself.

## Friends And Related Function Documentation

template<typename P , typename D >
 P & operator+= ( Point< P > & p, const Dpoint< D > & dp ) ` [related]`

Shift a point `by` a delta-point `dp`.

Parameters:
 [in,out] p The targeted point. [in] dp A delta-point.
Returns:
A reference to the point `p` once translated by `dp`.
Precondition:
The type of `dp` has to be compatible with the type of `p`.

template<typename P , typename D >
 P & operator-= ( Point< P > & p, const Dpoint< D > & dp ) ` [related]`

Shift a point `by` the negate of a delta-point `dp`.

Parameters:
 [in,out] p The targeted point. [in] dp A delta-point.
Returns:
A reference to the point `p` once translated by - `dp`.
Precondition:
The type of `dp` has to be compatible with the type of `p`.

template<typename P , typename D >
 P & operator/ ( Point< P > & p, const value::Scalar< D > & dp ) ` [related]`

Divise a point `by` a scalar `s`.

Parameters:
 [in,out] p The targeted point. [in] dp A scalar.
Returns:
A reference to the point `p` once divised by `s`.

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