Tactics: Western Philosophers Vs. Musicians  0.12
A turn-based tactical game combining rules and gameplay elements inspired by Final Fantasy Tactics and the Mayfair Exponential Game System. Unlike most games of this type, motion is in full, grid-less 3D.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
OpenSkyNet::Math::Point< T, U > Class Template Reference

#include <MPoint.h>

Public Member Functions

 Point (const T &x_=0, const T &y_=0, const T &z_=0)
 
 Point (const Point< T > &p_)
 
Accessors
unsigned char getNumDimensions () const
 
T & x ()
 
T & y ()
 
T & z ()
 
T & r ()
 
T & g ()
 
T & b ()
 
T & a ()
 
T & operator[] (int i_)
 
const T & x () const
 
const T & y () const
 
const T & z () const
 
const T & r () const
 
const T & g () const
 
const T & b () const
 
const T & a () const
 
const T & operator[] (int i_) const
 
Unary Operations
Point< T > operator- () const
 
Point< T > getAbs () const
 
getComponentSum () const
 
getMax () const
 
getMin () const
 
getLenSqrd () const
 
getLength () const
 
void normalize ()
 
Binary Operators
bool equals (const Point< T > &rhs_, T radiusSqrd_) const
 
Point< T, U > & operator= (const Point< T, U > &rhs_)
 
Point< T > & operator+= (const Point< T > &rhs_)
 
Point< T > & operator+= (const T &rhs_)
 
Point< T > & operator-= (const Point< T > &rhs_)
 
Point< T > & operator-= (const T &rhs_)
 
Point< T > & operator*= (const T &rhs_)
 
Point< T > getCross3 (const Point< T > &rhs_) const
 
getDot3 (const Point< T > &rhs_) const
 
Point< T > getReflection3 (const Point< T > &n_) const
 

Public Attributes

_dimensions [U]
 

Detailed Description

template<class T = float, unsigned char U = 3>
class OpenSkyNet::Math::Point< T, U >

A templated, multi-dimensional point class.

Constructor & Destructor Documentation

template<class T = float, unsigned char U = 3>
OpenSkyNet::Math::Point< T, U >::Point ( const T &  x_ = 0,
const T &  y_ = 0,
const T &  z_ = 0 
)
inline
template<class T = float, unsigned char U = 3>
OpenSkyNet::Math::Point< T, U >::Point ( const Point< T > &  p_)
inline

Member Function Documentation

template<class T = float, unsigned char U = 3>
T& OpenSkyNet::Math::Point< T, U >::a ( )
inline
template<class T = float, unsigned char U = 3>
const T& OpenSkyNet::Math::Point< T, U >::a ( ) const
inline
template<class T = float, unsigned char U = 3>
T& OpenSkyNet::Math::Point< T, U >::b ( )
inline
template<class T = float, unsigned char U = 3>
const T& OpenSkyNet::Math::Point< T, U >::b ( ) const
inline
template<class T = float, unsigned char U = 3>
bool OpenSkyNet::Math::Point< T, U >::equals ( const Point< T > &  rhs_,
radiusSqrd_ 
) const
inline

Equality test within an epsilon value.

template<class T = float, unsigned char U = 3>
T& OpenSkyNet::Math::Point< T, U >::g ( )
inline
template<class T = float, unsigned char U = 3>
const T& OpenSkyNet::Math::Point< T, U >::g ( ) const
inline
template<class T = float, unsigned char U = 3>
Point<T> OpenSkyNet::Math::Point< T, U >::getAbs ( ) const
inline

Absolute values of components

template<class T = float, unsigned char U = 3>
T OpenSkyNet::Math::Point< T, U >::getComponentSum ( ) const
inline

Summation of components

template<class T = float, unsigned char U = 3>
Point<T> OpenSkyNet::Math::Point< T, U >::getCross3 ( const Point< T > &  rhs_) const
inline

3D Cross Product

template<class T = float, unsigned char U = 3>
T OpenSkyNet::Math::Point< T, U >::getDot3 ( const Point< T > &  rhs_) const
inline

3D Dot Product

template<class T = float, unsigned char U = 3>
T OpenSkyNet::Math::Point< T, U >::getLength ( ) const
inline

Length

template<class T = float, unsigned char U = 3>
T OpenSkyNet::Math::Point< T, U >::getLenSqrd ( ) const
inline

Length Squared

template<class T = float, unsigned char U = 3>
T OpenSkyNet::Math::Point< T, U >::getMax ( ) const
inline

Maximum of components

template<class T = float, unsigned char U = 3>
T OpenSkyNet::Math::Point< T, U >::getMin ( ) const
inline

Minimum of components

template<class T = float, unsigned char U = 3>
unsigned char OpenSkyNet::Math::Point< T, U >::getNumDimensions ( ) const
inline
template<class T = float, unsigned char U = 3>
Point<T> OpenSkyNet::Math::Point< T, U >::getReflection3 ( const Point< T > &  n_) const
inline

3D Reflection

template<class T = float, unsigned char U = 3>
void OpenSkyNet::Math::Point< T, U >::normalize ( )
inline

Normalization

template<class T = float, unsigned char U = 3>
Point<T>& OpenSkyNet::Math::Point< T, U >::operator*= ( const T &  rhs_)
inline

Multiplication of all axes by a scalar, then assignment

template<class T = float, unsigned char U = 3>
Point<T>& OpenSkyNet::Math::Point< T, U >::operator+= ( const Point< T > &  rhs_)
inline

Addition, then assignment

template<class T = float, unsigned char U = 3>
Point<T>& OpenSkyNet::Math::Point< T, U >::operator+= ( const T &  rhs_)
inline

Addition of all axes by a scalar, then assignment

template<class T = float, unsigned char U = 3>
Point<T> OpenSkyNet::Math::Point< T, U >::operator- ( ) const
inline

Negation

template<class T = float, unsigned char U = 3>
Point<T>& OpenSkyNet::Math::Point< T, U >::operator-= ( const Point< T > &  rhs_)
inline

Subtraction, then assignment

template<class T = float, unsigned char U = 3>
Point<T>& OpenSkyNet::Math::Point< T, U >::operator-= ( const T &  rhs_)
inline

Subtraction of all axes by a scalar, then assignment

template<class T = float, unsigned char U = 3>
Point<T,U>& OpenSkyNet::Math::Point< T, U >::operator= ( const Point< T, U > &  rhs_)
inline

Assignment

template<class T = float, unsigned char U = 3>
T& OpenSkyNet::Math::Point< T, U >::operator[] ( int  i_)
inline
template<class T = float, unsigned char U = 3>
const T& OpenSkyNet::Math::Point< T, U >::operator[] ( int  i_) const
inline
template<class T = float, unsigned char U = 3>
T& OpenSkyNet::Math::Point< T, U >::r ( )
inline
template<class T = float, unsigned char U = 3>
const T& OpenSkyNet::Math::Point< T, U >::r ( ) const
inline
template<class T = float, unsigned char U = 3>
T& OpenSkyNet::Math::Point< T, U >::x ( )
inline
template<class T = float, unsigned char U = 3>
const T& OpenSkyNet::Math::Point< T, U >::x ( ) const
inline
template<class T = float, unsigned char U = 3>
T& OpenSkyNet::Math::Point< T, U >::y ( )
inline
template<class T = float, unsigned char U = 3>
const T& OpenSkyNet::Math::Point< T, U >::y ( ) const
inline
template<class T = float, unsigned char U = 3>
T& OpenSkyNet::Math::Point< T, U >::z ( )
inline
template<class T = float, unsigned char U = 3>
const T& OpenSkyNet::Math::Point< T, U >::z ( ) const
inline

Member Data Documentation

template<class T = float, unsigned char U = 3>
T OpenSkyNet::Math::Point< T, U >::_dimensions[U]

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