neo::math Namespace Reference


Detailed Description

The math engine sub-namespace provides classes and methods for mathematic operations and linear algebra. Abstractions for vectors, matrices and quaternions as well as core methods for number manipulation and utility classes for other rotation abstractions


Classes

class  AxisAngle
 Rotation expressed as axis-angle. More...
class  EulerAngles
 Rotation expressed as Euler angles. More...
class  HalfFloat
 16-bit floating point number More...
class  Matrix4
 Row-major 4x4 matrix. More...
class  Quaternion
 Quaternion More...
class  Vector2
 2D vector More...
class  Vector3
 3D vector More...
class  Vector4
 4D vector More...

Enumerations

enum  Axes { X = 0, Y = 1, Z = 2 }
 Axis identifiers. More...

Functions

int round (float n)
int trunc (float n)
template<class T>
const T & max (const T &lval, const T &rval)
template<class T>
const T & min (const T &lval, const T &rval)
template<class T>
const T & max (const T &lval, const T &mval, const T &rval)
template<class T>
const T & min (const T &lval, const T &mval, const T &rval)
template<class T>
void minmax (const T &lval, const T &rval, T &minval, T &maxval)
template<class T>
void minmax (const T &lval, const T &mval, const T &rval, T &minval, T &maxval)
template<class T>
const T & clamp (const T &val, const T &min, const T &max)


Enumeration Type Documentation

enum neo::math::Axes

Identifiers for the three principal axes, with values matching indices into vectors and matrices

Enumerator:
X  X axis.
Y  Y axis.
Z  Z axis.


Function Documentation

int neo::math::round ( float  n  )  [inline]

Round float to the nearest greater integer

Parameters:
n Value to round
Returns:
Rounded value

int neo::math::trunc ( float  n  )  [inline]

Truncate float to the nearest lower integer

Parameters:
n Value to truncate
Returns:
Truncated value

template<class T>
const T & neo::math::max ( const T &  lval,
const T &  rval 
) [inline]

Get maximum value

Parameters:
lval First value
rval Second value
Returns:
Maximum of first and second value

template<class T>
const T & neo::math::min ( const T &  lval,
const T &  rval 
) [inline]

Get minimum value

Parameters:
lval First value
rval Second value
Returns:
Minimum of first and second value

template<class T>
const T & neo::math::max ( const T &  lval,
const T &  mval,
const T &  rval 
) [inline]

Get maximum value

Parameters:
lval First value
mval Second value
rval Third value
Returns:
Maximum of first, second and third value

template<class T>
const T & neo::math::min ( const T &  lval,
const T &  mval,
const T &  rval 
) [inline]

Get minimum value

Parameters:
lval First value
mval Second value
rval Third value
Returns:
Minimum of first, second and third value

template<class T>
void neo::math::minmax ( const T &  lval,
const T &  rval,
T &  minval,
T &  maxval 
) [inline]

Get minimum and maximum value

Parameters:
lval First value
rval Second value
minval Receiving parameter for minimum value
maxval Receiving parameter for maximum value

template<class T>
const T & neo::math::minmax ( const T &  lval,
const T &  mval,
const T &  rval,
T &  minval,
T &  maxval 
) [inline]

Get minimum and maximum value

Parameters:
lval First value
mval Second value
rval Third value
minval Receiving parameter for minimum value
maxval Receiving parameter for maximum value

template<class T>
const T & neo::math::clamp ( const T &  val,
const T &  min,
const T &  max 
) [inline]

Clamp value to range

Parameters:
val Value to clamp
min Minimum value
max Maximum value
Returns:
Clamped value


Generated on Sat Feb 17 20:51:06 2007 for NeoEngine 2 - Evolution by  doxygen 1.5.1