DubiousEngine  0.2.0
Simple Game Engine
Dubious::Math::PointT< T > Class Template Reference

A 3D Point. More...

#include <Point.h>

Public Member Functions

 PointT ()=default
 Default Constructor. More...
 
 PointT (float x, float y, float z)
 Constructor. More...
 
float x () const
 X accessor. More...
 
float y () const
 Y accessor. More...
 
float z () const
 Z accessor. More...
 

Friends

bool operator== (const PointT< T > &a, const PointT< T > &b)
 
bool operator!= (const PointT< T > &a, const PointT< T > &b)
 
std::ostream & operator<< (std::ostream &o, const PointT< T > &a)
 

Detailed Description

template<int T>
class Dubious::Math::PointT< T >

A 3D Point.

Represents a 3D point. This is different from a Vector in that it is not a direction, it is simply a point in space. It is a template only so that we can create Points intended for different uses that the compiler can enforce

Constructor & Destructor Documentation

template<int T>
Dubious::Math::PointT< T >::PointT ( )
default

Default Constructor.

Creates a Point at 0,0,0

template<int T>
Dubious::Math::PointT< T >::PointT ( float  x,
float  y,
float  z 
)
inline

Constructor.

Creates the point at the coordinate specified

Parameters
x- [in] X component
y- [in] Y component
z- [in] Z component

Member Function Documentation

template<int T>
float Dubious::Math::PointT< T >::x ( ) const
inline

X accessor.

Returns
X coordinate
template<int T>
float Dubious::Math::PointT< T >::y ( ) const
inline

Y accessor.

Returns
Y coordinate
template<int T>
float Dubious::Math::PointT< T >::z ( ) const
inline

Z accessor.

Returns
Z coordinate

Friends And Related Function Documentation

template<int T>
bool operator!= ( const PointT< T > &  a,
const PointT< T > &  b 
)
friend
template<int T>
std::ostream& operator<< ( std::ostream &  o,
const PointT< T > &  a 
)
friend
template<int T>
bool operator== ( const PointT< T > &  a,
const PointT< T > &  b 
)
friend

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