Dusk Audio Framework
Loading...
Searching...
No Matches
Point< T > Class Template Reference

#include <Geometry.hpp>

Public Member Functions

 Point () noexcept
 Point (const T &x, const T &y) noexcept
 Point (const Point< T > &pos) noexcept
const T & getX () const noexcept
const T & getY () const noexcept
void setX (const T &x) noexcept
void setY (const T &y) noexcept
void setPos (const T &x, const T &y) noexcept
void setPos (const Point< T > &pos) noexcept
void moveBy (const T &x, const T &y) noexcept
void moveBy (const Point< T > &pos) noexcept
bool isZero () const noexcept
bool isNotZero () const noexcept
Point< T > operator+ (const Point< T > &pos) noexcept
Point< T > operator- (const Point< T > &pos) noexcept
Point< T > & operator= (const Point< T > &pos) noexcept
Point< T > & operator+= (const Point< T > &pos) noexcept
Point< T > & operator-= (const Point< T > &pos) noexcept
bool operator== (const Point< T > &pos) const noexcept
bool operator!= (const Point< T > &pos) const noexcept

Friends

template<typename>
class Line
template<typename>
class Circle
template<typename>
class Triangle
template<typename>
class Rectangle

Detailed Description

template<typename T>
class Point< T >

DGL Point class.

This class describes a single point in space, defined by an X and Y value.

Constructor & Destructor Documentation

◆ Point() [1/3]

template<typename T>
Point< T >::Point ( )
noexcept

Constructor for (0, 0) point.

◆ Point() [2/3]

template<typename T>
Point< T >::Point ( const T & x,
const T & y )
noexcept

Constructor using custom X and Y values.

◆ Point() [3/3]

template<typename T>
Point< T >::Point ( const Point< T > & pos)
noexcept

Constructor using another Point class values.

Member Function Documentation

◆ getX()

template<typename T>
const T & Point< T >::getX ( ) const
noexcept

Get X value.

◆ getY()

template<typename T>
const T & Point< T >::getY ( ) const
noexcept

Get Y value.

◆ setX()

template<typename T>
void Point< T >::setX ( const T & x)
noexcept

Set X value to x.

◆ setY()

template<typename T>
void Point< T >::setY ( const T & y)
noexcept

Set Y value to y.

◆ setPos() [1/2]

template<typename T>
void Point< T >::setPos ( const T & x,
const T & y )
noexcept

Set X and Y values to x and y respectively.

◆ setPos() [2/2]

template<typename T>
void Point< T >::setPos ( const Point< T > & pos)
noexcept

Set X and Y values according to pos.

◆ moveBy() [1/2]

template<typename T>
void Point< T >::moveBy ( const T & x,
const T & y )
noexcept

Move this point by x and y values.

◆ moveBy() [2/2]

template<typename T>
void Point< T >::moveBy ( const Point< T > & pos)
noexcept

Move this point by pos.

◆ isZero()

template<typename T>
bool Point< T >::isZero ( ) const
noexcept

Return true if point is (0, 0).

◆ isNotZero()

template<typename T>
bool Point< T >::isNotZero ( ) const
noexcept

Return true if point is not (0, 0).


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