Curve2DPolynomial Class Reference
Implementation of Curve2D. More...
#include <labelingmath.h>
Inheritance diagram for Curve2DPolynomial:
Public Member Functions | |
| Curve2DPolynomial (int degree) | |
| Creates the 3D polynomial. | |
| virtual | ~Curve2DPolynomial () |
| Destructor. Frees all allocated resources. | |
| tgt::vec2 | getCurvePoint (float t) |
| Returns the curve point at parameter t. | |
| tgt::vec2 | getTangent (float t) |
| Returns the tangent vector at parameter t. | |
| float | getTangentMagnitude (float t) |
| Returns the magnitude of the tangent vector at parameter t. | |
| float | getSegmentLength (float t1, float t2) |
| Returns the length of the curve segment between parameters t1 and t2. | |
| tgt::vec2 | getNextPoint (float &curParam, float offset) |
Returns the curve point at parameter t that satisfies the following condition:
| |
| void | shift (tgt::vec2 shiftVector) |
| Shifts the whole curve by shiftVector. | |
| float * | getCoefficientsX () |
| Returns coefficients of x(t) polynomial. | |
| float * | getCoefficientsY () |
| Returns coefficients of y(t) polynomial. | |
Detailed Description
Implementation of Curve2D.
Curve is a polynomial least-squares-fit to the control points.
Definition at line 264 of file labelingmath.h.
Constructor & Destructor Documentation
| Curve2DPolynomial | ( | int | degree | ) |
Creates the 3D polynomial.
- Parameters:
-
degree degree of polynomial
Definition at line 255 of file labelingmath.cpp.
Member Function Documentation
| tgt::vec2 getNextPoint | ( | float & | curParam, | |
| float | offset | |||
| ) | [virtual] |
Returns the curve point at parameter t that satisfies the following condition:
- getSegmentLength(curParam, t) == offset.
- Note:
- This is just an approximation.
- Parameters:
-
c curParam is set to t afterwards.
Implements Curve2D.
Definition at line 344 of file labelingmath.cpp.