OgreMath.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __Math_H__
#define __Math_H__
#include "OgrePrerequisites.h"
#include "OgreHeaderPrefix.h"
namespace Ogre
{
class Radian
{
Real mRad;
public:
explicit Radian ( Real r=0 ) : mRad(r) {}
Radian ( const Degree& d );
Radian& operator = ( const Real& f ) { mRad = f; return *this; }
Radian& operator = ( const Radian& r ) { mRad = r.mRad; return *this; }
Radian& operator = ( const Degree& d );
Real valueDegrees() const; // see bottom of this file
Real valueRadians() const { return mRad; }
Real valueAngleUnits() const;
const Radian& operator + () const { return *this; }
Radian operator + ( const Radian& r ) const { return Radian ( mRad + r.mRad ); }
Radian operator + ( const Degree& d ) const;
Radian& operator += ( const Radian& r ) { mRad += r.mRad; return *this; }
Radian& operator += ( const Degree& d );
Radian operator - () const { return Radian(-mRad); }
Radian operator - ( const Radian& r ) const { return Radian ( mRad - r.mRad ); }
Radian operator - ( const Degree& d ) const;
Radian& operator -= ( const Radian& r ) { mRad -= r.mRad; return *this; }
Radian& operator -= ( const Degree& d );
Radian operator * ( Real f ) const { return Radian ( mRad * f ); }
Radian operator * ( const Radian& f ) const { return Radian ( mRad * f.mRad ); }
Radian& operator *= ( Real f ) { mRad *= f; return *this; }
Radian operator / ( Real f ) const { return Radian ( mRad / f ); }
Radian& operator /= ( Real f ) { mRad /= f; return *this; }
bool operator < ( const Radian& r ) const { return mRad < r.mRad; }
bool operator <= ( const Radian& r ) const { return mRad <= r.mRad; }
bool operator == ( const Radian& r ) const { return mRad == r.mRad; }
bool operator != ( const Radian& r ) const { return mRad != r.mRad; }
bool operator >= ( const Radian& r ) const { return mRad >= r.mRad; }
bool operator > ( const Radian& r ) const { return mRad > r.mRad; }
inline _OgreExport friend std::ostream& operator <<
( std::ostream& o, const Radian& v )
{
o << "Radian(" << v.valueRadians() << ")";
return o;
}
};
class Degree
{
Real mDeg; // if you get an error here - make sure to define/typedef 'Real' first
public:
explicit Degree ( Real d=0 ) : mDeg(d) {}
Degree ( const Radian& r ) : mDeg(r.valueDegrees()) {}
Degree& operator = ( const Real& f ) { mDeg = f; return *this; }
Degree& operator = ( const Degree& d ) { mDeg = d.mDeg; return *this; }
Degree& operator = ( const Radian& r ) { mDeg = r.valueDegrees(); return *this; }
Real valueDegrees() const { return mDeg; }
Real valueRadians() const; // see bottom of this file
Real valueAngleUnits() const;
const Degree& operator + () const { return *this; }
Degree operator + ( const Degree& d ) const { return Degree ( mDeg + d.mDeg ); }
Degree operator + ( const Radian& r ) const { return Degree ( mDeg + r.valueDegrees() ); }
Degree& operator += ( const Degree& d ) { mDeg += d.mDeg; return *this; }
Degree& operator += ( const Radian& r ) { mDeg += r.valueDegrees(); return *this; }
Degree operator - () const { return Degree(-mDeg); }
Degree operator - ( const Degree& d ) const { return Degree ( mDeg - d.mDeg ); }
Degree operator - ( const Radian& r ) const { return Degree ( mDeg - r.valueDegrees() ); }
Degree& operator -= ( const Degree& d ) { mDeg -= d.mDeg; return *this; }
Degree& operator -= ( const Radian& r ) { mDeg -= r.valueDegrees(); return *this; }
Degree operator * ( Real f ) const { return Degree ( mDeg * f ); }
Degree operator * ( const Degree& f ) const { return Degree ( mDeg * f.mDeg ); }
Degree& operator *= ( Real f ) { mDeg *= f; return *this; }
Degree operator / ( Real f ) const { return Degree ( mDeg / f ); }
Degree& operator /= ( Real f ) { mDeg /= f; return *this; }
bool operator < ( const Degree& d ) const { return mDeg < d.mDeg; }
bool operator <= ( const Degree& d ) const { return mDeg <= d.mDeg; }
bool operator == ( const Degree& d ) const { return mDeg == d.mDeg; }
bool operator != ( const Degree& d ) const { return mDeg != d.mDeg; }
bool operator >= ( const Degree& d ) const { return mDeg >= d.mDeg; }
bool operator > ( const Degree& d ) const { return mDeg > d.mDeg; }
inline _OgreExport friend std::ostream& operator <<
( std::ostream& o, const Degree& v )
{
o << "Degree(" << v.valueDegrees() << ")";
return o;
}
};
class Angle
{
Real mAngle;
public:
explicit Angle ( Real angle ) : mAngle(angle) {}
operator Radian() const;
operator Degree() const;
};
// these functions could not be defined within the class definition of class
// Radian because they required class Degree to be defined
inline Radian::Radian ( const Degree& d ) : mRad(d.valueRadians()) {
}
inline Radian& Radian::operator = ( const Degree& d ) {
mRad = d.valueRadians(); return *this;
}
inline Radian Radian::operator + ( const Degree& d ) const {
return Radian ( mRad + d.valueRadians() );
}
inline Radian& Radian::operator += ( const Degree& d ) {
mRad += d.valueRadians();
return *this;
}
inline Radian Radian::operator - ( const Degree& d ) const {
return Radian ( mRad - d.valueRadians() );
}
inline Radian& Radian::operator -= ( const Degree& d ) {
mRad -= d.valueRadians();
return *this;
}
class _OgreExport Math
{
public:
enum AngleUnit
{
AU_DEGREE,
AU_RADIAN
};
class RandomValueProvider
{
public:
virtual ~RandomValueProvider() {}
virtual Real getRandomUnit() = 0;
};
protected:
static AngleUnit msAngleUnit;
static int mTrigTableSize;
static Real mTrigTableFactor;
static Real* mSinTable;
static Real* mTanTable;
static RandomValueProvider* mRandProvider;
void buildTrigTables();
static Real SinTable (Real fValue);
static Real TanTable (Real fValue);
public:
Math(unsigned int trigTableSize = 4096);
~Math();
static inline int IAbs (int iValue) { return ( iValue >= 0 ? iValue : -iValue ); }
static inline int ICeil (float fValue) { return int(ceil(fValue)); }
static inline int IFloor (float fValue) { return int(floor(fValue)); }
static int ISign (int iValue);
static inline Real Abs (Real fValue) { return Real(fabs(fValue)); }
static inline Degree Abs (const Degree& dValue) { return Degree(fabs(dValue.valueDegrees())); }
static inline Radian Abs (const Radian& rValue) { return Radian(fabs(rValue.valueRadians())); }
static Radian ACos (Real fValue);
static Radian ASin (Real fValue);
static inline Radian ATan (Real fValue) { return Radian(atan(fValue)); }
static inline Radian ATan2 (Real fY, Real fX) { return Radian(atan2(fY,fX)); }
static inline Real Ceil (Real fValue) { return Real(ceil(fValue)); }
static inline bool isNaN(Real f)
{
// std::isnan() is C99, not supported by all compilers
// However NaN always fails this next test, no other number does.
return f != f;
}
static inline Real Cos (const Radian& fValue, bool useTables = false) {
return (!useTables) ? Real(cos(fValue.valueRadians())) : SinTable(fValue.valueRadians() + HALF_PI);
}
static inline Real Cos (Real fValue, bool useTables = false) {
return (!useTables) ? Real(cos(fValue)) : SinTable(fValue + HALF_PI);
}
static inline Real Exp (Real fValue) { return Real(exp(fValue)); }
static inline Real Floor (Real fValue) { return Real(floor(fValue)); }
static inline Real Log (Real fValue) { return Real(log(fValue)); }
static const Real LOG2;
static inline Real Log2 (Real fValue) { return Real(log(fValue)/LOG2); }
static inline Real LogN (Real base, Real fValue) { return Real(log(fValue)/log(base)); }
static inline Real Pow (Real fBase, Real fExponent) { return Real(pow(fBase,fExponent)); }
static Real Sign (Real fValue);
static inline Radian Sign ( const Radian& rValue )
{
return Radian(Sign(rValue.valueRadians()));
}
static inline Degree Sign ( const Degree& dValue )
{
return Degree(Sign(dValue.valueDegrees()));
}
//Simulate the shader function saturate that clamps a parameter value between 0 and 1
static inline float saturate(float t) { return (t < 0) ? 0 : ((t > 1) ? 1 : t); }
static inline double saturate(double t) { return (t < 0) ? 0 : ((t > 1) ? 1 : t); }
//Simulate the shader function lerp which performers linear interpolation
//given 3 parameters v0, v1 and t the function returns the value of (1 – t)* v0 + t * v1.
//where v0 and v1 are matching vector or scalar types and t can be either a scalar or a vector of the same type as a and b.
template<typename V, typename T> static V lerp(const V& v0, const V& v1, const T& t) {
return v0 * (1 - t) + v1 * t; }
static inline Real Sin (const Radian& fValue, bool useTables = false) {
return (!useTables) ? Real(sin(fValue.valueRadians())) : SinTable(fValue.valueRadians());
}
static inline Real Sin (Real fValue, bool useTables = false) {
return (!useTables) ? Real(sin(fValue)) : SinTable(fValue);
}
static inline Real Sqr (Real fValue) { return fValue*fValue; }
static inline Real Sqrt (Real fValue) { return Real(sqrt(fValue)); }
static inline Radian Sqrt (const Radian& fValue) { return Radian(sqrt(fValue.valueRadians())); }
static inline Degree Sqrt (const Degree& fValue) { return Degree(sqrt(fValue.valueDegrees())); }
static Real InvSqrt (Real fValue);
static Real UnitRandom ();
static Real RangeRandom (Real fLow, Real fHigh);
static Real SymmetricRandom ();
static void SetRandomValueProvider(RandomValueProvider* provider);
static inline Real Tan (const Radian& fValue, bool useTables = false) {
return (!useTables) ? Real(tan(fValue.valueRadians())) : TanTable(fValue.valueRadians());
}
static inline Real Tan (Real fValue, bool useTables = false) {
return (!useTables) ? Real(tan(fValue)) : TanTable(fValue);
}
static inline Real DegreesToRadians(Real degrees) { return degrees * fDeg2Rad; }
static inline Real RadiansToDegrees(Real radians) { return radians * fRad2Deg; }
static void setAngleUnit(AngleUnit unit);
static AngleUnit getAngleUnit(void);
static Real AngleUnitsToRadians(Real units);
static Real RadiansToAngleUnits(Real radians);
static Real AngleUnitsToDegrees(Real units);
static Real DegreesToAngleUnits(Real degrees);
static bool pointInTri2D(const Vector2& p, const Vector2& a,
const Vector2& b, const Vector2& c);
static bool pointInTri3D(const Vector3& p, const Vector3& a,
const Vector3& b, const Vector3& c, const Vector3& normal);
static std::pair<bool, Real> intersects(const Ray& ray, const Plane& plane);
static std::pair<bool, Real> intersects(const Ray& ray, const Sphere& sphere,
bool discardInside = true);
static std::pair<bool, Real> intersects(const Ray& ray, const AxisAlignedBox& box);
static bool intersects(const Ray& ray, const AxisAlignedBox& box,
Real* d1, Real* d2);
static std::pair<bool, Real> intersects(const Ray& ray, const Vector3& a,
const Vector3& b, const Vector3& c, const Vector3& normal,
bool positiveSide = true, bool negativeSide = true);
static std::pair<bool, Real> intersects(const Ray& ray, const Vector3& a,
const Vector3& b, const Vector3& c,
bool positiveSide = true, bool negativeSide = true);
static bool intersects(const Sphere& sphere, const AxisAlignedBox& box);
static bool intersects(const Plane& plane, const AxisAlignedBox& box);
static std::pair<bool, Real> intersects(
const Ray& ray, const vector<Plane>::type& planeList,
bool normalIsOutside);
static std::pair<bool, Real> intersects(
const Ray& ray, const list<Plane>::type& planeList,
bool normalIsOutside);
static bool intersects(const Sphere& sphere, const Plane& plane);
static bool RealEqual(Real a, Real b,
Real tolerance = std::numeric_limits<Real>::epsilon());
static Vector3 calculateTangentSpaceVector(
const Vector3& position1, const Vector3& position2, const Vector3& position3,
Real u1, Real v1, Real u2, Real v2, Real u3, Real v3);
static Matrix4 buildReflectionMatrix(const Plane& p);
static Vector4 calculateFaceNormal(const Vector3& v1, const Vector3& v2, const Vector3& v3);
static Vector3 calculateBasicFaceNormal(const Vector3& v1, const Vector3& v2, const Vector3& v3);
static Vector4 calculateFaceNormalWithoutNormalize(const Vector3& v1, const Vector3& v2, const Vector3& v3);
static Vector3 calculateBasicFaceNormalWithoutNormalize(const Vector3& v1, const Vector3& v2, const Vector3& v3);
static Real gaussianDistribution(Real x, Real offset = 0.0f, Real scale = 1.0f);
template <typename T>
static T Clamp(T val, T minval, T maxval)
{
assert (minval <= maxval && "Invalid clamp range");
return std::max(std::min(val, maxval), minval);
}
static Matrix4 makeViewMatrix(const Vector3& position, const Quaternion& orientation,
const Matrix4* reflectMatrix = 0);
static Real boundingRadiusFromAABB(const AxisAlignedBox& aabb);
static const Real POS_INFINITY;
static const Real NEG_INFINITY;
static const Real PI;
static const Real TWO_PI;
static const Real HALF_PI;
static const Real fDeg2Rad;
static const Real fRad2Deg;
};
// these functions must be defined down here, because they rely on the
// angle unit conversion functions in class Math:
inline Real Radian::valueDegrees() const
{
return Math::RadiansToDegrees ( mRad );
}
inline Real Radian::valueAngleUnits() const
{
return Math::RadiansToAngleUnits ( mRad );
}
inline Real Degree::valueRadians() const
{
return Math::DegreesToRadians ( mDeg );
}
inline Real Degree::valueAngleUnits() const
{
return Math::DegreesToAngleUnits ( mDeg );
}
inline Angle::operator Radian() const
{
return Radian(Math::AngleUnitsToRadians(mAngle));
}
inline Angle::operator Degree() const
{
return Degree(Math::AngleUnitsToDegrees(mAngle));
}
inline Radian operator * ( Real a, const Radian& b )
{
return Radian ( a * b.valueRadians() );
}
inline Radian operator / ( Real a, const Radian& b )
{
return Radian ( a / b.valueRadians() );
}
inline Degree operator * ( Real a, const Degree& b )
{
return Degree ( a * b.valueDegrees() );
}
inline Degree operator / ( Real a, const Degree& b )
{
return Degree ( a / b.valueDegrees() );
}
}
#include "OgreHeaderSuffix.h"
#endif
Ogre::Math::RandomValueProvider::~RandomValueProvider
virtual ~RandomValueProvider()
Definition: OgreMath.h:211
Ogre::Degree::mDeg
Real mDeg
Definition: OgreMath.h:100
Ogre::Math::Sqr
static Real Sqr(Real fValue)
Squared function.
Definition: OgreMath.h:399
Ogre::Math::fRad2Deg
static const Real fRad2Deg
Definition: OgreMath.h:710
Ogre::Math::AU_DEGREE
Definition: OgreMath.h:201
Ogre::Math::LOG2
static const Real LOG2
Stored value of log(2) for frequent use.
Definition: OgreMath.h:346
Ogre::Radian::operator+
const Radian & operator+() const
Definition: OgreMath.h:62
Ogre::Radian::operator!=
bool operator!=(const Radian &r) const
Definition: OgreMath.h:81
Ogre::Math::mTrigTableFactor
static Real mTrigTableFactor
Radian -> index factor value ( mTrigTableSize / 2 * PI )
Definition: OgreMath.h:224
Ogre::Math::Sqrt
static Radian Sqrt(const Radian &fValue)
Square root function.
Definition: OgreMath.h:413
Ogre::Math
Class to provide access to common mathematical functions.
Definition: OgreMath.h:191
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::Radian::operator<=
bool operator<=(const Radian &r) const
Definition: OgreMath.h:79
Ogre::Math::Cos
static Real Cos(const Radian &fValue, bool useTables=false)
Cosine function.
Definition: OgreMath.h:319
Ogre::Math::PI
static const Real PI
Definition: OgreMath.h:706
Ogre::Math::HALF_PI
static const Real HALF_PI
Definition: OgreMath.h:708
Ogre::Math::Floor
static Real Floor(Real fValue)
Floor function Returns the largest previous integer.
Definition: OgreMath.h:341
Ogre::Quaternion
Implementation of a Quaternion, i.e.
Definition: OgreQuaternion.h:57
Ogre::Sphere
A sphere primitive, mostly used for bounds checking.
Definition: OgreSphere.h:51
Ogre::Angle::Angle
Angle(Real angle)
Definition: OgreMath.h:154
Ogre::Vector4
4-dimensional homogeneous vector.
Definition: OgreVector4.h:45
Ogre::Radian::operator>
bool operator>(const Radian &r) const
Definition: OgreMath.h:83
Ogre::Math::isNaN
static bool isNaN(Real f)
Definition: OgreMath.h:305
Ogre::Vector2
Standard 2-dimensional vector.
Definition: OgreVector2.h:51
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::Math::mRandProvider
static RandomValueProvider * mRandProvider
A random value provider. overriding the default random number generator.
Definition: OgreMath.h:229
Ogre::Math::Log
static Real Log(Real fValue)
Definition: OgreMath.h:343
Ogre::Math::Sign
static Degree Sign(const Degree &dValue)
Definition: OgreMath.h:359
Ogre::Math::Abs
static Degree Abs(const Degree &dValue)
Absolute value function.
Definition: OgreMath.h:264
Ogre::Radian::operator+=
Radian & operator+=(const Radian &r)
Definition: OgreMath.h:65
Ogre::Math::msAngleUnit
static AngleUnit msAngleUnit
Angle units used by the api.
Definition: OgreMath.h:218
Ogre::Math::Sign
static Radian Sign(const Radian &rValue)
Definition: OgreMath.h:355
Ogre::Math::AngleUnit
AngleUnit
The angular units used by the API.
Definition: OgreMath.h:199
Ogre::Math::DegreesToRadians
static Real DegreesToRadians(Real degrees)
Definition: OgreMath.h:475
Ogre::Plane
Defines a plane in 3D space.
Definition: OgrePlane.h:61
Ogre::Math::Exp
static Real Exp(Real fValue)
Definition: OgreMath.h:333
Ogre::Radian::operator/
Radian operator/(Real f) const
Definition: OgreMath.h:75
Ogre::Math::Abs
static Real Abs(Real fValue)
Absolute value function.
Definition: OgreMath.h:258
Ogre::Degree::Degree
Degree(const Radian &r)
Definition: OgreMath.h:104
Ogre::Math::IFloor
static int IFloor(float fValue)
Definition: OgreMath.h:251
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:78
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
Ogre::Math::mTrigTableSize
static int mTrigTableSize
Size of the trig tables as determined by constructor.
Definition: OgreMath.h:221
OgrePrerequisites.h
Ogre::Radian::operator>=
bool operator>=(const Radian &r) const
Definition: OgreMath.h:82
Ogre::Radian::operator-
Radian operator-() const
Definition: OgreMath.h:67
Ogre::Math::Log2
static Real Log2(Real fValue)
Definition: OgreMath.h:348
Ogre::Radian::valueRadians
Real valueRadians() const
Definition: OgreMath.h:59
Ogre::Radian::operator==
bool operator==(const Radian &r) const
Definition: OgreMath.h:80
Ogre::Radian::operator=
Radian & operator=(const Real &f)
Definition: OgreMath.h:54
Ogre::Angle
Wrapper class which identifies a value as the currently default angle type, as defined by Math::setAn...
Definition: OgreMath.h:150
Ogre::Math::POS_INFINITY
static const Real POS_INFINITY
Definition: OgreMath.h:704
Ogre::Radian::operator/=
Radian & operator/=(Real f)
Definition: OgreMath.h:76
Ogre::Math::RadiansToAngleUnits
static Real RadiansToAngleUnits(Real radians)
Convert from radians to the current AngleUnit .
Ogre::Math::Abs
static Radian Abs(const Radian &rValue)
Absolute value function.
Definition: OgreMath.h:270
Ogre::Math::Sqrt
static Real Sqrt(Real fValue)
Square root function.
Definition: OgreMath.h:405
Ogre::Radian::Radian
Radian(Real r=0)
Definition: OgreMath.h:52
Ogre::Math::RadiansToDegrees
static Real RadiansToDegrees(Real radians)
Definition: OgreMath.h:476
Ogre::Math::mSinTable
static Real * mSinTable
Definition: OgreMath.h:225
Ogre::Degree::valueDegrees
Real valueDegrees() const
Definition: OgreMath.h:109
Ogre::Math::ICeil
static int ICeil(float fValue)
Definition: OgreMath.h:250
Ogre::Math::Cos
static Real Cos(Real fValue, bool useTables=false)
Cosine function.
Definition: OgreMath.h:329
OgreHeaderSuffix.h
Ogre::Radian::valueDegrees
Real valueDegrees() const
Definition: OgreMath.h:717
Ogre::Radian::mRad
Real mRad
Definition: OgreMath.h:49
Ogre::Radian::operator-=
Radian & operator-=(const Radian &r)
Definition: OgreMath.h:70
Ogre::Degree::Degree
Degree(Real d=0)
Definition: OgreMath.h:103
Ogre::Radian::operator*=
Radian & operator*=(Real f)
Definition: OgreMath.h:74
Ogre::Math::Tan
static Real Tan(const Radian &fValue, bool useTables=false)
Tangent function.
Definition: OgreMath.h:461
Ogre::Degree::valueAngleUnits
Real valueAngleUnits() const
Definition: OgreMath.h:732
Ogre::Math::Clamp
static T Clamp(T val, T minval, T maxval)
Clamp a value within an inclusive range.
Definition: OgreMath.h:690
Ogre::Math::fDeg2Rad
static const Real fDeg2Rad
Definition: OgreMath.h:709
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::Radian::operator*
Radian operator*(Real f) const
Definition: OgreMath.h:72
Ogre::Math::NEG_INFINITY
static const Real NEG_INFINITY
Definition: OgreMath.h:705
Ogre::Math::Ceil
static Real Ceil(Real fValue)
Ceiling function Returns the smallest following integer.
Definition: OgreMath.h:304
Ogre::Math::Pow
static Real Pow(Real fBase, Real fExponent)
Definition: OgreMath.h:352
Ogre::Angle::mAngle
Real mAngle
Definition: OgreMath.h:152
Ogre::vector
Definition: OgrePrerequisites.h:491
OgreHeaderPrefix.h
Ogre::Math::mTanTable
static Real * mTanTable
Definition: OgreMath.h:226
Ogre::Radian::valueAngleUnits
Real valueAngleUnits() const
Definition: OgreMath.h:722
Ogre::Math::saturate
static double saturate(double t)
Definition: OgreMath.h:366
Ogre::Degree
Wrapper class which indicates a given angle value is in Degrees.
Definition: OgreMath.h:98
Ogre::Math::ATan
static Radian ATan(Real fValue)
Arc tangent function.
Definition: OgreMath.h:288
Ogre::Math::Sin
static Real Sin(const Radian &fValue, bool useTables=false)
Sine function.
Definition: OgreMath.h:381
Ogre::Math::saturate
static float saturate(float t)
Definition: OgreMath.h:365
Ogre::list::type
std::list< T, A > type
Definition: OgrePrerequisites.h:508
Ogre::Math::Tan
static Real Tan(Real fValue, bool useTables=false)
Tangent function.
Definition: OgreMath.h:471
Ogre::Math::AngleUnitsToRadians
static Real AngleUnitsToRadians(Real units)
Convert from the current AngleUnit to radians.
Ogre::AxisAlignedBox
A 3D box aligned with the x/y/z axes.
Definition: OgreAxisAlignedBox.h:54
Ogre::Math::AngleUnitsToDegrees
static Real AngleUnitsToDegrees(Real units)
Convert from the current AngleUnit to degrees.
Ogre::Math::RandomValueProvider
This class is used to provide an external random value provider.
Definition: OgreMath.h:208
Ogre::Math::lerp
static V lerp(const V &v0, const V &v1, const T &t)
Definition: OgreMath.h:371
Ogre::Math::IAbs
static int IAbs(int iValue)
Definition: OgreMath.h:249
Ogre::Math::ATan2
static Radian ATan2(Real fY, Real fX)
Arc tangent between two values function.
Definition: OgreMath.h:296
Ogre::Degree::valueRadians
Real valueRadians() const
Definition: OgreMath.h:727
Ogre::Radian::operator<
bool operator<(const Radian &r) const
Definition: OgreMath.h:78
Ogre::Math::Sin
static Real Sin(Real fValue, bool useTables=false)
Sine function.
Definition: OgreMath.h:391
Ogre::Math::Sqrt
static Degree Sqrt(const Degree &fValue)
Square root function.
Definition: OgreMath.h:421
Ogre::Ray
Representation of a ray in space, i.e.
Definition: OgreRay.h:46
Ogre::Radian
Wrapper class which indicates a given angle value is in Radians.
Definition: OgreMath.h:47
Ogre::Math::LogN
static Real LogN(Real base, Real fValue)
Definition: OgreMath.h:350
Ogre::Math::TWO_PI
static const Real TWO_PI
Definition: OgreMath.h:707
Ogre::Math::DegreesToAngleUnits
static Real DegreesToAngleUnits(Real degrees)
Convert from degrees to the current AngleUnit.

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.