|
void | _CalcKnot (T Tf) |
|
bool | _CurveDerivsAlg1V (T **CK, T u, int d) |
|
bool | _BasisFunsDers (T **ders, T u, int n) |
|
bool | _BasisFunsDers (T **ders, int span, T u, int n) |
|
void | _BasisFuns (T *N, T u) |
|
void | _BasisFuns (T *N, int span, T u) |
|
T | _Left (int i, int j, T u) |
|
T | _Right (int i, int j, T u) |
|
bool | _findSpan (int &ret, T u) |
|
void | _CalcConstrainedCPoints (T *init, T *fin, T Tf) |
|
void | _PrintCP (int i) |
|
void | _CalcCPoints (T **middle_pt) |
|
template<typename T, int DIM, int DEGREE, int NUM_MIDDLE, int CONST_LEVEL_INI, int CONST_LEVEL_FIN>
class BS_Basic< T, DIM, DEGREE, NUM_MIDDLE, CONST_LEVEL_INI, CONST_LEVEL_FIN >
Basic Bspline
DIM : Dimension of control points
DEGREE : Derivation is going to be 0 when it is over DEGREE
NUM_MIDDLE : Num middle points (the points except initial and final)
CONST_LEVEL_INI/FIN : constraint level
0: position
1: + velocity
2: + acceleration
****************************** WARNING ***********************************************
NumKnots(DEGREE + NUM_MIDDLE + 2 + CONST_LEVEL_INI + CONST_LEVEL_FIN) >= 2 * (DEGREE + 1)
****************************** WARNING ***********************************************
Definition at line 35 of file BSplineBasic.h.
template<typename T, int DIM, int DEGREE, int NUM_MIDDLE, int CONST_LEVEL_INI, int CONST_LEVEL_FIN>
bool BS_Basic< T, DIM, DEGREE, NUM_MIDDLE, CONST_LEVEL_INI, CONST_LEVEL_FIN >::getCurveDerPoint |
( |
T |
u, |
|
|
int |
d, |
|
|
T * |
ret |
|
) |
| |
|
inline |
get spline derivative information at the given time
If the input time is before 0, it returns the initial
If the input time is after the final time, it returns the final
- Parameters
-
u | : time
|
d | : drivative level (e.g. 1: velocity, 2: acceleration)
|
- Returns
- ret : derivative information at the given time.
Definition at line 115 of file BSplineBasic.h.
116 if (d > DEGREE)
return 0.0;
124 T** _CK =
new T*[d + 1];
125 for (
int i(0); i < d + 1; ++i) {
129 for (
int m(0); m < DIM; ++m) ret[m] = _CK[d][m];
131 for (
int p(0); p < d + 1; ++p)
delete[] _CK[p];
135 for (
int p(0); p < d + 1; ++p)
delete[] _CK[p];
bool _CurveDerivsAlg1V(T **CK, T u, int d)
#define SP_SAFE_DELETE_AR(p)
T Knots_[DEGREE+NUM_MIDDLE+2+CONST_LEVEL_INI+CONST_LEVEL_FIN+1]
template<typename T, int DIM, int DEGREE, int NUM_MIDDLE, int CONST_LEVEL_INI, int CONST_LEVEL_FIN>
bool BS_Basic< T, DIM, DEGREE, NUM_MIDDLE, CONST_LEVEL_INI, CONST_LEVEL_FIN >::getCurvePoint |
( |
T |
u, |
|
|
T * |
ret |
|
) |
| |
|
inline |
get spline position at the given time
If the input time is before 0, it returns the initial
If the input time is after the final time, it returns the final
- Parameters
-
- Returns
- ret : position at the given time.
Definition at line 78 of file BSplineBasic.h.
94 for (
int j(0); j < DIM; ++j) {
96 for (
int i(0); i <= DEGREE; ++i) {
97 _C[j] += _N[i] *
CPoints_[_span - DEGREE + i][j];
101 for (
int i(0); i < DIM; ++i) {
bool _findSpan(int &ret, T u)
void _BasisFuns(T *N, T u)
T Knots_[DEGREE+NUM_MIDDLE+2+CONST_LEVEL_INI+CONST_LEVEL_FIN+1]
T CPoints_[NUM_MIDDLE+2+CONST_LEVEL_INI+CONST_LEVEL_FIN][DIM]
template<typename T, int DIM, int DEGREE, int NUM_MIDDLE, int CONST_LEVEL_INI, int CONST_LEVEL_FIN>
bool BS_Basic< T, DIM, DEGREE, NUM_MIDDLE, CONST_LEVEL_INI, CONST_LEVEL_FIN >::SetParam |
( |
T * |
init, |
|
|
T * |
fin, |
|
|
T ** |
middle_pt, |
|
|
T |
fin_time |
|
) |
| |
|
inline |
size of T: DIM * CONST_LEVEL_INI (or CONST_LEVEL_FIN)
ex) if dim:3, const level ini: 3(pos, vel, acc)
ini[0 ~ 2]: pos
ini[3 ~ 5]: vel
ini[6 ~ 8]: acc
- Parameters
-
init | : initial point information (vector)
|
fin | : finial point information (vector)
|
middle_pt | : middle point information (matrix)
|
fin_time | : duration of the spline
|
- Returns
- boolean : success
Definition at line 63 of file BSplineBasic.h.
void _CalcConstrainedCPoints(T *init, T *fin, T Tf)
void _CalcCPoints(T **middle_pt)