#include <rdSprings.h>
Public Member Functions | |
| rdSprings () | |
| Default constructor. | |
| virtual | ~rdSprings () |
| Destructor. | |
Static Public Member Functions | |
| double | Damp (double kv, double v) |
| Compute a linear damping force based on a damping constant, kv, and a velocity, v. | |
| double | Linear (double kx, double dx) |
| Compute a linear spring force based on a spring constant, k, and a deviation from the rest length, dx. | |
| double | Linear (double kx, double x0, double x) |
| Compute a linear spring force based on a spring constant, k, a spring zero, x0, and a spring length, x. | |
| double | DampedLinear (double kv, double v, double kx, double x0, double x) |
| Compute a linear damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, a spring zero, xo, and a spring length, x. | |
| double | ZeroForDampedLinear (double kv, double v, double kx, double x, double f) |
| Compute a spring zero to achieve a given force, f, given a damping constant, kv, a velocity, v, a spring stiffness, kx, and a spring position, x. | |
| double | DisplacementOfDampedLinear (double kv, double v, double kx, double f) |
| Compute the spring length that will achieve a desired stiffness. | |
| double | Quadratic (double kx, double dx) |
| Compute a quadratic spring force based on a spring constant, kx, and a deviation from the rest length, dx. | |
| double | Quadratic (double kx, double x0, double x) |
| Compute a quadratic spring force based on a spring constant, kx, a spring zero, x0, and a spring length, x. | |
| double | DampedQuadratic (double kv, double v, double kx, double dx) |
| Compute a quadratic damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, and a deviation from rest length, dx. | |
| double | DampedQuadratic (double kv, double v, double kx, double x0, double x) |
| Compute a quadratic damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, a spring zero, x0, and a spring length, x. | |
| double | ExponentialBarrier (double v, double dx) |
| Compute an exponential spring force based on the distance, dx, of a point from a plane and the velocity of the point v. | |
| double | ExponentialBarrier (double aG0, double aG1, double aG2, double aE0, double aE1, double aE2, double aKV, double aV, double aDX) |
| Compute an exponential spring force based on the distance, dx, of a point from a plane and the velocity of the point v. | |
| double | ExponentialBarrierDX (double v, double dx) |
| Compute the stiffness of the exponential barrier with respect to changes in x. | |
| double | ExponentialBarrierDX (double aG0, double aG1, double aG2, double aE0, double aE1, double aE2, double aKV, double aV, double aDX) |
| Compute the stiffness of the exponential barrier with respect to changes in x. | |
| double | ExponentialBarrierDV (double v, double dx) |
| Compute the stiffness of the exponential barrier with respect to changes in v. | |
| double | ExponentialBarrierDV (double aG0, double aG1, double aG2, double aE0, double aE1, double aE2, double aKV, double aV, double aDX) |
| Compute the stiffness of the exponential barrier with respect to changes in v. | |
| double | oscillation (double delay, double t, double f) |
| Return an oscilation amplitude as a function of time. | |
|
||||||||||||
|
Compute a linear damping force based on a damping constant, kv, and a velocity, v. The argument kv is assumed to be a non-negative constant. |
|
||||||||||||||||||||||||
|
Compute a linear damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, a spring zero, xo, and a spring length, x. The kv and kx are assumed to be non-negative constants. |
|
||||||||||||||||||||||||
|
Compute a quadratic damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, a spring zero, x0, and a spring length, x. The kv and kx are assumed to be non-negative constants. |
|
||||||||||||||||||||
|
Compute a quadratic damped spring force based on a damping constant, kv, a velocity, v, a spring stiffness, kx, and a deviation from rest length, dx. The kv and kx are assumed to be non-negative constants. |
|
||||||||||||||||||||
|
Compute the spring length that will achieve a desired stiffness.
|
|
||||||||||||||||||||||||||||||||||||||||
|
Compute an exponential spring force based on the distance, dx, of a point from a plane and the velocity of the point v. This spring type is often used to represent a firm floor or a wall. dx is assumed to be a positive quantity. At large dx, the force is negligible. As dx approaches 0.0, the force increases exponentially. v is included so that a damping force can also be computed. The damping force allows numerical integrations to execute more efficiently. The sign of v should be positive if the point is moving away from the barrier (dx increasing), and negative if moving toward the barrier (dx decreasing). |
|
||||||||||||
|
Compute an exponential spring force based on the distance, dx, of a point from a plane and the velocity of the point v. This spring type is often used to represent a firm floor or a wall. dx is assumed to be a positive quantity. At large dx, the force is negligible. As dx approaches 0.0, the force increases exponentially. v is included so that a damping force can also be computed. The damping force allows numerical integrations to execute more efficiently. The sign of v should be positive if the point is moving away from the barrier (dx increasing), and negative if moving toward the barrier (dx decreasing). |
|
||||||||||||||||
|
Compute a linear spring force based on a spring constant, k, a spring zero, x0, and a spring length, x. The argument k is assumed to be a non-negative constant. |
|
||||||||||||
|
Compute a linear spring force based on a spring constant, k, and a deviation from the rest length, dx. dx = x - x0, where x is the length of the spring and x0 is the rest length of the spring. The argument k is assumed to be a non-negative constant. |
|
||||||||||||||||
|
Return an oscilation amplitude as a function of time. The returned amplitued oscillates about 0.0 with an amplitude of 1.0 (i.e., between 0.5 and 1.5) with a frequency of f. If t is less than or equal to delay, 0.0 is returned. |
|
||||||||||||||||
|
Compute a quadratic spring force based on a spring constant, kx, a spring zero, x0, and a spring length, x. The argument kx is assumed to be a non-negative constant. |
|
||||||||||||
|
Compute a quadratic spring force based on a spring constant, kx, and a deviation from the rest length, dx. dx = x - x0, where x is the length of the spring and x0 is the rest length of the spring. The argument kx is assumed to be a non-negative constant. |
|
||||||||||||||||||||||||
|
Compute a spring zero to achieve a given force, f, given a damping constant, kv, a velocity, v, a spring stiffness, kx, and a spring position, x.
|
1.3