SPH
Public Member Functions | Public Attributes | Friends | List of all members
BasicPoint< T, TDerived > Struct Template Reference

#include <Point.h>

Public Member Functions

 BasicPoint ()=default
 
 BasicPoint (const T x, const T y)
 
T & operator[] (const Size index)
 
const T & operator[] (const Size index) const
 
TDerived & operator+= (const TDerived &other)
 
TDerived & operator-= (const TDerived &other)
 
TDerived & operator*= (const float factor)
 
TDerived & operator/= (const float factor)
 
TDerived operator+ (const TDerived &other) const
 
TDerived operator- (const TDerived &other) const
 
TDerived operator* (const float factor) const
 
TDerived operator/ (const float factor) const
 
bool operator== (const TDerived &other) const
 
bool operator!= (const TDerived &other) const
 

Public Attributes

x
 
y
 

Friends

std::ostream & operator<< (std::ostream &stream, const BasicPoint &p)
 
std::istream & operator>> (std::istream &stream, BasicPoint &p)
 

Detailed Description

template<typename T, typename TDerived>
struct BasicPoint< T, TDerived >

Definition at line 15 of file Point.h.

Constructor & Destructor Documentation

◆ BasicPoint() [1/2]

template<typename T , typename TDerived >
BasicPoint< T, TDerived >::BasicPoint ( )
default

◆ BasicPoint() [2/2]

template<typename T , typename TDerived >
BasicPoint< T, TDerived >::BasicPoint ( const T  x,
const T  y 
)
inline

Definition at line 20 of file Point.h.

Member Function Documentation

◆ operator!=()

template<typename T , typename TDerived >
bool BasicPoint< T, TDerived >::operator!= ( const TDerived &  other) const
inline

Definition at line 86 of file Point.h.

◆ operator*()

template<typename T , typename TDerived >
TDerived BasicPoint< T, TDerived >::operator* ( const float  factor) const
inline

Definition at line 70 of file Point.h.

◆ operator*=()

template<typename T , typename TDerived >
TDerived& BasicPoint< T, TDerived >::operator*= ( const float  factor)
inline

Definition at line 46 of file Point.h.

◆ operator+()

template<typename T , typename TDerived >
TDerived BasicPoint< T, TDerived >::operator+ ( const TDerived &  other) const
inline

Definition at line 58 of file Point.h.

◆ operator+=()

template<typename T , typename TDerived >
TDerived& BasicPoint< T, TDerived >::operator+= ( const TDerived &  other)
inline

Definition at line 34 of file Point.h.

◆ operator-()

template<typename T , typename TDerived >
TDerived BasicPoint< T, TDerived >::operator- ( const TDerived &  other) const
inline

Definition at line 64 of file Point.h.

◆ operator-=()

template<typename T , typename TDerived >
TDerived& BasicPoint< T, TDerived >::operator-= ( const TDerived &  other)
inline

Definition at line 40 of file Point.h.

◆ operator/()

template<typename T , typename TDerived >
TDerived BasicPoint< T, TDerived >::operator/ ( const float  factor) const
inline

Definition at line 76 of file Point.h.

◆ operator/=()

template<typename T , typename TDerived >
TDerived& BasicPoint< T, TDerived >::operator/= ( const float  factor)
inline

Definition at line 52 of file Point.h.

◆ operator==()

template<typename T , typename TDerived >
bool BasicPoint< T, TDerived >::operator== ( const TDerived &  other) const
inline

Definition at line 82 of file Point.h.

◆ operator[]() [1/2]

template<typename T , typename TDerived >
T& BasicPoint< T, TDerived >::operator[] ( const Size  index)
inline

Definition at line 24 of file Point.h.

◆ operator[]() [2/2]

template<typename T , typename TDerived >
const T& BasicPoint< T, TDerived >::operator[] ( const Size  index) const
inline

Definition at line 29 of file Point.h.

Friends And Related Function Documentation

◆ operator<<

template<typename T , typename TDerived >
std::ostream& operator<< ( std::ostream &  stream,
const BasicPoint< T, TDerived > &  p 
)
friend

Definition at line 90 of file Point.h.

◆ operator>>

template<typename T , typename TDerived >
std::istream& operator>> ( std::istream &  stream,
BasicPoint< T, TDerived > &  p 
)
friend

Definition at line 95 of file Point.h.

Member Data Documentation

◆ x

template<typename T , typename TDerived >
T BasicPoint< T, TDerived >::x

Definition at line 16 of file Point.h.

◆ y

template<typename T , typename TDerived >
T BasicPoint< T, TDerived >::y

Definition at line 16 of file Point.h.


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