Template Class Point2DWithIndex

Class Documentation

template<class T>
class Point2DWithIndex

Points in any dimension of templated type.

Public Functions

inline Point2DWithIndex()
inline Point2DWithIndex(T x, T y)
inline Point2DWithIndex(T x, T y, index indice)
inline count getDimensions()
T distance(const Point2DWithIndex<T> &p) const
T squaredDistance(const Point2DWithIndex<T> &p) const
Point2DWithIndex &operator+=(const Point2DWithIndex<T> &p)
Point2DWithIndex &operator-=(const Point2DWithIndex<T> &p)
Point2DWithIndex &scale(T factor)
Point2DWithIndex operator-(const Point2DWithIndex<T> &other)
Point2DWithIndex operator+(const Point2DWithIndex<T> &other)
T length() const
T squaredLength() const
inline T &operator[](index i)
inline T getX() const
inline T getY() const
inline index getIndex() const