libAlgAudio  v1.99-440-g08538e5-dirty
The development library for AlgAudio framework.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AlgAudio::Point2D_< T > Struct Template Reference

#include <Utilities.hpp>

Public Member Functions

bool IsInside (Point2D_< T > r, Size2D s) const
 
bool IsInside (const Rect &r) const
 
bool operator!= (const Point2D_< T > &other) const
 
Point2D_< T > operator* (const T &t) const
 
Point2D_< T > operator+ (const Point2D_< T > &other) const
 
Point2D_< T > operator+ (const Size2D &other) const
 
Point2D_< T > & operator+= (const Point2D_< T > &other)
 
Point2D_< T > operator- (const Point2D_< T > &other) const
 
Point2D_< T > operator- () const
 
Point2D_< T > operator- (const Size2D &other) const
 
Point2D_< T > & operator-= (const Point2D_< T > &other)
 
Point2D_< T > operator/ (const T &t) const
 
bool operator== (const Point2D_< T > &other) const
 
 Point2D_ (T x_=0, T y_=0)
 
template<typename Q >
 Point2D_ (const Point2D_< Q > &other)
 
std::string ToString () const
 

Static Public Member Functions

static float Distance (Point2D_< T > a, Point2D_< T > b)
 

Public Attributes

x
 
y
 

Detailed Description

template<typename T>
struct AlgAudio::Point2D_< T >

A structure for representing points on a two-dimentional plane.

Constructor & Destructor Documentation

template<typename T>
AlgAudio::Point2D_< T >::Point2D_ ( x_ = 0,
y_ = 0 
)
inline
template<typename T>
template<typename Q >
AlgAudio::Point2D_< T >::Point2D_ ( const Point2D_< Q > &  other)
inline

Member Function Documentation

template<typename T>
static float AlgAudio::Point2D_< T >::Distance ( Point2D_< T >  a,
Point2D_< T >  b 
)
inlinestatic

Calculates the Pythagorean distance between two points.

template<typename T>
bool AlgAudio::Point2D_< T >::IsInside ( Point2D_< T >  r,
Size2D  s 
) const
inline

Returns true iff the point is within the rectangle spanned by the given point and size.

template<typename T>
bool AlgAudio::Point2D_< T >::IsInside ( const Rect r) const

Returns true iff the point is within the rectangle.

template<typename T>
bool AlgAudio::Point2D_< T >::operator!= ( const Point2D_< T > &  other) const
inline
template<typename T>
Point2D_<T> AlgAudio::Point2D_< T >::operator* ( const T &  t) const
inline
template<typename T>
Point2D_<T> AlgAudio::Point2D_< T >::operator+ ( const Point2D_< T > &  other) const
inline
template<typename T>
Point2D_<T> AlgAudio::Point2D_< T >::operator+ ( const Size2D other) const
inline
template<typename T>
Point2D_<T>& AlgAudio::Point2D_< T >::operator+= ( const Point2D_< T > &  other)
inline
template<typename T>
Point2D_<T> AlgAudio::Point2D_< T >::operator- ( const Point2D_< T > &  other) const
inline
template<typename T>
Point2D_<T> AlgAudio::Point2D_< T >::operator- ( ) const
inline
template<typename T>
Point2D_<T> AlgAudio::Point2D_< T >::operator- ( const Size2D other) const
inline
template<typename T>
Point2D_<T>& AlgAudio::Point2D_< T >::operator-= ( const Point2D_< T > &  other)
inline
template<typename T>
Point2D_<T> AlgAudio::Point2D_< T >::operator/ ( const T &  t) const
inline
template<typename T>
bool AlgAudio::Point2D_< T >::operator== ( const Point2D_< T > &  other) const
inline
template<typename T>
std::string AlgAudio::Point2D_< T >::ToString ( ) const
inline

Member Data Documentation

template<typename T>
T AlgAudio::Point2D_< T >::x
template<typename T>
T AlgAudio::Point2D_< T >::y

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