|
static int | iabs (int iValue) |
|
static int | iceil (real fValue) |
|
static int | ifloor (real fValue) |
|
static int | isign (int iValue) |
|
static real | abs (real fValue) |
|
static real | acos (real fValue) |
|
static real | asin (real fValue) |
|
static real | atan (real fValue) |
|
static real | atan2 (real fY, real fX) |
|
static real | ceil (real fValue) |
|
static bool | isNaN (real f) |
|
static real | cos (real fValue, bool useTables=false) |
| Cosine function. More...
|
|
static real | exp (real fValue) |
|
static real | floor (real fValue) |
|
static real | log (real fValue) |
|
static real | log2 (real fValue) |
|
static real | logN (real base, real fValue) |
|
static real | pow (real fBase, real fExponent) |
|
static real | sign (real fValue) |
|
static real | sin (real fValue, bool useTables=false) |
| Sine function. More...
|
|
static real | sqr (real fValue) |
|
static real | sqrt (real fValue) |
|
static real | unitRandom () |
|
static real | rangeRandom (real fLow, real fHigh) |
|
static real | symmetricRandom () |
|
static real | tan (real fValue, bool useTables=false) |
| Tangent function. More...
|
|
static real | degreesToRadians (real degrees) |
|
static real | radiansToDegrees (real radians) |
|
static bool | pointInTri2D (const Vector2f &p, const Vector2f &a, const Vector2f &b, const Vector2f &c) |
| Checks whether a given point is inside a triangle, in a 2-dimensional (Cartesian) space. More...
|
|
static bool | pointInTri3D (const Vector3f &p, const Vector3f &a, const Vector3f &b, const Vector3f &c, const Vector3f &normal) |
| Checks whether a given 3D point is inside a triangle. More...
|
|
static std::pair< bool, real > | intersects (const Ray &ray, const Plane &plane) |
| Ray / plane intersection, returns boolean result and distance. More...
|
|
static std::pair< bool, real > | intersects (const Ray &ray, const Sphere &sphere, bool discardInside=true) |
| Ray / sphere intersection, returns boolean result and distance. More...
|
|
static std::pair< bool, real > | intersects (const Ray &ray, const AlignedBox3 &box) |
| Ray / box intersection, returns boolean result and distance. More...
|
|
static bool | intersects (const Ray &ray, const AlignedBox3 &box, real *d1, real *d2) |
| Ray / box intersection, returns boolean result and two intersection distance. More...
|
|
static std::pair< bool, real > | intersects (const Ray &ray, const Vector3f &a, const Vector3f &b, const Vector3f &c, const Vector3f &normal, bool positiveSide=true, bool negativeSide=true) |
| Ray / triangle intersection, returns boolean result and distance. More...
|
|
static std::pair< bool, real > | intersects (const Ray &ray, const Vector3f &a, const Vector3f &b, const Vector3f &c, bool positiveSide=true, bool negativeSide=true) |
| Ray / triangle intersection, returns boolean result and distance. More...
|
|
static bool | intersects (const Sphere &sphere, const AlignedBox3 &box) |
| Sphere / box intersection test. More...
|
|
static bool | intersects (const Plane &plane, const AlignedBox3 &box) |
| Plane / box intersection test. More...
|
|
static std::pair< bool, real > | intersects (const Ray &ray, const std::vector< Plane > &planeList, bool normalIsOutside) |
| Ray / convex plane list intersection test. More...
|
|
static std::pair< bool, real > | intersects (const Ray &ray, const std::list< Plane > &planeList, bool normalIsOutside) |
| Ray / convex plane list intersection test. More...
|
|
static bool | intersects (const Sphere &sphere, const Plane &plane) |
| Sphere / plane intersection test. More...
|
|
static bool | floatEqual (real a, real b, real tolerance=std::numeric_limits< real >::epsilon()) |
| Compare 2 reals, using tolerance for inaccuracies. More...
|
|
static Vector3f | calculateTangentSpaceVector (const Vector3f &position1, const Vector3f &position2, const Vector3f &position3, real u1, real v1, real u2, real v2, real u3, real v3) |
| Calculates the tangent space vector for a given set of positions / texture coords. More...
|
|
static Matrix4f | buildReflectionMatrix (const Plane &p) |
| Build a reflection matrix for the passed in plane. More...
|
|
static Vector4f | calculateFaceNormal (const Vector3f &v1, const Vector3f &v2, const Vector3f &v3) |
| Calculate a face normal, including the w component which is the offset from the origin. More...
|
|
static Vector3f | calculateBasicFaceNormal (const Vector3f &v1, const Vector3f &v2, const Vector3f &v3) |
| Calculate a face normal, no w-information. More...
|
|
static Vector4f | calculateFaceNormalWithoutNormalize (const Vector3f &v1, const Vector3f &v2, const Vector3f &v3) |
| Calculate a face normal without normalize, including the w component which is the offset from the origin. More...
|
|
static Vector3f | calculateBasicFaceNormalWithoutNormalize (const Vector3f &v1, const Vector3f &v2, const Vector3f &v3) |
| Calculate a face normal without normalize, no w-information. More...
|
|
static real | gaussianDistribution (real x, real offset=0.0f, real scale=1.0f) |
| Generates a value based on the Gaussian (normal) distribution function with the given offset and scale parameters. More...
|
|
static real | Clamp (real val, real minval, real maxval) |
| Clamp a value within an inclusive range. More...
|
|
static AffineTransform3 | makeViewMatrix (const Vector3f &position, const Quaternion &orientation) |
|
static Matrix4f | makePerspectiveMatrix (float fov, float aspect, float nearZ, float farZ) |
|
static real | boundingRadiusFromAABB (const AlignedBox3 &aabb) |
| Get a bounding radius value from a bounding box. More...
|
|
static Quaternion | buildRotation (const Vector3f &a, const Vector3f &b, const Vector3f &fallbackAxis) |
| Compute a quaternion rotation transforming vector a to vector b. More...
|
|
static Vector3f | quaternionToEuler (const Quaternion &quat) |
| Converts a quaternion to euler angles (pitch, yaw, roll) More...
|
|
static Quaternion | quaternionFromEuler (const Vector3f &pitchYawRoll) |
|
static Ray | unproject (const Vector2f &point, const AffineTransform3 &modelview, const Transform3 &projection, const Rect &viewport) |
|
static Ray | unprojectNormalized (const Vector2f &point, const AffineTransform3 &modelview, const Transform3 &projection) |
|
static Vector3f | project (const Vector3f &point, const AffineTransform3 &modelview, const Transform3 &projection, const Rect &viewport) |
|
static Vector3f | normal (const Vector3f &aa, const Vector3f &bb, const Vector3f &cc) |
|
static AffineTransform3 | computeMatchingPointsTransform (const Vectors3f &src, const Vectors3f &dst) |
|
static void | swapMinMax (real &min, real &max) |
|
Class to provide access to common mathematical functions.
- Note
This is based on MgcMath.h from Wild Magic.