Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/curve.c
| Context not available. | |||||
| /* ~~~~~~~~~~~~~~~~~~~~Non Uniform Rational B Spline calculations ~~~~~~~~~~~ */ | /* ~~~~~~~~~~~~~~~~~~~~Non Uniform Rational B Spline calculations ~~~~~~~~~~~ */ | ||||
| static void calcknots(float *knots, const short pnts, const short order, const short flag) | static void calcknots(float *knots, const int pnts, const short order, const short flag) | ||||
| { | { | ||||
| /* knots: number of pnts NOT corrected for cyclic */ | /* knots: number of pnts NOT corrected for cyclic */ | ||||
| const int pnts_order = pnts + order; | const int pnts_order = pnts + order; | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| static void makecyclicknots(float *knots, short pnts, short order) | static void makecyclicknots(float *knots, int pnts, short order) | ||||
| /* pnts, order: number of pnts NOT corrected for cyclic */ | /* pnts, order: number of pnts NOT corrected for cyclic */ | ||||
| { | { | ||||
| int a, b, order2, c; | int a, b, order2, c; | ||||
| Context not available. | |||||
| makeknots(nu, 2); | makeknots(nu, 2); | ||||
| } | } | ||||
| static void basisNurb(float t, short order, short pnts, float *knots, float *basis, int *start, int *end) | static void basisNurb(float t, short order, int pnts, float *knots, float *basis, int *start, int *end) | ||||
| { | { | ||||
| float d, e; | float d, e; | ||||
| int i, i1 = 0, i2 = 0, j, orderpluspnts, opp2, o2; | int i, i1 = 0, i2 = 0, j, orderpluspnts, opp2, o2; | ||||
| Context not available. | |||||
| basis = basisv; | basis = basisv; | ||||
| curv = totv; | curv = totv; | ||||
| while (curv--) { | while (curv--) { | ||||
| basisNurb(v, nu->orderv, (short)(nu->pntsv + cycl), nu->knotsv, basis, jstart + curv, jend + curv); | basisNurb(v, nu->orderv, nu->pntsv + cycl, nu->knotsv, basis, jstart + curv, jend + curv); | ||||
| basis += KNOTSV(nu); | basis += KNOTSV(nu); | ||||
| v += vstep; | v += vstep; | ||||
| } | } | ||||
| Context not available. | |||||
| u = ustart; | u = ustart; | ||||
| curu = totu; | curu = totu; | ||||
| while (curu--) { | while (curu--) { | ||||
| basisNurb(u, nu->orderu, (short)(nu->pntsu + cycl), nu->knotsu, basisu, &istart, &iend); | basisNurb(u, nu->orderu, nu->pntsu + cycl, nu->knotsu, basisu, &istart, &iend); | ||||
| basis = basisv; | basis = basisv; | ||||
| curv = totv; | curv = totv; | ||||
| Context not available. | |||||
| u = ustart; | u = ustart; | ||||
| while (resolu--) { | while (resolu--) { | ||||
| basisNurb(u, nu->orderu, (short)(nu->pntsu + cycl), nu->knotsu, basisu, &istart, &iend); | basisNurb(u, nu->orderu, nu->pntsu + cycl, nu->knotsu, basisu, &istart, &iend); | ||||
| /* calc sum */ | /* calc sum */ | ||||
| sumdiv = 0.0; | sumdiv = 0.0; | ||||
| Context not available. | |||||
| static void calchandlesNurb_intern(Nurb *nu, int skip_align) | static void calchandlesNurb_intern(Nurb *nu, int skip_align) | ||||
| { | { | ||||
| BezTriple *bezt, *prev, *next; | BezTriple *bezt, *prev, *next; | ||||
| short a; | int a; | ||||
| if (nu->type != CU_BEZIER) | if (nu->type != CU_BEZIER) | ||||
| return; | return; | ||||
| Context not available. | |||||
| void BKE_nurb_handles_test(Nurb *nu, const bool use_handle) | void BKE_nurb_handles_test(Nurb *nu, const bool use_handle) | ||||
| { | { | ||||
| BezTriple *bezt; | BezTriple *bezt; | ||||
| short a; | int a; | ||||
| if (nu->type != CU_BEZIER) | if (nu->type != CU_BEZIER) | ||||
| return; | return; | ||||
| Context not available. | |||||
| /* code==6: Clear align, like 3 but no toggle */ | /* code==6: Clear align, like 3 but no toggle */ | ||||
| Nurb *nu; | Nurb *nu; | ||||
| BezTriple *bezt; | BezTriple *bezt; | ||||
| short a, ok = 0; | int a; | ||||
| short ok = 0; | |||||
| if (code == 1 || code == 2) { | if (code == 1 || code == 2) { | ||||
| nu = editnurb->first; | nu = editnurb->first; | ||||
| Context not available. | |||||