|
Motive Animation System
An open source project by
FPL.
|
Represent a curve containing an ease in and ease out quadratic curve. More...
#include <curve_util.h>
Represent a curve containing an ease in and ease out quadratic curve.
This class parameterizes two curves: ease-in followed by ease-out. The ease-in curve ends after intersection_x, and the ease-out curve matches the ease-in curve's value and derivative at that x. The ease-in curve begins at x = 0. The ease-out curve ends at x = total_x.
Public Member Functions | |
| QuadraticEaseInEaseOut (const QuadraticCurve &in, const QuadraticCurve &out, float intersection_x, float total_x) | |
| QuadraticEaseInEaseOut (const QuadraticCurve &in, float end_x) | |
| float | Evaluate (float x) const |
| Return the curve's value at x. | |
| float | Derivative (float x) const |
| Return the curve's derivative at 'x'. | |
| float | SecondDerivative (float x) const |
| float | ThirdDerivative (float x) const |
| float | intersection_x () const |
| Return the x at which in_curve and out_curve intersect. | |
| float | total_x () const |
| Return the x where the curve reaches its end_value. | |
| const QuadraticCurve & | in_curve () const |
| Return the in_curve. | |
| const QuadraticCurve & | out_curve () const |
| Return the out_curve. | |
| const QuadraticCurve & | Curve (float x) const |
| bool | operator== (const QuadraticEaseInEaseOut &rhs) const |
| Equality. Checks for exact match. Useful for testing. | |
| bool | operator!= (const QuadraticEaseInEaseOut &rhs) const |
|
inline |
Return either the in_curve or the out_curve, depending on if x is before or after intersection_x.
|
inline |
Return the curve's second derivative at 'x' using either the in_curve or out_curve.
|
inline |
Return the quadratic function's third derivative: 0. Even though x is unused, we pass it in for consistency with other curve classes.