Static Public Member Functions | |
static float | DegreesToRadians (float degrees) |
Converts degrees to radians. | |
static float | RadiansToDegrees (float radians) |
Converts radians to degrees. | |
static float | Sin (float angle) |
Returns the sine of the angle. | |
static Vector3 | CalculateBasicFaceNormal (Vector3 v1, Vector3 v2, Vector3 v3) |
Calculate a face normal, no w-information. | |
static Vector3 | CalculateTangentSpaceVector (Vector3 position1, Vector3 position2, Vector3 position3, float u1, float v1, float u2, float v2, float u3, float v3) |
Calculates the tangent space vector for a given set of positions / texture coords. | |
static float | Cos (float angle) |
Returns the cosine of the angle. | |
static float | ACos (float angle) |
Returns the arc cosine of the angle. | |
static float | ASin (float angle) |
Returns the arc sine of the angle. | |
static float | InvSqrt (float number) |
Inverse square root. | |
static float | Sqrt (float number) |
Returns the square root of a number. | |
static float | Abs (float number) |
Returns the absolute value of the supplied number. | |
static bool | FloatEqual (float a, float b, float tolerance) |
Compares float values for equality, taking into consideration that floating point values should never be directly compared using ==. 2 floats could be conceptually equal, but vary by a .000001 which would fail in a direct comparison. To circumvent that, a tolerance value is used to see if the difference between the 2 floats is less than the desired amount of accuracy. | |
static float | Tan (float angle) |
Returns the tangent of the angle. | |
static float | Max (float value1, float value2) |
Used to quickly determine the greater value between two values. | |
static float | Min (float value1, float value2) |
Used to quickly determine the lesser value between two values. | |
static float | RangeRandom (float min, float max) |
Returns a random value between the specified min and max values. | |
static float | UnitRandom () |
static float | SymmetricRandom () |
static bool | PointInTri2D (float px, float py, float ax, float ay, float bx, float by, float cx, float cy) |
Checks wether a given point is inside a triangle, in a 2-dimensional (Cartesian) space. |
TODO: Add overloads for all methods for all instrinsic data types (i.e. float, short, etc).
|
Returns the absolute value of the supplied number.
|
|
Returns the arc cosine of the angle.
|
|
Returns the arc sine of the angle.
|
|
Calculate a face normal, no w-information.
|
|
Calculates the tangent space vector for a given set of positions / texture coords. Adapted from bump mapping tutorials at: http://www.paulsprojects.net/tutorials/simplebump/simplebump.html author : paul.baker@univ.ox.ac.uk
|
|
Returns the cosine of the angle.
|
|
Converts degrees to radians.
|
|
Compares float values for equality, taking into consideration that floating point values should never be directly compared using ==. 2 floats could be conceptually equal, but vary by a .000001 which would fail in a direct comparison. To circumvent that, a tolerance value is used to see if the difference between the 2 floats is less than the desired amount of accuracy.
|
|
Inverse square root.
|
|
Used to quickly determine the greater value between two values.
|
|
Used to quickly determine the lesser value between two values.
|
|
Checks wether a given point is inside a triangle, in a 2-dimensional (Cartesian) space. The vertices of the triangle must be given in either trigonometrical (anticlockwise) or inverse trigonometrical (clockwise) order.
|
|
Converts radians to degrees.
|
|
Returns a random value between the specified min and max values.
|
|
Returns the sine of the angle.
|
|
Returns the square root of a number. This is one of the more expensive math operations. Avoid when possible.
|
|
|
|
Returns the tangent of the angle.
|
|
|