#include <rdMath.h>
Static Public Member Functions | |
| double | CopySign (double aMag, double aSign) |
| Return the magnitude of aMag with the sign of aSign. | |
| bool | IsZero (double aValue) |
| Return wheter or not an argument is closer to zero than the constant rdMath::ZERO. | |
| double | SigmaUp (double tau, double to, double t) |
| A smooth step-up function using exponentials. | |
| double | SigmaDn (double tau, double to, double t) |
| A smooth step-down function using exponentials. | |
| int | FitParabola (double aX1, double aY1, double aX2, double aY2, double aX3, double aY3, double *rC0, double *rC1, double *rC2) |
| Fit a parabola of the form y = c0 + c1*x + c2*x^2 to three points (x1,y1), (x2,y2), (x3,y3). | |
| int | ComputeIntersection (const rdLine *aLine, const rdPlane *aPlane, double rPoint[3]) |
| Compute the intersection of a line with a plane. | |
| void | ComputeNormal (double aP1X, double aP1Y, double aP1Z, double aP2X, double aP2Y, double aP2Z, double aP3X, double aP3Y, double aP3Z, double rNormal[3]) |
| Compute a normal to the plane described by three points (P1, P2, P3). | |
Static Public Attributes | |
| const double | PI = acos(-1.0) |
| const double | RTD = 180.0/PI |
| const double | DTR = PI/180.0 |
| const double | SMALL = 1.0e-8 |
| const double | ZERO = 1.0e-14 |
| const double | NAN = 1.357931415e-29 |
| const double | INFINITY = 1.0e30 |
| const double | MINUS_INFINITY = -INFINITY |
| const double | PLUS_INFINITY = INFINITY |
|
||||||||||||||||
|
Compute the intersection of a line with a plane. The line and plane can either intersect at a point, not intersect at all, or be coincident.
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Compute a normal to the plane described by three points (P1, P2, P3). The normal is computed by taking the cross product: n = (p2-p1) x (p3-p2) / | (p2-p1) x (p3-p2) | The three points should be distinct.
|
|
||||||||||||
|
Return the magnitude of aMag with the sign of aSign. Note that if aSign has a value of 0.0, or aMag has a value of 0.0, the sign of aMag is not changed.
|
|
||||||||||||||||||||||||||||||||||||||||
|
Fit a parabola of the form y = c0 + c1*x + c2*x^2 to three points (x1,y1), (x2,y2), (x3,y3). It is required that x3 > x2 > x1. If this condition is not met, -1 is returned. Otherwise, 0 is returned. To imporove numerical accuracy, the independent variables are mapped to a new set of variables such that x1 -> 1.0, x3 -> 2.0, and x2 is mapped to some number in between. |
|
|
Return wheter or not an argument is closer to zero than the constant rdMath::ZERO.
|
|
||||||||||||||||
|
A smooth step-down function using exponentials.
|
|
||||||||||||||||
|
A smooth step-up function using exponentials.
|
1.3