This namespace is the home of a number of utility variables and methods to facilitate various math related tasks. More...
Typedefs | |
typedef std::pair< Boolean, Ray > | GeometryRayTestResult |
This is a type used for the return of a ray intersection test. More... | |
typedef std::pair< Boolean, Vector3 > | PlaneRayTestResult |
This is a type used for the ray intersection tests performed on Planes. More... | |
Functions | |
Real | ACos (const Real &Interval) |
Calculates the principal value of the arc Cosine of an angle. More... | |
Real | ASin (const Real &Interval) |
Calculates the principal value of the arc Sine of an angle. More... | |
Real | ATan (const Real &Interval) |
Calculates the principal value of the arc Tangent of an angle. More... | |
Real | Ceil (const Real &Val) |
Rounds a Real up. More... | |
Real | Cos (const Real &Radians) |
Calculates the Cosine of an angle. More... | |
Real | DegreesToRadians (const Real &Degrees) |
Converts an angle in Degree's to the same angle Radians. More... | |
Real | Fabs (const Real &Val) |
Gets the absolute value of a Real. More... | |
Real | Floor (const Real &Val) |
Rounds a Real down. More... | |
Real | Fmod (const Real &Numerator, const Real &Denominator) |
Modulo, fo' Reals. Returns the remainder of the division between two Reals. More... | |
Real | GetDegToRadMultiplier () |
Gets a multiplier used in converting Degree angular units to Radians. | |
Real | GetHalfPi () |
Gets half of Pi. | |
Real | GetPi () |
Gets Pi. | |
Real | GetQuarterPi () |
Gets Quarter Pi. | |
Real | GetRadToDegMultiplier () |
Gets a multiplier used in converting Radian angular units to degrees. | |
Real | GetTwoPi () |
Gets Pi times two. | |
PlaneRayTestResult | Intersects (const Plane &Surface, const Ray &Cast) |
Checks to see if a ray intersects with a Plane. More... | |
GeometryRayTestResult | Intersects (const AxisAlignedBox &Box, const Ray &Cast) |
Checks to see if a ray intersects with an AABB. More... | |
GeometryRayTestResult | Intersects (const Sphere &Ball, const Ray &Cast) |
Checks to see if a ray intersects with a Sphere. More... | |
Boolean | IsInside (const AxisAlignedBox &Box, const Vector3 &Point) |
Checks to see if a point in 3D space is within an AABB. More... | |
Boolean | IsInside (const Sphere &Ball, const Vector3 &Point) |
Checks to see if a point in 3D space is within a Sphere. More... | |
Boolean | Overlap (const AxisAlignedBox &Box, const Sphere &Ball) |
Checks to see if an AABB and Sphere are overlapping. More... | |
Boolean | Overlap (const AxisAlignedBox &Box, const Plane &Surface) |
Checks to see if an AANN and Plane are overlapping. More... | |
Boolean | Overlap (const Plane &Surface, const Sphere &Ball) |
Checks to see if a Plane and Sphere are overlapping. More... | |
Boolean | Overlap (const AxisAlignedBox &Box1, const AxisAlignedBox &Box2) |
Checks to see if two AABBs are overlapping. More... | |
Boolean | Overlap (const Sphere &Ball1, const Sphere &Ball2) |
Checks to see if two Spheres are overlapping. More... | |
Boolean | Overlap (const Plane &Surface1, const Plane &Surface2) |
Checks to see if two Planes are overlapping. More... | |
Real | Pow (const Real &Val, const Real &Power) |
Raises a Real to a power. More... | |
Real | RadiansToDegrees (const Real &Radians) |
Converts an angle in Radians's to the same angle Degrees. More... | |
Real | Sin (const Real &Radians) |
Calculates the Sine of an angle. More... | |
Real | Sqrt (const Real &Val) |
Gets the square root of a Real. More... | |
Real | Tan (const Real &Radians) |
Calculates the Tangent of an angle. More... | |
bool | WithinTolerance (const Real &First, const Real &Second, const Real &Tolerance) |
Checks to see if two Reals are within a certain range of each other. More... | |
This namespace is the home of a number of utility variables and methods to facilitate various math related tasks.
typedef std::pair<Boolean,Ray> Mezzanine::MathTools::GeometryRayTestResult |
This is a type used for the return of a ray intersection test.
This type provides more verbose return data that can be used for further tests.
Definition at line 60 of file mathtool.h.
typedef std::pair<Boolean,Vector3> Mezzanine::MathTools::PlaneRayTestResult |
This is a type used for the ray intersection tests performed on Planes.
This type provides more verbose return data that can be used for further tests.
Definition at line 57 of file mathtool.h.
Real Mezzanine::MathTools::ACos | ( | const Real & | Interval) |
Calculates the principal value of the arc Cosine of an angle.
Interval | The Interval to calculate the arc Cosine. Range is -1.0 to 1.0. |
Definition at line 158 of file mathtool.cpp.
Real Mezzanine::MathTools::ASin | ( | const Real & | Interval) |
Calculates the principal value of the arc Sine of an angle.
Interval | The Interval to calculate the arc Cosine. Range is -1.0 to 1.0. |
Definition at line 161 of file mathtool.cpp.
Real Mezzanine::MathTools::ATan | ( | const Real & | Interval) |
Calculates the principal value of the arc Tangent of an angle.
Interval | The Interval to calculate the arc Cosine. Range is -1.0 to 1.0. |
Definition at line 164 of file mathtool.cpp.
Real Mezzanine::MathTools::Ceil | ( | const Real & | Val) |
Rounds a Real up.
Val | The value to be rounded. |
Definition at line 125 of file mathtool.cpp.
Real Mezzanine::MathTools::Cos | ( | const Real & | Radians) |
Calculates the Cosine of an angle.
Radians | The angle to be computed in Radians. |
Definition at line 149 of file mathtool.cpp.
Real Mezzanine::MathTools::DegreesToRadians | ( | const Real & | Degrees) |
Converts an angle in Degree's to the same angle Radians.
Degrees | The number of Degree's to convert. |
Definition at line 170 of file mathtool.cpp.
Real Mezzanine::MathTools::Fabs | ( | const Real & | Val) |
Gets the absolute value of a Real.
Val | The value to get the absolute value of. |
Definition at line 137 of file mathtool.cpp.
Real Mezzanine::MathTools::Floor | ( | const Real & | Val) |
Rounds a Real down.
Val | The value to be rounded. |
Definition at line 128 of file mathtool.cpp.
Real Mezzanine::MathTools::Fmod | ( | const Real & | Numerator, |
const Real & | Denominator | ||
) |
Modulo, fo' Reals. Returns the remainder of the division between two Reals.
Numerator | The number on top. |
Denominator | The number on bottom. |
Definition at line 140 of file mathtool.cpp.
PlaneRayTestResult Mezzanine::MathTools::Intersects | ( | const Plane & | Surface, |
const Ray & | Cast | ||
) |
Checks to see if a ray intersects with a Plane.
Surface | The Plane to check for intersection. |
Cast | The casted ray to check for intersection. |
Definition at line 238 of file mathtool.cpp.
GeometryRayTestResult Mezzanine::MathTools::Intersects | ( | const AxisAlignedBox & | Box, |
const Ray & | Cast | ||
) |
Checks to see if a ray intersects with an AABB.
Box | The AABB to check for intersection. |
Cast | The casted ray to check for intersection. |
Definition at line 255 of file mathtool.cpp.
GeometryRayTestResult Mezzanine::MathTools::Intersects | ( | const Sphere & | Ball, |
const Ray & | Cast | ||
) |
Checks to see if a ray intersects with a Sphere.
Ball | The Sphere to check for intersection. |
Cast | The casted ray to check for intersection. |
Definition at line 300 of file mathtool.cpp.
Boolean Mezzanine::MathTools::IsInside | ( | const AxisAlignedBox & | Box, |
const Vector3 & | Point | ||
) |
Checks to see if a point in 3D space is within an AABB.
Box | The AABB to check if the point is inside. |
Point | The point in 3D space to check if it is within the AABB. |
Definition at line 182 of file mathtool.cpp.
Boolean Mezzanine::MathTools::IsInside | ( | const Sphere & | Ball, |
const Vector3 & | Point | ||
) |
Checks to see if a point in 3D space is within a Sphere.
Ball | The Sphere to check if the point is inside. |
Point | The point in 3D space to check if it is within the Sphere. |
Definition at line 189 of file mathtool.cpp.
Boolean Mezzanine::MathTools::Overlap | ( | const AxisAlignedBox & | Box, |
const Sphere & | Ball | ||
) |
Checks to see if an AABB and Sphere are overlapping.
Box | The AABB to check for overlap. |
Ball | The Sphere to check for overlap. |
Definition at line 194 of file mathtool.cpp.
Boolean Mezzanine::MathTools::Overlap | ( | const AxisAlignedBox & | Box, |
const Plane & | Surface | ||
) |
Checks to see if an AANN and Plane are overlapping.
Box | The AABB to check for overlap. |
Surface | The Plane to check for overlap. |
Definition at line 211 of file mathtool.cpp.
Boolean Mezzanine::MathTools::Overlap | ( | const Plane & | Surface, |
const Sphere & | Ball | ||
) |
Boolean Mezzanine::MathTools::Overlap | ( | const AxisAlignedBox & | Box1, |
const AxisAlignedBox & | Box2 | ||
) |
Checks to see if two AABBs are overlapping.
Box1 | The first AABB to check for overlap. |
Box2 | The second AABB to check for overlap. |
Definition at line 221 of file mathtool.cpp.
Boolean Mezzanine::MathTools::Overlap | ( | const Sphere & | Ball1, |
const Sphere & | Ball2 | ||
) |
Checks to see if two Spheres are overlapping.
Definition at line 227 of file mathtool.cpp.
Boolean Mezzanine::MathTools::Overlap | ( | const Plane & | Surface1, |
const Plane & | Surface2 | ||
) |
Checks to see if two Planes are overlapping.
Surface1 | The first Plane to check for overlap. |
Surface2 | The second Plane to check for overlap. |
Definition at line 233 of file mathtool.cpp.
Real Mezzanine::MathTools::Pow | ( | const Real & | Val, |
const Real & | Power | ||
) |
Raises a Real to a power.
Val | The base number to be raised. |
Power | The power (or exponent) to raise the Real by. |
Definition at line 131 of file mathtool.cpp.
Real Mezzanine::MathTools::RadiansToDegrees | ( | const Real & | Radians) |
Converts an angle in Radians's to the same angle Degrees.
Radians | The number of Radians's to convert. |
Definition at line 173 of file mathtool.cpp.
Real Mezzanine::MathTools::Sin | ( | const Real & | Radians) |
Calculates the Sine of an angle.
Radians | The angle to be computed in Radians. |
Definition at line 152 of file mathtool.cpp.
Real Mezzanine::MathTools::Sqrt | ( | const Real & | Val) |
Gets the square root of a Real.
Val | The number to be calculated. |
Definition at line 134 of file mathtool.cpp.
Real Mezzanine::MathTools::Tan | ( | const Real & | Radians) |
Calculates the Tangent of an angle.
Radians | The angle to be computed in Radians. |
Definition at line 155 of file mathtool.cpp.
bool Mezzanine::MathTools::WithinTolerance | ( | const Real & | First, |
const Real & | Second, | ||
const Real & | Tolerance | ||
) |
Checks to see if two Reals are within a certain range of each other.
First | The first of two Reals to compare. |
Second | The second of two Reals to compare. |
Tolerance | The leeway allowed in how far the two can be apart. |
Definition at line 143 of file mathtool.cpp.