- Timestamp:
- Jan 26, 2023, 10:04:39 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psLib.20230123/src/math/psSpline.h
r42319 r42324 35 35 typedef struct 36 36 { 37 unsigned int n; ///< The number of spline pieces38 psF32 *xKnots; ///< x-coordinate of the knots (n+1)39 psF32 *yKnots; ///< y-coordinate of the knots (n+1)40 psF32 *d2yKnots; ///< 2nd derivative of y at the knots (n+1)37 unsigned int n; ///< The number of knots 38 psF32 *xKnots; ///< x-coordinate of the knots 39 psF32 *yKnots; ///< y-coordinate of the knots 40 psF32 *d2yKnots; ///< 2nd derivative of y at the knots 41 41 bool equalSpacing; // if knots are equally spaced, the seqment choice can be optimized 42 42 psF32 xMin; // for equally-spaced knots, the value at the lower bound (xKnots[0]) … … 58 58 float psSpline1DEval( 59 59 const psSpline1D *spline, ///< spline pointer 60 float x ///< location at which to evaluate 61 ); 62 63 /** Evaluates 1-D spline polynomials at a specific coordinate. 64 * 65 * @return float result of spline polynomials evaluated at given location 66 */ 67 float psSpline1DEval_Segment( 68 const psSpline1D *spline, ///< spline pointer 69 int n, // choice of segment 60 70 float x ///< location at which to evaluate 61 71 ); … … 81 91 psSpline1D *psSpline1DFitVector( 82 92 const psVector* x, ///< Ordinates (or NULL to just use the indices) 83 const psVector* y ///< Coordinates 93 const psVector* y, ///< Coordinates. 94 psF32 dyLower, ///< 1st derivative at lower bound 95 psF32 dyUpper ///< 1st derivative at upper bound 84 96 ); 85 97 … … 93 105 psPtr ptr ///< the pointer whose type to check 94 106 ); 107 108 // check for equal spacing and set internal boolean if true 109 bool psSpline1DisEqualSpacing (psSpline1D *spline); 110 111 // convert the cubic spline elements to a simply ordinary polynomial for segment n 112 psPolynomial1D *psSpline1DToPoly (psSpline1D *spline, int n); 95 113 96 114 /*****************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.
