00001 #ifndef __nurbs_h__
00002 #define __nurbs_h__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00021 int ay_act_leastSquares(double *Q, int m, int n, int p,
00022 double **U, double **P);
00023
00026 int ay_act_leastSquaresClosed(double *Q, int m, int n, int p,
00027 double **U, double **P);
00028
00031 int ay_act_resize(ay_acurve_object *curve, int new_length);
00032
00035 int ay_act_revert(ay_acurve_object *curve);
00036
00039 int ay_act_getpntfromindex(ay_acurve_object *curve, int index, double **p);
00040
00041
00042
00043
00046 int ay_capt_createfromcurve(ay_object *c, ay_object **cap);
00047
00050 int ay_capt_createfromnpcurve(ay_object *c, ay_object **cap);
00051
00052
00053
00054
00057 int ay_ict_interpolateC2C(int length, double sdlen, double edlen,
00058 int param_type,
00059 int have_end_derivs, double *sderiv, double *ederiv,
00060 double *controlv,
00061 ay_nurbcurve_object **c);
00062
00065 int ay_ict_interpolateC2CClosed(int length, double sdlen, double edlen,
00066 int param_type,
00067 int have_end_derivs, double *sderiv, double *ederiv,
00068 double *controlv,
00069 ay_nurbcurve_object **c);
00070
00073 int ay_ict_interpolateG3D(int iorder, int length, double sdlen, double edlen,
00074 int have_end_derivs, int param_type,
00075 double *controlv, double *sderiv, double *ederiv,
00076 ay_nurbcurve_object **c);
00077
00080 int ay_ict_interpolateG3DClosed(int iorder, int length,
00081 double sdlen, double edlen,
00082 int have_end_derivs, int param_type,
00083 double *controlv,
00084 double *sderiv, double *ederiv,
00085 ay_nurbcurve_object **c);
00086
00089 int ay_ict_resize(ay_icurve_object *curve, int new_length);
00090
00093 int ay_ict_revert(ay_icurve_object *curve);
00094
00097 int ay_ict_getpntfromindex(ay_icurve_object *curve, int index, double **p);
00098
00099
00100
00101
00104 int ay_knots_createnp(ay_nurbpatch_object *patch);
00105
00108 int ay_knots_createnc(ay_nurbcurve_object *curve);
00109
00112 int ay_knots_check(int length, int order, int knot_count, double *knotv);
00113
00116 void ay_knots_printerr(char *location, int errcode);
00117
00120 int ay_knots_rescaletorange(int n, double *knotv, double rmin, double rmax);
00121
00124 int ay_knots_rescaletomindist(int n, double *knotv, double mindist);
00125
00128 int ay_knots_unify(double *Ua, int Ualen, double *Ub, int Ublen,
00129 double **Ubar, int *Ubarlen);
00130
00133 int ay_knots_mergenc(ay_nurbcurve_object *curve, double *Ubar, int Ubarlen);
00134
00137 int ay_knots_mergenp(ay_nurbpatch_object *patch,
00138 double *Ubar, int Ubarlen, double *Vbar, int Vbarlen);
00139
00142 int ay_knots_getuminmax(ay_object *o, int order, int knots, double *knotv,
00143 double *umin, double *umax);
00144
00147 int ay_knots_getvminmax(ay_object *o, int order, int knots, double *knotv,
00148 double *vmin, double *vmax);
00149
00152 int ay_knots_setuminmax(ay_object *o, double umin, double umax);
00153
00156 int ay_knots_setvminmax(ay_object *o, double vmin, double vmax);
00157
00160 int ay_knots_coarsen(int order, int knotvlen, double *knotv, int count,
00161 double **newknotv);
00162
00165 int ay_knots_chordparam(double *Q, int Qlen, int stride, double **U);
00166
00169 int ay_knots_centriparam(double *Q, int Qlen, int stride, double **U);
00170
00173 int ay_knots_init(Tcl_Interp *interp);
00174
00175
00176
00177
00180 int ay_nb_LUDecompose(int n, double *A, int *pivot);
00181
00184 int ay_nb_LUInvert(int n, double *inv, int *pivot);
00185
00188 int ay_nb_GlobalInterpolation4D(int n, double *Q, double *ub, double *Uc,
00189 int d);
00190
00193 int ay_nb_GlobalInterpolation4DD(int n, double *Q, double *ub, double *Uc,
00194 int d, double *D1, double *D2);
00195
00198 int ay_nb_CurveRemoveKnot4D(int n, int p, double *U, double *Pw, double tol,
00199 int r, int s, int num, double *Ubar, double *Qw);
00200
00203 void ay_nb_Bin(int maxn, int maxk, double *bin);
00204
00207 int ay_nb_DegreeElevateCurve(int stride, int n, int p, double *U, double *Pw,
00208 int t, int *nh, double *Uh, double *Qw);
00209
00212 int ay_nb_SolveTridiagonal(int n, double *Q, double *U, double *P);
00213
00216 int ay_nb_CurveInsertKnot4D(int np, int p, double *UP, double *Pw, double u,
00217 int k, int s, int r, int *nq, double *UQ,
00218 double *Qw);
00219
00222 int ay_nb_CurveInsertKnot3D(int np, int p, double *UP, double *P, double u,
00223 int k, int s, int r, int *nq, double *UQ,
00224 double *Q);
00225
00228 int ay_nb_FindSpan(int n, int p, double u, double *U);
00229
00232 int ay_nb_FindSpanMult(int n, int p, double u, double *U, int *s);
00233
00236 void ay_nb_BasisFuns(int i, double u, int p, double *U, double *N);
00237
00240 int ay_nb_CurvePoint4D(int n, int p, double *U, double *Pw, double u,
00241 double *C);
00242
00245 int ay_nb_CurvePoint3D(int n, int p, double *U, double *P, double u,
00246 double *C);
00247
00250 int ay_nb_SurfacePoint4D(int n, int m, int p, int q, double *U, double *V,
00251 double *Pw, double u, double v, double *C);
00252
00255 int ay_nb_SurfacePoint3D(int n, int m, int p, int q, double *U, double *V,
00256 double *P, double u, double v, double *C);
00257
00260 void ay_nb_DersBasisFuns(int i, double u, int p, int n, double *U,
00261 double *ders);
00262
00265 void ay_nb_ComputeFirstDer3D(int n, int p, double *U, double *P, double u,
00266 double *C1);
00267
00270 void ay_nb_ComputeSecDer3D(int n, int p, double *U, double *P, double u,
00271 double *C2);
00272
00275 void ay_nb_ComputeFirstDer4D(int n, int p, double *U, double *Pw, double u,
00276 double *C1);
00277
00280 void ay_nb_ComputeSecDer4D(int n, int p, double *U, double *Pw, double u,
00281 double *C2);
00282
00285 void ay_nb_CompFirstDerSurf4D(int n, int m, int p, int q, double *U, double *V,
00286 double *Pw, double u, double v, double *C);
00287
00290 void ay_nb_CompFirstDerSurf3D(int n, int m, int p, int q, double *U, double *V,
00291 double *P, double u, double v, double *C);
00292
00295 int ay_nb_CreateNurbsCircleArc(double r, double ths, double the,
00296 int *length, double **knotv, double **controlv);
00297
00300 void ay_nb_RefineKnotVectCurve(int stride, int n, int p, double *U, double *Pw,
00301 double *X, int r, double *Ubar, double *Qw);
00302
00305 int ay_nb_DegreeElevateSurfU(int stride, int w, int h, int p, double *U,
00306 double *Pw, int t,
00307 int *nw, double *Uh, double *Qw);
00308
00311 int ay_nb_DegreeElevateSurfV(int stride, int w, int h, int p, double *V,
00312 double *Pw, int t,
00313 int *nh, double *Vh, double *Qw);
00314
00317 int ay_nb_RefineKnotVectSurfU(int stride, int w, int h, int p, double *U,
00318 double *Pw, double *X, int r,
00319 double *Ubar, double *Qw);
00320
00323 int ay_nb_RefineKnotVectSurfV(int stride, int w, int h, int p, double *V,
00324 double *Pw, double *X, int r,
00325 double *Vbar, double *Qw);
00326
00329 int ay_nb_DecomposeCurve(int stride, int n, int p, double *U, double *Pw,
00330 int *nb, double **Qw);
00331
00334 int ay_nb_InsertKnotSurfU(int stride, int w, int h, int p, double *UP,
00335 double *Pw,
00336 double u, int k, int s, int r,
00337 double *UQ, double *Qw);
00338
00341 int ay_nb_InsertKnotSurfV(int stride, int w, int h, int q, double *VP,
00342 double *Pw,
00343 double v, int k, int s, int r,
00344 double *VQ, double *Qw);
00345
00346
00347
00348
00351 int ay_nct_create(int order, int length, int knot_type,
00352 double *controlv, double *knotv,
00353 ay_nurbcurve_object **curveptr);
00354
00357 int ay_nct_destroy(ay_nurbcurve_object *curve);
00358
00361 void ay_nct_clearmp(ay_nurbcurve_object *c);
00362
00365 int ay_nct_recreatemp(ay_nurbcurve_object *c);
00366
00369 int ay_nct_collapseselp(ay_object *o);
00370
00373 int ay_nct_explodemp(ay_object *o);
00374
00377 int ay_nct_resize(ay_nurbcurve_object *curve, int new_length);
00378
00381 int ay_nct_close(ay_nurbcurve_object *curve);
00382
00385 int ay_nct_revert(ay_nurbcurve_object *curve);
00386
00389 int ay_nct_refine(ay_nurbcurve_object *curve, double *newknotv,
00390 int newknotvlen);
00391
00394 int ay_nct_refinetcmd(ClientData clientData, Tcl_Interp *interp,
00395 int argc, char *argv[]);
00396
00399 int ay_nct_clampperiodic(ay_nurbcurve_object *curve);
00400
00403 int ay_nct_clamp(ay_nurbcurve_object *curve, int side);
00404
00407 int ay_nct_clamptcmd(ClientData clientData, Tcl_Interp *interp,
00408 int argc, char *argv[]);
00409
00412 int ay_nct_elevate(ay_nurbcurve_object *curve, int new_order);
00413
00416 int ay_nct_elevatetcmd(ClientData clientData, Tcl_Interp *interp,
00417 int argc, char *argv[]);
00418
00421 int ay_nct_insertkntcmd(ClientData clientData, Tcl_Interp *interp,
00422 int argc, char *argv[]);
00423
00426 int ay_nct_collapsetcmd(ClientData clientData, Tcl_Interp *interp,
00427 int argc, char *argv[]);
00428
00431 int ay_nct_explodetcmd(ClientData clientData, Tcl_Interp *interp,
00432 int argc, char *argv[]);
00433
00436 int ay_nct_findu(struct Togl *togl, ay_object *o,
00437 double *winXY, double *worldXYZ, double *u);
00438
00441 int ay_nct_finducb(struct Togl *togl, int argc, char *argv[]);
00442
00445 int ay_nct_split(ay_object *src, double u, ay_object **result);
00446
00449 int ay_nct_splittcmd(ClientData clientData, Tcl_Interp *interp,
00450 int argc, char *argv[]);
00451
00454 int ay_nct_concattcmd(ClientData clientData, Tcl_Interp *interp,
00455 int argc, char *argv[]);
00456
00459 int ay_nct_crtncircle(double radius, ay_nurbcurve_object **curve);
00460
00463 int ay_nct_crtncirclearc(double radius, double arc,
00464 ay_nurbcurve_object **curve);
00465
00468 int ay_nct_crtnhcircle(double radius, ay_nurbcurve_object **curve);
00469
00472 int ay_nct_crtncircletcmd(ClientData clientData, Tcl_Interp *interp,
00473 int argc, char *argv[]);
00474
00477 int ay_nct_crtrecttcmd(ClientData clientData, Tcl_Interp *interp,
00478 int argc, char *argv[]);
00479
00482 int ay_nct_crtcircbsp(int sections, double radius, double arc, int order,
00483 ay_nurbcurve_object **result);
00484
00487 int ay_nct_crtclosedbsptcmd(ClientData clientData, Tcl_Interp *interp,
00488 int argc, char *argv[]);
00489
00492 int ay_nct_getorientation(ay_nurbcurve_object *curve, double *oangle);
00493
00496 int ay_nct_isclosed(ay_nurbcurve_object *nc);
00497
00500 int ay_nct_settype(ay_nurbcurve_object *nc);
00501
00504 int ay_nct_applytrafo(ay_object *c);
00505
00508 int ay_nct_getpntfromindex(ay_nurbcurve_object *curve, int index, double **p);
00509
00512 int ay_nct_concatmultiple(int closed, int knot_type, int fillgaps,
00513 ay_object *curves,
00514 ay_object **result);
00515
00518 int ay_nct_fillgap(int order, double tanlen,
00519 ay_nurbcurve_object *c1, ay_nurbcurve_object *c2,
00520 ay_object **result);
00521
00524 int ay_nct_fillgaps(int closed, int order, double tanlen, ay_object *curves);
00525
00528 int ay_nct_arrange(ay_object *o, ay_object *t, int rotate);
00529
00532 int ay_nct_rescaleknvtcmd(ClientData clientData, Tcl_Interp *interp,
00533 int argc, char *argv[]);
00534
00537 double ay_nct_getcurvature(ay_nurbcurve_object *c, double t);
00538
00541 int ay_nct_curvplottcmd(ClientData clientData, Tcl_Interp *interp,
00542 int argc, char *argv[]);
00543
00546 int ay_nct_intersect(ay_nurbcurve_object *cu, ay_nurbcurve_object *cv,
00547 double *intersection);
00548
00551 int ay_nct_intersectca(ay_object *cu, ay_object *cv, double *intersections);
00552
00555 int ay_nct_makecompatible(ay_object *curves);
00556
00559 int ay_nct_shiftcbs(ay_nurbcurve_object *curve);
00560
00563 int ay_nct_shiftcbstcmd(ClientData clientData, Tcl_Interp *interp,
00564 int argc, char *argv[]);
00565
00568 int ay_nct_toxy(ay_object *c);
00569
00572 int ay_nct_toxytcmd(ClientData clientData, Tcl_Interp *interp,
00573 int argc, char *argv[]);
00574
00577 int ay_nct_makecomptcmd(ClientData clientData, Tcl_Interp *interp,
00578 int argc, char *argv[]);
00579
00582 void ay_nct_findufrompoint(ay_nurbcurve_object *curve, double *point,
00583 double guess, int max_try, double e1, double e2,
00584 double *u);
00585
00588 int ay_nct_israt(ay_nurbcurve_object *curve);
00589
00592 int ay_nct_center(int mode, ay_nurbcurve_object *curve);
00593
00596 int ay_nct_centertcmd(ClientData clientData, Tcl_Interp *interp,
00597 int argc, char *argv[]);
00598
00601 int ay_nct_coarsen(ay_nurbcurve_object *curve);
00602
00605 int ay_nct_coarsentcmd(ClientData clientData, Tcl_Interp *interp,
00606 int argc, char *argv[]);
00607
00610 int ay_nct_removekntcmd(ClientData clientData, Tcl_Interp *interp,
00611 int argc, char *argv[]);
00612
00615 int ay_nct_trimtcmd(ClientData clientData, Tcl_Interp *interp,
00616 int argc, char *argv[]);
00617
00620 int ay_nct_trim(ay_nurbcurve_object **curve, double umin, double umax);
00621
00624 int ay_nct_isdegen(ay_nurbcurve_object *curve);
00625
00628 int ay_nct_offset(ay_object *o, int mode, double offset,
00629 ay_nurbcurve_object **nc);
00630
00633 int ay_nct_cmppnt(const void *p1, const void *p2);
00634
00637 int ay_nct_cmppntp(const void *p1, const void *p2);
00638
00641 int ay_nct_estlen(ay_nurbcurve_object *nc, double *len);
00642
00645 int ay_nct_estlentcmd(ClientData clientData, Tcl_Interp *interp,
00646 int argc, char *argv[]);
00647
00650 int ay_nct_reparamtcmd(ClientData clientData, Tcl_Interp *interp,
00651 int argc, char *argv[]);
00652
00653
00654
00655
00658 int ay_npt_create(int uorder, int vorder, int width, int height,
00659 int uknot_type, int vknot_type,
00660 double *controlv, double *uknotv, double *vknotv,
00661 ay_nurbpatch_object **patchptr);
00662
00665 int ay_npt_destroy(ay_nurbpatch_object *patch);
00666
00669 int ay_npt_createnpatchobject(ay_object **result);
00670
00673 int ay_npt_resizearrayw(double **controlvptr, int stride,
00674 int width, int height, int new_width);
00675
00678 int ay_npt_resizew(ay_nurbpatch_object *np, int new_width);
00679
00682 int ay_npt_resizearrayh(double **controlvptr, int stride,
00683 int width, int height, int new_height);
00684
00687 int ay_npt_resizeh(ay_nurbpatch_object *np, int new_height);
00688
00691 int ay_npt_revertu(ay_nurbpatch_object *np);
00692
00695 int ay_npt_revertutcmd(ClientData clientData, Tcl_Interp *interp,
00696 int argc, char *argv[]);
00697
00700 int ay_npt_revertv(ay_nurbpatch_object *np);
00701
00704 int ay_npt_revertvtcmd(ClientData clientData, Tcl_Interp *interp,
00705 int argc, char *argv[]);
00706
00709 int ay_npt_swaparray(double **controlvptr, int stride,
00710 int width, int height);
00711
00714 int ay_npt_swapuv(ay_nurbpatch_object *np);
00715
00718 int ay_npt_drawtrimcurve(struct Togl *togl, ay_object *o, GLUnurbsObj *no);
00719
00722 int ay_npt_wribtrimcurves(ay_object *o);
00723
00726 int ay_npt_crtcobbsphere(ay_nurbpatch_object **cobbsphere);
00727
00730 int ay_npt_crtnsphere(double radius, ay_nurbpatch_object **nsphere);
00731
00734 int ay_npt_crtnspheretcmd(ClientData clientData, Tcl_Interp *interp,
00735 int argc, char *argv[]);
00736
00739 int ay_npt_crtnsphere2tcmd(ClientData clientData, Tcl_Interp *interp,
00740 int argc, char *argv[]);
00741
00744 int ay_npt_splittocurvesu(ay_object *o, int apply_trafo,
00745 ay_object **curves, ay_object ***last);
00746
00749 int ay_npt_splittocurvesv(ay_object *o, int apply_trafo,
00750 ay_object **curves, ay_object ***last);
00751
00754 int ay_npt_splittocurvestcmd(ClientData clientData, Tcl_Interp *interp,
00755 int argc, char *argv[]);
00756
00757
00760 int ay_npt_buildfromcurves(ay_list_object *curves, int ncurves, int type,
00761 int knot_type, int apply_trafo,
00762 ay_object **patch);
00763
00764
00767 int ay_npt_buildfromcurvestcmd(ClientData clientData, Tcl_Interp *interp,
00768 int argc, char *argv[]);
00769
00772 int ay_npt_concat(ay_object *o, int type, int knot_type, int fillet_type,
00773 ay_object **result);
00774
00775
00778 int ay_npt_revolve(ay_object *o, double arc, int sections, int order,
00779 ay_nurbpatch_object **revolution);
00780
00783 int ay_npt_swing(ay_object *o1, ay_object *o2,
00784 ay_nurbpatch_object **swing);
00785
00788 int ay_npt_sweep(ay_object *o1, ay_object *o2, ay_object *o3, int sections,
00789 int rotate, int closed, ay_nurbpatch_object **sweep,
00790 int has_start_cap, ay_object **start_cap,
00791 int has_end_cap, ay_object **end_cap);
00792
00795 int ay_npt_closedsweep(ay_object *o1, ay_object *o2, ay_object *o3,
00796 int sections, int rotate,
00797 ay_nurbpatch_object **closedsweep);
00798
00801 int ay_npt_birail1(ay_object *o1, ay_object *o2, ay_object *o3, int sections,
00802 int closed, ay_nurbpatch_object **birail1,
00803 int has_start_cap, ay_object **start_cap,
00804 int has_end_cap, ay_object **end_cap);
00805
00808 int ay_npt_birail2(ay_object *o1, ay_object *o2, ay_object *o3, ay_object *o4,
00809 ay_object *o5,
00810 int sections, int closed, int fullinterpolctrl,
00811 ay_nurbpatch_object **birail2,
00812 int has_start_cap, ay_object **start_cap,
00813 int has_end_cap, ay_object **end_cap);
00814
00817 int ay_npt_interpolateu(ay_nurbpatch_object *np, int order);
00818
00821 int ay_npt_interpolatev(ay_nurbpatch_object *np, int order);
00822
00825 int ay_npt_skinu(ay_object *curves, int order, int knot_type,
00826 int interpolate, ay_nurbpatch_object **skin);
00827
00830 int ay_npt_skinv(ay_object *curves, int order, int knot_type,
00831 int interpolate, ay_nurbpatch_object **skin);
00832
00835 int ay_npt_extrude(double height, ay_object *o,
00836 ay_nurbpatch_object **extrusion);
00837
00840 int ay_npt_gettangentfromcontrol2D(int ctype, int n, int p, int stride,
00841 double *P, int a, double *T);
00842
00845 int ay_npt_getnormalfromcontrol3D(int ctype, int n, int p,
00846 int stride, double *P, int a, double *N);
00847
00850 int ay_npt_bevel(int type, double radius, int align, ay_object *o,
00851 ay_nurbpatch_object **bevel);
00852
00855 int ay_npt_createcap(double z, ay_nurbcurve_object *curve,
00856 double *ominx, double *omaxx,
00857 double *ominy, double *omaxy, double *oangle,
00858 ay_nurbpatch_object **cap);
00859
00862 int ay_npt_applytrafo(ay_object *p);
00863
00866 int ay_npt_getpntfromindex(ay_nurbpatch_object *patch, int indexu, int indexv,
00867 double **p);
00868
00871 int ay_npt_elevateu(ay_nurbpatch_object *patch, int t);
00872
00875 int ay_npt_elevateutcmd(ClientData clientData, Tcl_Interp *interp,
00876 int argc, char *argv[]);
00877
00880 int ay_npt_elevatev(ay_nurbpatch_object *patch, int t);
00881
00884 int ay_npt_elevatevtcmd(ClientData clientData, Tcl_Interp *interp,
00885 int argc, char *argv[]);
00886
00889 int ay_npt_swapuvtcmd(ClientData clientData, Tcl_Interp *interp,
00890 int argc, char *argv[]);
00891
00894 int ay_npt_gordon(ay_object *cu, ay_object *cv, ay_object *in,
00895 int uorder, int vorder,
00896 ay_nurbpatch_object **gordon);
00897
00900 int ay_npt_gordonmodw(ay_object *o1, ay_object *o2);
00901
00904 int ay_npt_gordoncc(ay_object *o1, ay_object *o2, int stride,
00905 double *p1, double *p2, double *pp1, double *pp2,
00906 double *m1, double *m2);
00907
00910 int ay_npt_gordonwc(ay_object *g);
00911
00914 int ay_npt_extractboundary(ay_object *o, int apply_trafo,
00915 ay_nurbcurve_object **result);
00916
00919 int ay_npt_extractmiddlepoint(double *cv, int width, int height, int stride,
00920 int index, int side,
00921 double *result);
00922
00925 int ay_npt_extractnc(ay_object *npatch, int side, double param, int relative,
00926 int apply_trafo,
00927 ay_nurbcurve_object **result);
00928
00931 int ay_npt_israt(ay_nurbpatch_object *np);
00932
00935 int ay_npt_isboundcurve(ay_object *o,
00936 double b1, double b2, double b3, double b4,
00937 int *result);
00938
00941 int ay_npt_istrimmed(ay_object *o, int mode);
00942
00945 int ay_npt_closeu(ay_nurbpatch_object *np);
00946
00949 int ay_npt_closeutcmd(ClientData clientData, Tcl_Interp *interp,
00950 int argc, char *argv[]);
00951
00954 int ay_npt_closev(ay_nurbpatch_object *np);
00955
00958 int ay_npt_closevtcmd(ClientData clientData, Tcl_Interp *interp,
00959 int argc, char *argv[]);
00960
00963 void ay_npt_clearmp(ay_nurbpatch_object *np);
00964
00967 int ay_npt_recreatemp(ay_nurbpatch_object *np);
00968
00971 int ay_npt_collapseselp(ay_object *o);
00972
00975 int ay_npt_explodemp(ay_object *o);
00976
00979 int ay_npt_getbeveltags(ay_object *o, int place,
00980 int *has_bevel, int *type, double *radius, int *sense);
00981
00984 int ay_npt_copytptag(ay_object *src, ay_object *dst);
00985
00988 int ay_npt_clampu(ay_nurbpatch_object *np, int side);
00989
00992 int ay_npt_clamputcmd(ClientData clientData, Tcl_Interp *interp,
00993 int argc, char *argv[]);
00994
00997 int ay_npt_clampv(ay_nurbpatch_object *np, int side);
00998
01001 int ay_npt_clampvtcmd(ClientData clientData, Tcl_Interp *interp,
01002 int argc, char *argv[]);
01003
01006 int ay_npt_rescaletrims(ay_object *trim,
01007 int mode, double omin, double omax,
01008 double nmin, double nmax);
01009
01012 int ay_npt_rescaleknvnptcmd(ClientData clientData, Tcl_Interp *interp,
01013 int argc, char *argv[]);
01014
01017 int ay_npt_insertknutcmd(ClientData clientData, Tcl_Interp *interp,
01018 int argc, char *argv[]);
01019
01022 int ay_npt_insertknvtcmd(ClientData clientData, Tcl_Interp *interp,
01023 int argc, char *argv[]);
01024
01027 int ay_npt_splitu(ay_object *src, double u, ay_object **result);
01028
01031 int ay_npt_splitutcmd(ClientData clientData, Tcl_Interp *interp,
01032 int argc, char *argv[]);
01033
01036 int ay_npt_splitv(ay_object *src, double v, ay_object **result);
01037
01040 int ay_npt_splitvtcmd(ClientData clientData, Tcl_Interp *interp,
01041 int argc, char *argv[]);
01042
01045 int ay_npt_extractnp(ay_object *src, double umin, double umax,
01046 double vmin, double vmax, int relative,
01047 ay_object **result);
01048
01051 int ay_npt_extractnptcmd(ClientData clientData, Tcl_Interp *interp,
01052 int argc, char *argv[]);
01053
01056 void ay_npt_gnd(char dir, ay_nurbpatch_object *np, int ind, double *p,
01057 double **dp);
01058
01061 int ay_npt_offset(ay_object *o, int mode, double offset,
01062 ay_nurbpatch_object **np);
01063
01066 int ay_npt_isclosednp(ay_nurbpatch_object *np, int *closedu, int *closedv);
01067
01068
01071 int ay_npt_finduv(struct Togl *togl, ay_object *o,
01072 double *winXY, double *worldXYZ, double *u, double *v);
01073
01076 int ay_npt_finduvcb(struct Togl *togl, int argc, char *argv[]);
01077
01078
01079
01080
01083 int ay_pmt_tonpatch(ay_pamesh_object *pamesh, ay_object **result);
01084
01087 int ay_pmt_valid(ay_pamesh_object *pamesh, int *detail);
01088
01091 int ay_pmt_getpntfromindex(ay_pamesh_object *patch, int indexu, int indexv,
01092 double **p);
01093
01096 int ay_pmt_swapuv(ay_pamesh_object *pm);
01097
01100 int ay_pmt_revertu(ay_pamesh_object *pm);
01101
01104 int ay_pmt_revertv(ay_pamesh_object *pm);
01105
01106
01107
01108
01111 int ay_stess_destroy(ay_nurbpatch_object *np);
01112
01115 int ay_stess_GetQF(double gst);
01116
01119 int ay_stess_CurvePoints2D(int n, int p, double *U, double *Pw, int is_rat,
01120 int qf, int *Clen, double **C);
01121
01124 int ay_stess_CurvePoints3D(int n, int p, double *U, double *Pw, int is_rat,
01125 int qf, int *Clen, double **C);
01126
01129 int ay_stess_SurfacePoints3D(int n, int m, int p, int q, double *U, double *V,
01130 double *P, int qf, int *Cn, int *Cm, double **C);
01131
01134 int ay_stess_SurfacePoints4D(int n, int m, int p, int q, double *U, double *V,
01135 double *P, int qf, int *Cn, int *Cm, double **C);
01136
01139 int ay_stess_DrawTrimmedSurface(ay_object *o);
01140
01143 int ay_stess_ShadeTrimmedSurface(ay_object *o);
01144
01147 int ay_stess_TessNP(ay_object *o, int qf);
01148
01149
01150
01151
01154 int ay_tess_npatch(ay_object *o,
01155 int smethod, double sparamu, double sparamv,
01156 int use_tc, char *myst,
01157 int use_vc, char *mycs,
01158 int use_vn, char *myn,
01159 ay_object **pm);
01160
01163 int ay_tess_npatchtcmd(ClientData clientData, Tcl_Interp *interp,
01164 int argc, char *argv[]);
01165
01168 int ay_tess_pomeshf(ay_pomesh_object *pomesh,
01169 unsigned int f, unsigned int m, unsigned int n,
01170 int optimize,
01171 ay_pomesh_object **trpomesh);
01172
01175 int ay_tess_pomesh(ay_pomesh_object *pomesh, int optimize,
01176 ay_pomesh_object **trpomesh);
01177
01180 #endif