FXMaths.h File Reference


Detailed Description

Defines a number of tools useful for maths.

Definition in file FXMaths.h.

#include "FXProcess.h"
#include "QThread.h"
#include "FXStream.h"
#include "qmemarray.h"
#include <math.h>
#include "FXVec2f.h"
#include "FXVec2d.h"
#include "FXVec3f.h"
#include "FXVec3d.h"
#include "FXMat3f.h"
#include "FXMat3d.h"
#include "FXVec4f.h"
#include "FXVec4d.h"
#include "FXMat4f.h"
#include "FXMat4d.h"

Go to the source code of this file.

Namespaces

namespace  FX
namespace  FX::Maths
namespace  Maths
namespace  FX::Maths::Impl

Classes

struct  FX::Maths::Impl::CalcInfinity< float, minus >
struct  FX::Maths::Impl::CalcInfinity< double, minus >
struct  FX::Maths::Impl::InfinityValue< type, minus >
struct  FX::Maths::Impl::CalcNaN< float >
struct  FX::Maths::Impl::CalcNaN< double >
struct  FX::Maths::Impl::NaNValue< type >
struct  FX::Maths::Impl::TwoPowerMemAligner< size >
class  FX::Maths::Impl::VectorBase< type, A, supertype, _isArithmetic, _isInteger, SIMDType >
class  FX::Maths::Impl::VectorBase< type, A, supertype, true, isInteger, SIMDType >
class  FX::Maths::Impl::VectorBase< type, A, supertype, true, true, SIMDType >
class  FX::Maths::Impl::EquivType< base, type, equivtype >
class  FX::Maths::Impl::EquivType< base, type, void >
class  FX::Maths::Impl::VectorOfVectors< vectortype, N, supertype, _isArithmetic, _isInteger >
class  FX::Maths::Impl::VectorOfVectors< vectortype, N, supertype, true, isInteger >
class  FX::Maths::Impl::VectorOfVectors< vectortype, N, supertype, true, true >
struct  FX::Maths::InfinityValue< type, minus >
 Returns -inf or +inf floating point values. More...
struct  FX::Maths::NaNValue< type >
 Returns NaN floating point value. More...
class  FX::Maths::Vector< type, A >
 A SIMD based N dimensional vector. More...
class  FX::Maths::Array< type, A >
 A fixed-length array. More...
class  FX::Maths::Impl::MatrixIt< type, A, B, true >
class  FX::Maths::Impl::MatrixI< type, A, B >
class  FX::Maths::Matrix< type, A, B >
 A fixed-length matrix. More...
class  FX::Maths::FRandomness
 A fast quality source of pseudo entropy. More...
class  FX::Maths::SysRandomness
 Threadsafe system source of randomness. More...

Defines

#define VECTOR1OP(op)
#define VECTOR2OP(op)
#define VECTORP2OP(op)
#define VECTORFUNC(op)
#define VECTOR2FUNC(op)
#define VECTOR1OP(op)
#define VECTOR2OP(op)
#define VECTORP2OP(op)
#define VECTORFUNC(op)
#define VECTOR2FUNC(op)
#define DEFINEVECTOREQUIV(type, A, equivtype)
#define FXVECTOROFVECTORS(VECTORTYPE, ELEMENTS, equivtype)
#define DEFINEMATRIXEQUIV(type, no, equivtype)

Typedefs

typedef Vector< float, 2 > FX::Maths::Vector2f
typedef Vector< float, 3 > FX::Maths::Vector3f
typedef Vector< float, 4 > FX::Maths::Vector4f
typedef Vector< double, 2 > FX::Maths::Vector2d
typedef Vector< double, 3 > FX::Maths::Vector3d
typedef Vector< double, 4 > FX::Maths::Vector4d
typedef Matrix< float, 3, 3 > FX::Maths::Matrix3f
typedef Matrix< float, 4, 4 > FX::Maths::Matrix4f
typedef Matrix< double, 3, 3 > FX::Maths::Matrix3d
typedef Matrix< double, 4, 4 > FX::Maths::Matrix4d

Functions

template<typename type>
const type & FX::Maths::min (const type &a, const type &b)
template<typename type>
const type & FX::Maths::max (const type &a, const type &b)
template<typename type>
type FX::Maths::sqrt (const type &v)
template<>
float FX::Maths::sqrt< float > (const float &v)
template<typename type>
type FX::Maths::rcp (const type &v)
template<typename type>
type FX::Maths::rsqrt (const type &v)
template<typename type>
bool FX::Maths::isNaN (type val) throw ()
template<>
bool FX::Maths::isNaN< float > (float val) throw ()
template<>
bool FX::Maths::isNaN< double > (double val) throw ()
template<typename type, unsigned int A>
FXStream & FX::Maths::operator<< (FXStream &s, const Vector< type, A > &v)
template<typename type, unsigned int A>
FXStream & FX::Maths::operator>> (FXStream &s, Vector< type, A > &v)
template<typename type, unsigned int A, unsigned int B>
MatrixIt< type, A, B, true > FX::Maths::Impl::transpose (const MatrixIt< type, A, B, true > &v)
double FX::Maths::normalrand (FRandomness &src, double stddevs) throw ()
double FX::Maths::normalrand (SysRandomness &src, double stddevs) throw ()
template<typename type>
type FX::Maths::normaldist (type x, type stddevs) throw ()
template<typename type>
type FX::Maths::mean (const type *FXRESTRICT array, FXuval len, FXuint stride=1, type *FXRESTRICT min=0, type *FXRESTRICT max=0, type *FXRESTRICT mode=0) throw ()
template<typename type, class allocator>
type FX::Maths::mean (const QMemArray< type, allocator > &array, FXuint stride=1, type *FXRESTRICT min=0, type *FXRESTRICT max=0, type *FXRESTRICT mode=0) throw ()
template<typename type>
type FX::Maths::variance (const type *FXRESTRICT array, FXuval len, FXuint stride=1, const type *FXRESTRICT _mean=0) throw ()
template<typename type, class allocator>
type FX::Maths::variance (const QMemArray< type, allocator > &array, FXuint stride=1, const type *FXRESTRICT _mean=0) throw ()
template<typename type>
type FX::Maths::stddev (const type *FXRESTRICT array, FXuval len, FXuint stride=1, const type *FXRESTRICT _mean=0) throw ()
template<typename type, class allocator>
type FX::Maths::stddev (const QMemArray< type, allocator > &array, FXuint stride=1, const type *FXRESTRICT _mean=0) throw ()
template<unsigned int buckets, typename type>
Vector< type, buckets+3 > FX::Maths::distribution (const type *FXRESTRICT array, FXuval len, FXuint stride=1, const type *FXRESTRICT min=0, const type *FXRESTRICT max=0) throw ()
template<unsigned int buckets, typename type, class allocator>
Vector< type, buckets+3 > FX::Maths::distribution (const QMemArray< type, allocator > &array, FXuint stride=1, const type *FXRESTRICT min=0, const type *FXRESTRICT max=0) throw ()

Variables

FXAPI SysRandomness FX::Maths::SysRandSrc


(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:31 2009 for TnFOX by doxygen v1.4.7