DubiousEngine  0.2.0
Simple Game Engine
Dubious::Math::Triple Struct Reference

Three floats. More...

#include <Triple.h>

Public Member Functions

 Triple ()=default
 Default Constructor. More...
 
 Triple (float x, float y, float z)
 Constructor. More...
 
Triple operator- () const
 
Tripleoperator+= (const Triple &b)
 
Tripleoperator-= (const Triple &b)
 

Public Attributes

float m_x = 0
 
float m_y = 0
 
float m_z = 0
 

Detailed Description

Three floats.

There are a fair number of Vector and 3D point types in a physics engine. They all need a basic, underlying type of 3 floats. This triple is meant to handle the really basic stuff, like addition, copying, and equality. I'm making the data public because it's not a real class, but a collection of helper functions wrapper around three floats

Constructor & Destructor Documentation

Dubious::Math::Triple::Triple ( )
default

Default Constructor.

Initializes a Triple to 0,0,0

Dubious::Math::Triple::Triple ( float  x,
float  y,
float  z 
)
inline

Constructor.

Creates a triple with the passed in values

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

Member Function Documentation

Triple& Dubious::Math::Triple::operator+= ( const Triple b)
inline
Triple Dubious::Math::Triple::operator- ( ) const
inline
Triple& Dubious::Math::Triple::operator-= ( const Triple b)
inline

Member Data Documentation

float Dubious::Math::Triple::m_x = 0
float Dubious::Math::Triple::m_y = 0
float Dubious::Math::Triple::m_z = 0

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