00001 #ifndef __ayam_h__
00002 #define __ayam_h__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <limits.h>
00020 #include <float.h>
00021 #include <math.h>
00022 #include <stdlib.h>
00023 #include <stdio.h>
00024 #include <string.h>
00025 #include <errno.h>
00026
00027 #ifdef WIN32
00028 #define WIN32_LEAN_AND_MEAN
00029 #include <windows.h>
00030 #undef WIN32_LEAN_AND_MEAN
00031 #endif
00032
00033 #ifdef WIN64
00034 #define WIN64_LEAN_AND_MEAN
00035 #include <windows.h>
00036 #undef WIN64_LEAN_AND_MEAN
00037 #endif
00038
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042
00043 #ifdef AYWITHAQUA
00044 #include <OpenGL/glu.h>
00045 #ifdef __cplusplus
00046 typedef GLvoid (*_GLUfuncptr)();
00047 #else
00048 typedef GLvoid (*_GLUfuncptr)(GLvoid);
00049 #endif
00050 #define AYLOCALGLUQUADOBJ 1
00051 #else
00052 #include <GL/glu.h>
00053 #endif
00054
00055
00056
00057
00058 #include <togl.h>
00059
00060
00061
00062
00063
00064
00065 #ifdef AYUSEAFFINE
00066
00067 #include <ripriv.h>
00068 #endif
00069
00070 #ifdef AYUSEBMRTRIBOUT
00071 #include <ri.h>
00072 #endif
00073
00074 #ifdef AYUSEAQSISRIB
00075 #include <ri.h>
00076 #endif
00077
00078 #ifdef AYUSESLARGS
00079 #include <sl.h>
00080 #endif
00081
00082 #ifdef AYUSESLCARGS
00083 #include <slc.h>
00084 #endif
00085
00086 #ifdef AYUSESLOARGS
00087 #include <slo.h>
00088 #endif
00089
00090 #ifdef AYUSESOARGS
00091 #include <so.h>
00092 #endif
00093
00094 #ifdef AYUSESLXARGS
00095 #include <slx.h>
00096 #endif
00097
00098 #ifndef __sgi
00099 #define AYGLUCBTYPE (_GLUfuncptr)
00100 #else
00101 #define AYGLUCBTYPE
00102 #endif
00103
00104 #ifdef WIN32
00105 #undef AYGLUCBTYPE
00106 #define AYGLUCBTYPE (GLUnurbsErrorProc)
00107 #ifdef AYMESASGIGLU
00108 #undef AYGLUCBTYPE
00109 #define AYGLUCBTYPE (_GLUfuncptr)
00110 #endif
00111 #endif
00112
00113 #ifdef WIN64
00114 #undef AYGLUCBTYPE
00115 #define AYGLUCBTYPE (GLUnurbsErrorProc)
00116 #ifdef AYMESASGIGLU
00117 #undef AYGLUCBTYPE
00118 #define AYGLUCBTYPE (_GLUfuncptr)
00119 #endif
00120 #endif
00121
00122
00123
00124
00126 typedef struct ay_point_s
00127 {
00128 struct ay_point_s *next;
00129 char type;
00130 char readonly;
00131 double *point;
00132 unsigned int index;
00133 } ay_point;
00134
00135
00137 typedef struct ay_mpoint_s
00138 {
00139 struct ay_mpoint_s *next;
00140 int multiplicity;
00141 int selected;
00142 double **points;
00143 unsigned int *indices;
00144 } ay_mpoint;
00145
00146
00148 typedef struct ay_pointedit_s
00149 {
00150 unsigned int num;
00151 double **coords;
00152 unsigned int *indices;
00153 char type;
00154 char readonly;
00155 char multiple;
00156 } ay_pointedit;
00157
00158
00160 typedef struct ay_tag_s
00161 {
00162 struct ay_tag_s *next;
00163 char is_intern;
00164 char is_binary;
00165 char *name;
00166 unsigned int type;
00167 void *val;
00168 } ay_tag;
00169
00170
00172 typedef struct ay_btval_s
00173 {
00174 size_t size;
00175 void *payload;
00176 } ay_btval;
00177
00178
00180 typedef struct ay_bparam_s
00181 {
00182 int has_bevels;
00183 int states[4];
00184 int types[4];
00185 int dirs[4];
00186 int integrate[4];
00187 double radii[4];
00188 int force3d[4];
00189 } ay_bparam;
00190
00191
00193 typedef struct ay_cparam_s
00194 {
00195 int has_caps;
00196 int states[4];
00197 int types[4];
00198 int integrate[4];
00199 double frac[4];
00200 double mp[12];
00201 int use_mp[4];
00202 } ay_cparam;
00203
00204
00206 typedef struct ay_trafo_s
00207 {
00209
00210 double movx, movy, movz;
00213
00214 double rotx, roty, rotz;
00217
00218 double scalx, scaly, scalz;
00220 double quat[4];
00221 } ay_trafo;
00222
00223
00225 typedef struct ay_object_s {
00226 struct ay_object_s *next;
00227 struct ay_object_s *down;
00230 unsigned int type;
00231
00233 char *name;
00234
00236 unsigned int glname;
00237
00239 unsigned int refcount;
00240
00242 int selected;
00243
00245 int modified;
00246
00248 int parent;
00249
00251 int inherit_trafos;
00252
00253
00255 int hide;
00257 int hide_children;
00258
00261 double movx, movy, movz;
00266 double rotx, roty, rotz;
00271 double scalx, scaly, scalz;
00274 double quat[4];
00276 #if 0
00277 ay_trafo *trafo;
00278 #endif
00279 ay_point *selp;
00281 ay_tag *tags;
00283 struct ay_mat_object_s *mat;
00285 void *refine;
00286 } ay_object;
00287
00288
00290 typedef struct ay_list_object_s
00291 {
00292 struct ay_list_object_s *next;
00293 ay_object *object;
00294 } ay_list_object;
00295
00296
00297
00298
00300 typedef struct ay_shader_arg_s
00301 {
00302 struct ay_shader_arg_s *next;
00303 char *name;
00304 int type;
00306 union {
00307 float color[3];
00308 float point[4];
00309 float matrix[16];
00310 float scalar;
00311 char *string;
00312 } val;
00313 } ay_shader_arg;
00314
00315
00317 typedef struct ay_shader_s
00318 {
00319 struct ay_shader_s *next;
00320 int type;
00322 char *name;
00323 ay_shader_arg *arg;
00324 } ay_shader;
00325
00326
00328 typedef struct ay_mat_object_s {
00329
00330 int registered;
00332 char **nameptr;
00333 unsigned int *refcountptr;
00334 ay_object *objptr;
00336
00337
00340 int colr, colg, colb;
00345 int opr, opg, opb;
00348
00349 int matte;
00351
00352 double shading_rate;
00353 int shading_interpolation;
00355
00356 double dbound_val;
00357 int dbound;
00359
00360 int sides;
00362
00364 ay_shader *sshader;
00366 ay_shader *dshader;
00368 ay_shader *ishader;
00370 ay_shader *eshader;
00371
00372
00373
00376 int avr, avg, avb, ava;
00380 int emr, emg, emb, ema;
00384 int spr, spg, spb, spa;
00386
00387 double patch_size;
00388 double elem_size;
00389 double min_size;
00390
00391 int zonal;
00393
00394 int has_caustics;
00396
00397 int cast_shadows;
00399
00400 int true_displacement;
00402
00403 int camera;
00404 int reflection;
00405 int shadow;
00407 } ay_mat_object;
00408
00409
00411 typedef struct ay_riopt_s
00412 {
00413 double Variance;
00414 double Samples_X;
00415 double Samples_Y;
00416 char FilterFunc;
00417 double FilterWidth;
00418 double FilterHeight;
00419 double ExpGain;
00420 double ExpGamma;
00421 double RGBA_ONE;
00422 double RGBA_MIN;
00423 double RGBA_MAX;
00424 double RGBA_Dither;
00426 int MinSamples;
00427 int MaxSamples;
00428 int MaxRayLevel;
00429 double ShadowBias;
00430 char PRManSpec;
00431 int RadSteps;
00432 int PatchSamples;
00434 char *textures;
00435 char *shaders;
00436 char *archives;
00437 char *procedurals;
00439 int texturemem;
00440 int geommem;
00442 int width;
00443 int height;
00445 int use_std_display;
00446 } ay_riopt;
00447
00448
00450 typedef struct ay_root_object_s
00451 {
00452 ay_riopt *riopt;
00453 ay_shader *imager;
00454 ay_shader *atmosphere;
00455 } ay_root_object;
00456
00457
00459 typedef struct ay_stess_curve_s {
00460 int tesslen;
00461 double *tessv;
00462 int tessqf;
00463 } ay_stess_curve;
00464
00465
00467 typedef struct ay_nurbcurve_object_s
00468 {
00469 int type;
00470 int length;
00471 int order;
00472 int knot_type;
00473 int is_rat;
00474 double *controlv;
00475 double *knotv;
00476 double *breakv;
00478 double glu_sampling_tolerance;
00479 int display_mode;
00481 GLUnurbsObj *no;
00482 float *fltcv;
00484 ay_stess_curve stess[2];
00486
00487 int createmp;
00488 ay_mpoint *mpoints;
00489 } ay_nurbcurve_object;
00490
00491
00493 typedef struct ay_stess_uvp_s {
00494 struct ay_stess_uvp_s *next;
00495 struct ay_stess_uvp_s *prev;
00496 int type;
00497 int dir;
00498
00499 double u, v;
00501 double C[6];
00502 } ay_stess_uvp;
00503
00504
00506 typedef struct ay_stess_patch_s {
00507 int qf;
00508
00509 int tessw;
00510 int tessh;
00511 double *tessv;
00513
00514 int upslen;
00515 int vpslen;
00516 ay_stess_uvp **ups;
00517 ay_stess_uvp **vps;
00519 int ft_cw;
00520 int tcslen;
00521 int *tcslens;
00522 double *tcspnts;
00524 struct ay_pomesh_object_s *pomesh;
00525 double normal[3];
00526 } ay_stess_patch;
00527
00528
00530 typedef struct ay_nurbpatch_object_s
00531 {
00532 int width;
00533 int height;
00534 int uorder;
00535 int vorder;
00536 int uknot_type;
00537 int vknot_type;
00539 int utype;
00540 int vtype;
00542 char is_rat;
00543 char is_planar;
00545 double *controlv;
00546 double *uknotv;
00547 double *vknotv;
00549 double *breakv;
00551
00552
00553 GLUnurbsObj *no;
00554 float *fltcv;
00556 double glu_sampling_tolerance;
00557 int display_mode;
00559 ay_stess_patch stess[2];
00562 ay_object *caps_and_bevels;
00563
00564
00565 int createmp;
00566 ay_mpoint *mpoints;
00567 } ay_nurbpatch_object;
00568
00569
00571 typedef struct ay_apatch_object_s {
00572 int mode;
00573 int width;
00574 int height;
00575 int awidth;
00576 int aheight;
00577 int close_u;
00578 int close_v;
00579 int order_u;
00580 int order_v;
00581 int ktype_u;
00582 int ktype_v;
00584 double *controlv;
00587 ay_object *npatch;
00588
00590 ay_object *caps_and_bevels;
00591
00592 double glu_sampling_tolerance;
00593 int display_mode;
00594 } ay_apatch_object;
00595
00596
00598 typedef struct ay_ipatch_object_s {
00599 int width;
00600 int height;
00601 int close_u;
00602 int close_v;
00603 int order_u;
00604 int order_v;
00605 int ktype_u;
00606 int ktype_v;
00608 double *controlv;
00610 double sdlen_u;
00611 double edlen_u;
00613 double sdlen_v;
00614 double edlen_v;
00616 int derivs_u;
00617 double *sderiv_u;
00618 double *ederiv_u;
00620 int derivs_v;
00621 double *sderiv_v;
00622 double *ederiv_v;
00625 ay_object *npatch;
00626
00628 ay_object *caps_and_bevels;
00629
00630 double glu_sampling_tolerance;
00631 int display_mode;
00632 } ay_ipatch_object;
00633
00634
00636 typedef struct ay_pamesh_object_s {
00637 int width;
00638 int height;
00639 int close_u;
00640 int close_v;
00641 double *controlv;
00643 int is_rat;
00645 int type;
00646 int btype_u;
00647 int btype_v;
00648 int ustep;
00649 double *ubasis;
00650 int vstep;
00651 double *vbasis;
00654 ay_object *npatch;
00655
00657 ay_object *caps_and_bevels;
00658
00659 double glu_sampling_tolerance;
00660 int display_mode;
00661 } ay_pamesh_object;
00662
00663
00665 typedef struct ay_pomesh_object_s {
00666 int type;
00668 unsigned int npolys;
00669 unsigned int *nloops;
00670 unsigned int *nverts;
00671 unsigned int *verts;
00673 unsigned int ncontrols;
00674 int has_normals;
00675 double *controlv;
00676 double *face_normals;
00678
00679 } ay_pomesh_object;
00680
00681
00683 typedef struct ay_sdmesh_object_s {
00684 int scheme;
00686 unsigned int nfaces;
00687 unsigned int *nverts;
00688 unsigned int *verts;
00689 unsigned int ntags;
00690 int *tags;
00691 unsigned int *nargs;
00692 int *intargs;
00693 double *floatargs;
00695 unsigned int ncontrols;
00696 double *controlv;
00698 unsigned int level;
00699 char drawsub;
00702 ay_object *pomesh;
00703
00704 double *face_normals;
00705 } ay_sdmesh_object;
00706
00707
00709 typedef struct ay_gordon_object_s {
00710 int watchcorners;
00711 int is_triangular;
00712 int uorder;
00713 int vorder;
00716 ay_object *caps_and_bevels;
00717
00719 ay_object *npatch;
00720
00722 ay_object *pomesh;
00723
00724 double edgethresh;
00725
00726 double glu_sampling_tolerance;
00727 int display_mode;
00728 } ay_gordon_object;
00729
00730
00732 typedef struct ay_text_object_s
00733 {
00734 char *fontname;
00735 Tcl_UniChar *unistring;
00736 double height;
00737 int revert;
00738 int has_upper_cap;
00739 int has_lower_cap;
00742 ay_object *caps_and_bevels;
00743
00745 ay_object *npatch;
00746
00747 double *pnts;
00748 unsigned int pntslen;
00750 double glu_sampling_tolerance;
00751 int display_mode;
00752 } ay_text_object;
00753
00754
00756 typedef struct ay_light_object_s
00757 {
00758 int type;
00759 int on;
00760 int local;
00761 RtLightHandle light_handle;
00762 int shadows;
00763 int samples;
00764
00765 int colr, colg, colb;
00767 double intensity;
00768 double cone_angle;
00769 double cone_delta_angle;
00770 double beam_distribution;
00771 int use_sm;
00772 int sm_resolution;
00773 ay_shader *lshader;
00774 double tfrom[3];
00775 double tto[3];
00776 } ay_light_object;
00777
00778
00780 typedef struct ay_level_object_s
00781 {
00782 int type;
00783 } ay_level_object;
00784
00785
00787 typedef struct ay_box_object_s
00788 {
00789 double width;
00790 double length;
00791 double height;
00792 double *pnts;
00793 } ay_box_object;
00794
00795
00797 typedef struct ay_bpatch_object_s
00798 {
00799 double p1[3];
00800 double p2[3];
00801 double p3[3];
00802 double p4[3];
00803 } ay_bpatch_object;
00804
00805
00807 typedef struct ay_sphere_object_s
00808 {
00809 char closed;
00810 char is_simple;
00811 double radius;
00812 double zmin;
00813 double zmax;
00814 double thetamax;
00815 double *pnts;
00816 } ay_sphere_object;
00817
00818
00820 typedef struct ay_cone_object_s
00821 {
00822 char closed;
00823 char is_simple;
00824 double radius;
00825 double height;
00826 double thetamax;
00827 double *pnts;
00828 } ay_cone_object;
00829
00830
00832 typedef struct ay_disk_object_s
00833 {
00834 char is_simple;
00835 double radius;
00836 double height;
00837 double thetamax;
00838 double *pnts;
00839 } ay_disk_object;
00840
00841
00843 typedef struct ay_cylinder_object_s
00844 {
00845 char closed;
00846 char is_simple;
00847 double radius;
00848 double zmin;
00849 double zmax;
00850 double thetamax;
00851 double *pnts;
00852 } ay_cylinder_object;
00853
00854
00856 typedef struct ay_hyperboloid_s
00857 {
00858 char closed;
00859 double p1[3];
00860 double p2[3];
00861 double thetamax;
00862 double *pnts;
00863 } ay_hyperboloid_object;
00864
00865
00867 typedef struct ay_paraboloid_object_s
00868 {
00869 char closed;
00870 double rmax;
00871 double zmin;
00872 double zmax;
00873 double thetamax;
00874 double *pnts;
00875 } ay_paraboloid_object;
00876
00877
00879 typedef struct ay_torus_object_s
00880 {
00881 char closed;
00882 double majorrad;
00883 double minorrad;
00884 double phimin;
00885 double phimax;
00886 double thetamax;
00887 double *pnts;
00888 } ay_torus_object;
00889
00890
00892 typedef struct ay_icurve_object_s
00893 {
00894 int type;
00895 int length;
00896 int order;
00898 int param_type;
00899 double sdlen;
00900 double edlen;
00902 double *controlv;
00904 int derivs;
00905 double sderiv[3];
00906 double ederiv[3];
00909 ay_object *ncurve;
00910
00911 double glu_sampling_tolerance;
00912 int display_mode;
00913 } ay_icurve_object;
00914
00915
00917 typedef struct ay_acurve_object_s
00918 {
00919 int length;
00920 int alength;
00921 int closed;
00922 int symmetric;
00923 int order;
00925 double *controlv;
00928 ay_object *ncurve;
00929
00930 double glu_sampling_tolerance;
00931 int display_mode;
00932 } ay_acurve_object;
00933
00934
00936 typedef struct ay_concatnc_object_s
00937 {
00938 int closed;
00939 int fillgaps;
00940 int revert;
00941 int knot_type;
00942 double ftlength;
00945 ay_object *ncurve;
00946
00947 double glu_sampling_tolerance;
00948 int display_mode;
00949 } ay_concatnc_object;
00950
00951
00953 typedef struct ay_offnc_object_s
00954 {
00955 int mode;
00956 int revert;
00957 double offset;
00960 ay_object *ncurve;
00961
00962 double glu_sampling_tolerance;
00963 int display_mode;
00964 } ay_offnc_object;
00965
00966
00968 typedef struct ay_cap_object_s
00969 {
00970 int type;
00972 double fraction;
00975 ay_object *npatch;
00976
00977 double glu_sampling_tolerance;
00978 int display_mode;
00979 } ay_cap_object;
00980
00981
00983 typedef struct ay_bevel_object_s
00984 {
00985 int has_start_cap;
00986 int has_end_cap;
00989 ay_object *npatch;
00990
00992 ay_object *caps;
00993
00994 double glu_sampling_tolerance;
00995 int display_mode;
00996 } ay_bevel_object;
00997
00998
01000 typedef struct ay_clone_object_s
01001 {
01002 int numclones;
01003 int rotate;
01004 int mirror;
01006
01008 double movx, movy, movz;
01010
01011 double rotx, roty, rotz;
01014
01015 double scalx, scaly, scalz;
01017 double quat[4];
01019 double *pnts;
01020 unsigned int pntslen;
01021 int pntsrat;
01024 ay_object *clones;
01025 } ay_clone_object;
01026
01027
01029 typedef struct ay_camera_object_s
01030 {
01031 double from[3];
01032 double to[3];
01033 double up[3];
01034 double roll;
01035 double zoom;
01036 double nearp;
01037 double farp;
01038 } ay_camera_object;
01039
01040
01042 typedef struct ay_riinc_object_s
01043 {
01046 double width, length, height;
01048 char *file;
01049 } ay_riinc_object;
01050
01051
01053 typedef struct ay_riproc_object_s
01054 {
01055 int type;
01058 double minx, miny, minz, maxx, maxy, maxz;
01060 char *file;
01061 char *data;
01062 } ay_riproc_object;
01063
01064
01066 typedef struct ay_revolve_object_s
01067 {
01068 double thetamax;
01069 int sections;
01070 int order;
01073 ay_object *npatch;
01074
01076 ay_object *caps_and_bevels;
01077
01078 double glu_sampling_tolerance;
01079 int display_mode;
01080 } ay_revolve_object;
01081
01082
01084 typedef struct ay_extrude_object_s
01085 {
01086 double height;
01087 int has_upper_cap;
01088 int has_lower_cap;
01091 ay_object *caps_and_bevels;
01092
01094 ay_object *npatch;
01095
01096 double *pnts;
01097 unsigned int pntslen;
01099 double glu_sampling_tolerance;
01100 int display_mode;
01101 } ay_extrude_object;
01102
01103
01105 typedef struct ay_sweep_object_s
01106 {
01107 int rotate;
01108 int interpolate;
01109 int close;
01110 int sections;
01111 int has_start_cap;
01112 int has_end_cap;
01113 int has_left_cap;
01114 int has_right_cap;
01117 ay_object *caps_and_bevels;
01118
01120 ay_object *npatch;
01121
01122 double glu_sampling_tolerance;
01123 int display_mode;
01124 } ay_sweep_object;
01125
01126
01128 typedef struct ay_swing_object_s
01129 {
01130
01132 ay_object *npatch;
01133
01135 ay_object *caps_and_bevels;
01136
01137 double glu_sampling_tolerance;
01138 int display_mode;
01139 } ay_swing_object;
01140
01141
01143 typedef struct ay_birail1_object_s
01144 {
01145 int type;
01146 int sections;
01149 ay_object *caps_and_bevels;
01150
01152 ay_object *npatch;
01153
01154 double glu_sampling_tolerance;
01155 int display_mode;
01156 } ay_birail1_object;
01157
01158
01160 typedef struct ay_birail2_object_s
01161 {
01162 int close;
01163 int sections;
01164 int interpolctrl;
01167 ay_object *caps_and_bevels;
01168
01170 ay_object *npatch;
01171
01172 double glu_sampling_tolerance;
01173 int display_mode;
01174 } ay_birail2_object;
01175
01176
01178 typedef struct ay_skin_object_s
01179 {
01180 int interpolate;
01181 int uorder;
01182 int uknot_type;
01183 double uknotv;
01186 ay_object *caps_and_bevels;
01187
01189 ay_object *npatch;
01190
01191 double glu_sampling_tolerance;
01192 int display_mode;
01193 } ay_skin_object;
01194
01195
01197 typedef struct ay_extrnc_object_s
01198 {
01199 int side;
01200 int pnum;
01201 int revert;
01202 int relative;
01203 int extractnt;
01204 double parameter;
01207 ay_object *ncurve;
01208
01209 double glu_sampling_tolerance;
01210 int display_mode;
01211 } ay_extrnc_object;
01212
01213
01215 typedef struct ay_extrnp_object_s
01216 {
01217 int pnum;
01218 int relative;
01221 double umin, umax, vmin, vmax;
01225 ay_object *caps_and_bevels;
01226
01228 ay_object *npatch;
01229
01230 double glu_sampling_tolerance;
01231 int display_mode;
01232 } ay_extrnp_object;
01233
01234
01236 typedef struct ay_concatnp_object_s
01237 {
01238 int type;
01239 int order;
01240 int revert;
01241 int knot_type;
01243 int fillgaps;
01244 double ftlength;
01246 int compat;
01247 char *uv_select;
01250 ay_object *caps_and_bevels;
01251
01253 ay_object *npatch;
01254
01255 double glu_sampling_tolerance;
01256 int display_mode;
01257 } ay_concatnp_object;
01258
01259
01261 typedef struct ay_offnp_object_s
01262 {
01263 int mode;
01264 double offset;
01267 ay_object *caps_and_bevels;
01268
01270 ay_object *npatch;
01271
01272 double glu_sampling_tolerance;
01273 int display_mode;
01274 } ay_offnp_object;
01275
01276
01278 typedef struct ay_ncircle_object_s
01279 {
01280 double radius;
01281 double tmin;
01282 double tmax;
01285 ay_object *ncurve;
01286
01287 double glu_sampling_tolerance;
01288 int display_mode;
01289 } ay_ncircle_object;
01290
01291
01293 typedef int (ay_sevalcb) (Tcl_Interp *interp, char *script, int compile,
01294 Tcl_Obj **cscript);
01295
01296
01298 typedef struct ay_script_object_s
01299 {
01300 char *script;
01301 int active;
01302 int type;
01304 ay_object *cm_objects;
01306 int modified;
01307 Tcl_Obj *cscript;
01309 int paramslen;
01310 Tcl_Obj **params;
01312 double *pnts;
01313 unsigned int pntslen;
01314 int pntsrat;
01316 ay_sevalcb *cb;
01317 } ay_script_object;
01318
01319
01321 typedef struct ay_view_object_s
01322 {
01323 struct Togl *togl;
01324 int type;
01325 int drawmode;
01327 int local;
01328 int aligned;
01330 int drawsel;
01331 int drawlevel;
01332 int redraw;
01334 double grid;
01335 int drawgrid;
01336 int usegrid;
01338 int antialiaslines;
01340
01341 int ppreview;
01342
01343
01344 int drawobjectcs;
01346
01347 double from[3];
01348 double to[3];
01349 double up[3];
01350 double roll;
01351 double zoom;
01352 double nearp;
01353 double farp;
01357 double rotx, roty, rotz;
01362 double conv_x, conv_y;
01367 double rect_xmin, rect_xmax, rect_ymin, rect_ymax;
01369 int drawrect;
01373 double markworld[3];
01374 double markx;
01375 double marky;
01377 int drawmark;
01381 int pos_x, pos_y;
01385 int isicon;
01386
01388 int drawhandles;
01389
01391 int dirty;
01392
01393
01394 char *bgimage;
01395 int bgimagedirty;
01396 int drawbgimage;
01400 int bgwidth, bgheight;
01401 int bguorder, bgvorder;
01402 float *bgknotv, *bgcv;
01407 int id;
01408
01409 int transform_points;
01411 int enable_undo;
01415 Togl_Callback *altdispcb;
01416
01417 int action_state;
01419 int full_notify;
01420 } ay_view_object;
01421
01422
01424 typedef struct ay_select_object_s
01425 {
01426 char *indices;
01427 int length;
01428 int *seli;
01429 } ay_select_object;
01430
01431
01433 typedef struct ay_trim_object_s
01434 {
01435 int patchnum;
01436 int scalemode;
01438 ay_object *npatch;
01439 } ay_trim_object;
01440
01441
01443 typedef struct ay_preferences_s
01444 {
01445 int list_types;
01446 int mark_hidden;
01447 int single_window;
01449
01450 int scopemanagement;
01451 int edit_snaps_to_grid;
01452 int snap3d;
01453 int allow_warp;
01454 double object_pick_epsilon;
01455 double pick_epsilon;
01456 int lazynotify;
01457 int completenotify;
01458 int undo_levels;
01459 int globalmark;
01460 int createat;
01461 int createin;
01462 int rationalpoints;
01464 int normalizetrafos;
01465 int normalizemark;
01466 int normalizedigits;
01468
01469 int resolveinstances;
01470 int checklights;
01471 int ristandard;
01472 int use_sm;
01473 int defaultmat;
01474 int writeident;
01475 int excludehidden;
01477
01478 int mopsiresetdisplaymode;
01479 int mopsiresettolerance;
01481 double guiscale;
01483
01484 int useguiscale;
01485 double handle_size;
01489 double bgr, bgg, bgb;
01493 double obr, obg, obb;
01497 double ser, seg, seb;
01501 double grr, grg, grb;
01505 double tpr, tpg, tpb;
01509 double shr, shg, shb;
01513 double lir, lig, lib;
01517 double sxr, sxg, sxb;
01520 int use_materialcolor;
01522 double linewidth;
01523 double sellinewidth;
01524 double aalinewidth;
01525 double aasellinewidth;
01526 double aafudge;
01527 int sdmode;
01528 double selbndfactor;
01530 int cullfaces;
01532
01533 char onerror;
01534 char errorlevel;
01535 int writelog;
01536 char *logfile;
01538
01539 int wrib_sm;
01540 int wrib_em;
01541 int wrib_archives;
01543
01544 double glu_sampling_tolerance;
01545 int np_display_mode;
01546 int nc_display_mode;
01547 double glu_sampling_tolerance_a;
01548 int np_display_mode_a;
01549 int nc_display_mode_a;
01550 int glu_cache_float;
01551 int glu_avoid_pwlcurve;
01552 int stess_qf;
01555 int smethod;
01556 double sparamu;
01557 double sparamv;
01560 int wutag;
01561
01563 int warnpnts;
01564
01565 double polyoffset0;
01566 double polyoffset1;
01569 int save_rootviews;
01570
01572 int pprev_open;
01573 char *pprender;
01576 int conv_reset_display;
01578 int conv_keep_caps;
01580 int conv_keep_bevels;
01581
01582
01583 char *texcoordname;
01584 char *normalname;
01585 char *tangentname;
01586 char *colorname;
01587 char *opacityname;
01589 unsigned int *converttags;
01590 int converttagslen;
01592 int disablefailedscripts;
01594 ay_view_object *createview;
01595 } ay_preferences;
01596
01597
01599 typedef void (*ay_voidfp)(void);
01600
01602 typedef struct ay_ftable_s
01603 {
01604 unsigned int size;
01605 ay_voidfp *arr;
01606 } ay_ftable;
01607
01608
01610 typedef struct ay_otable_s
01611 {
01612 unsigned int size;
01613 void *arr;
01614 } ay_otable;
01615
01616
01617
01618
01620 typedef int (ay_createcb) (int argc, char *argv[], ay_object *o);
01621
01623 typedef int (ay_deletecb) (void *c);
01624
01626 typedef int (ay_copycb) (void *src, void **dst);
01627
01629 typedef int (ay_drawcb) (struct Togl *togl, ay_object *o);
01630
01632 typedef int (ay_propcb) (Tcl_Interp *interp, int argc, char *argv[],
01633 ay_object *o);
01634
01636 typedef int (ay_getpntcb) (int mode, ay_object *o, double *p,
01637 ay_pointedit *pe);
01638
01640 typedef int (ay_wribcb) (char *file, ay_object *o);
01641
01643 typedef int (ay_readcb) (FILE *fileptr, ay_object *o);
01644
01646 typedef int (ay_writecb) (FILE *fileptr, ay_object *o);
01647
01649 typedef int (ay_notifycb) (ay_object *o);
01650
01652 typedef int (ay_treedropcb) (ay_object *o);
01653
01655 typedef int (ay_comparecb) (ay_object *o1, ay_object *o2);
01656
01658 typedef int (ay_convertcb) (ay_object *o, int in_place);
01659
01661 typedef int (ay_providecb) (ay_object *o, unsigned int type,
01662 ay_object **result);
01663
01665 typedef int (ay_peekcb) (ay_object *o, unsigned int type,
01666 ay_object **result, double *transform);
01667
01669 typedef int (ay_bbccb) (ay_object *o, double *bbox, int *flags);
01670
01672 typedef int (ay_inspntcb) (ay_object *o, int *index, double *objXYZ, int edit);
01673
01675 typedef int (ay_delpntcb) (ay_object *o, int *index, double *objXYZ);
01676
01678 typedef int (ay_genericcb) (ay_object *o, int op);
01679
01680
01681
01682
01684 extern Tcl_Interp *ay_interp;
01685
01687 extern Tcl_Interp *ay_safeinterp;
01688
01690 extern ay_preferences ay_prefs;
01691
01693 extern ay_object *ay_root;
01694
01696 extern ay_object *ay_endlevel;
01697
01700 extern ay_object **ay_next;
01701
01703 extern ay_view_object *ay_currentview;
01704
01706 extern ay_list_object *ay_selection;
01707
01709 extern ay_list_object *ay_currentlevel;
01710
01712 extern ay_object *ay_clipboard;
01713
01715 extern GLUquadric *ay_gluquadobj;
01716
01718 extern Tcl_HashTable ay_otypesht;
01719
01721 extern ay_otable ay_typenamest;
01722
01724 extern Tcl_HashTable ay_tagtypesht;
01725
01727 extern Tcl_HashTable ay_languagesht;
01728
01732 extern ay_ftable ay_createcbt;
01734 extern ay_ftable ay_deletecbt;
01736 extern ay_ftable ay_copycbt;
01738 extern ay_ftable ay_drawcbt;
01740 extern ay_ftable ay_drawhcbt;
01742 extern ay_ftable ay_drawacbt;
01744 extern ay_ftable ay_shadecbt;
01746 extern ay_ftable ay_getpropcbt;
01748 extern ay_ftable ay_setpropcbt;
01750 extern ay_ftable ay_getpntcbt;
01752 extern ay_ftable ay_wribcbt;
01754 extern ay_ftable ay_readcbt;
01756 extern ay_ftable ay_writecbt;
01758 extern ay_ftable ay_notifycbt;
01760 extern ay_ftable ay_bbccbt;
01762 extern ay_ftable ay_treedropcbt;
01764 extern ay_ftable ay_convertcbt;
01766 extern ay_ftable ay_providecbt;
01768 extern ay_ftable ay_peekcbt;
01772 extern ay_ftable ay_sevalcbt;
01773
01775 extern int ay_errno;
01776
01778 extern int ay_read_version;
01779
01781 extern int ay_read_viewnum;
01782
01784 extern unsigned int ay_glname;
01785
01787 extern int ay_wrib_framenum;
01788
01790 extern unsigned int ay_wrib_primlevel;
01791
01793 extern char *ay_version_ma;
01795 extern char *ay_version_mi;
01796
01799 extern unsigned int ay_oi_tagtype;
01800 extern char *ay_oi_tagname;
01801 extern unsigned int ay_riattr_tagtype;
01802 extern char *ay_riattr_tagname;
01803 extern unsigned int ay_riopt_tagtype;
01804 extern char *ay_riopt_tagname;
01805 extern unsigned int ay_tc_tagtype;
01806 extern char *ay_tc_tagname;
01807 extern unsigned int ay_pv_tagtype;
01808 extern char *ay_pv_tagname;
01809 extern unsigned int ay_ridisp_tagtype;
01810 extern char *ay_ridisp_tagname;
01811 extern unsigned int ay_rihider_tagtype;
01812 extern char *ay_rihider_tagname;
01813 extern unsigned int ay_noexport_tagtype;
01814 extern char *ay_noexport_tagname;
01815 extern unsigned int ay_tp_tagtype;
01816 extern char *ay_tp_tagname;
01817 extern unsigned int ay_bns_tagtype;
01818 extern char *ay_bns_tagname;
01819 extern unsigned int ay_ans_tagtype;
01820 extern char *ay_ans_tagname;
01821 extern unsigned int ay_dbns_tagtype;
01822 extern char *ay_dbns_tagname;
01823 extern unsigned int ay_dans_tagtype;
01824 extern char *ay_dans_tagname;
01825 extern unsigned int ay_umm_tagtype;
01826 extern char *ay_umm_tagname;
01827 extern unsigned int ay_vmm_tagtype;
01828 extern char *ay_vmm_tagname;
01829 extern unsigned int ay_bp_tagtype;
01830 extern char *ay_bp_tagname;
01831 extern unsigned int ay_cp_tagtype;
01832 extern char *ay_cp_tagname;
01833 extern unsigned int ay_np_tagtype;
01834 extern char *ay_np_tagname;
01835 extern unsigned int ay_rp_tagtype;
01836 extern char *ay_rp_tagname;
01837 extern unsigned int ay_hc_tagtype;
01838 extern char *ay_hc_tagname;
01839 extern unsigned int ay_no_tagtype;
01840 extern char *ay_no_tagname;
01841 extern unsigned int ay_nm_tagtype;
01842 extern char *ay_nm_tagname;
01843 extern unsigned int ay_nt_tagtype;
01844 extern char *ay_nt_tagname;
01845 extern unsigned int ay_aswire_tagtype;
01846 extern char *ay_aswire_tagname;
01847 extern unsigned int ay_mn_tagtype;
01848 extern char *ay_mn_tagname;
01849 extern unsigned int ay_mp_tagtype;
01850 extern char *ay_mp_tagname;
01851 extern unsigned int ay_sb_tagtype;
01852 extern char *ay_sb_tagname;
01853 extern unsigned int ay_sbc_tagtype;
01854 extern char *ay_sbc_tagname;
01855 extern unsigned int ay_peek_tagtype;
01856 extern char *ay_peek_tagname;
01857 extern unsigned int ay_da_tagtype;
01858 extern char *ay_da_tagname;
01859 extern unsigned int ay_ti_tagtype;
01860 extern char *ay_ti_tagname;
01865 extern char *ay_error_igntype;
01868
01869
01872 #define AY_TRUE 1
01873 #define AY_FALSE 0
01874
01878 #define AY_OK 0
01879 #define AY_EWARN 1
01880 #define AY_ERROR 2
01881 #define AY_EFLUSH 3
01882 #define AY_EOUTPUT 4
01883 #define AY_EOMEM 5
01884 #define AY_EOPENFILE 10
01885 #define AY_ECLOSEFILE 11
01886 #define AY_EFORMAT 12
01887 #define AY_EUEOF 13
01888 #define AY_EEOF 14
01889 #define AY_EDONOTLINK 15
01890 #define AY_ERANGE 16
01891 #define AY_EUTAGTYPE 17
01892 #define AY_ENOSEL 20
01893 #define AY_EARGS 21
01894 #define AY_EOPT 22
01895 #define AY_EUOPT 23
01896 #define AY_EWTYPE 24
01897 #define AY_ETYPE 30
01898 #define AY_ENTYPE 31
01899 #define AY_EREF 40
01900 #define AY_ENULL 50
01901
01905 #define AY_IDROOT 0
01906 #define AY_IDNPATCH 1
01907 #define AY_IDNCURVE 2
01908 #define AY_IDLEVEL 3
01909 #define AY_IDLIGHT 4
01910 #define AY_IDBOX 5
01911 #define AY_IDBPATCH 6
01912 #define AY_IDVIEW 7
01913 #define AY_IDCAMERA 8
01914 #define AY_IDINSTANCE 9
01915 #define AY_IDSPHERE 10
01916 #define AY_IDDISK 11
01917 #define AY_IDCONE 12
01918 #define AY_IDCYLINDER 13
01919 #define AY_IDPARABOLOID 14
01920 #define AY_IDHYPERBOLOID 15
01921 #define AY_IDTORUS 16
01922 #define AY_IDRIINC 17
01923 #define AY_IDMATERIAL 18
01924 #define AY_IDICURVE 19
01925 #define AY_IDREVOLVE 20
01926 #define AY_IDEXTRUDE 21
01927 #define AY_IDSWEEP 22
01928 #define AY_IDSKIN 23
01929 #define AY_IDCAP 24
01930 #define AY_IDPAMESH 25
01931 #define AY_IDPOMESH 26
01932 #define AY_IDCONCATNC 27
01933 #define AY_IDCLONE 28
01934 #define AY_IDSDMESH 29
01935 #define AY_IDGORDON 30
01936 #define AY_IDTEXT 31
01937 #define AY_IDBIRAIL1 32
01938 #define AY_IDBIRAIL2 33
01939 #define AY_IDEXTRNC 34
01940 #define AY_IDSCRIPT 35
01941 #define AY_IDRIPROC 36
01942 #define AY_IDBEVEL 37
01943 #define AY_IDNCIRCLE 38
01944 #define AY_IDSWING 39
01945 #define AY_IDSELECT 40
01946 #define AY_IDEXTRNP 41
01947 #define AY_IDOFFNC 42
01948 #define AY_IDACURVE 43
01949 #define AY_IDTRIM 44
01950 #define AY_IDCONCATNP 45
01951 #define AY_IDOFFNP 46
01952 #define AY_IDIPATCH 47
01953 #define AY_IDMIRROR 48
01954 #define AY_IDDSKIN 49
01955 #define AY_IDAPATCH 50
01956
01957 #define AY_IDLAST 52
01958
01962 #define AY_LTEND 0
01963 #define AY_LTLEVEL 1
01964 #define AY_LTUNION 2
01965 #define AY_LTDIFF 3
01966 #define AY_LTINT 4
01967 #define AY_LTPRIM 5
01968
01972 #define AY_VTFRONT 0
01973 #define AY_VTSIDE 1
01974 #define AY_VTTOP 2
01975 #define AY_VTPERSP 3
01976 #define AY_VTTRIM 4
01977
01981 #define AY_STSURFACE 0
01982 #define AY_STDISPLACEMENT 1
01983 #define AY_STVOLUME 2
01984 #define AY_STLIGHT 3
01985 #define AY_STIMAGER 4
01986 #define AY_STTRANSFORMATION 5
01987 #define AY_STAREALIGHT 6
01988 #define AY_STINTERIOR 7
01989 #define AY_STEXTERIOR 8
01990 #define AY_STATMOSPHERE 9
01991
01995 #define AY_SASCALAR 0
01996 #define AY_SAPOINT 1
01997 #define AY_SANORMAL 2
01998 #define AY_SAVECTOR 3
01999 #define AY_SACOLOR 4
02000 #define AY_SASTRING 5
02001 #define AY_SAMATRIX 6
02002
02006 #define AY_LITCUSTOM 0
02007 #define AY_LITPOINT 1
02008 #define AY_LITDISTANT 2
02009 #define AY_LITSPOT 3
02010
02014 #define AY_CTOPEN 0
02015 #define AY_CTCLOSED 1
02016 #define AY_CTPERIODIC 2
02017
02021 #define AY_KTBEZIER 0
02022 #define AY_KTBSPLINE 1
02023 #define AY_KTNURB 2
02024 #define AY_KTCUSTOM 3
02025 #define AY_KTCHORDAL 4
02026 #define AY_KTCENTRI 5
02027 #define AY_KTUNIFORM 6
02028
02032 #define AY_PTBILINEAR 0
02033 #define AY_PTBICUBIC 1
02034
02038 #define AY_BTBEZIER 0
02039 #define AY_BTBSPLINE 1
02040 #define AY_BTCATMULLROM 2
02041 #define AY_BTHERMITE 3
02042 #define AY_BTPOWER 4
02043 #define AY_BTCUSTOM 5
02044
02048 #define AY_SDSCATMULL 0
02049 #define AY_SDSLOOP 1
02050
02054 #define AY_SDTHOLE 0
02055 #define AY_SDTCORNER 1
02056 #define AY_SDTCREASE 2
02057 #define AY_SDTIB 3
02059
02060
02062 #define AY_PRTDREADA 0
02063 #define AY_PRTRUNPROG 1
02064 #define AY_PRTDYNLOAD 2
02066
02067
02069 #define AY_CATNONE 0
02070 #define AY_CATTRIM 1
02071 #define AY_CATSIMPLE 2
02072 #define AY_CATSIMPLEINT 3
02073 #define AY_CATGORDON 4
02075
02076
02078 #define AY_PT3D 0
02079 #define AY_PTRAT 1
02080 #define AY_PTKNOT 2
02082
02083
02085 #define AY_DMWIRE 0
02086 #define AY_DMSHADE 1
02087 #define AY_DMSHADEWIRE 2
02088 #define AY_DMWIREHIDDEN 3
02089
02093 #define AY_NORTH 0
02094 #define AY_EAST 1
02095 #define AY_SOUTH 2
02096 #define AY_WEST 3
02097
02098 #define AY_FORWARD 0
02099 #define AY_BACKWARD 1
02100
02105 #define AY_XY 0
02106 #define AY_YZ 1
02107 #define AY_XZ 2
02108
02112 #define AY_OPREVERT 0
02113 #define AY_OPOPEN 1
02114 #define AY_OPCLOSE 2
02115 #define AY_OPREFINE 3
02116 #define AY_OPCOARSEN 4
02117
02121 #define AY_MOV 0x1
02122 #define AY_ROT 0x2
02123 #define AY_SCA 0x4
02124
02127 #define AY_EPSILON 1.0e-06
02128
02131 #ifdef M_PI
02132 #define AY_PI M_PI
02133 #else
02134 #define AY_PI 3.1415926535897932384626433
02135 #endif
02136
02137 #ifdef M_PI_2
02138 #define AY_HALFPI M_PI_2
02139 #else
02140 #define AY_HALFPI (AY_PI/2.0)
02141 #endif
02142
02143 #define AY_D2R(x) ((x)*AY_PI/180.0)
02144
02145 #define AY_R2D(x) ((x)*180.0/AY_PI)
02146
02147 #define AY_COT(x) (cos(x)/sin(x))
02148
02152 #define AY_VLEN(x,y,z) sqrt((x*x)+(y*y)+(z*z))
02153
02154 #define AY_V3LEN(v) sqrt((v[0]*v[0])+(v[1]*v[1])+(v[2]*v[2]))
02155
02156 #define AY_V2LEN(v) sqrt((v[0]*v[0])+(v[1]*v[1]))
02157
02158 #define AY_V3ZERO(v) {v[0]=0.0; v[1]=0.0; v[2]=0.0;}
02159
02160 #define AY_V3SUB(r,v1,v2) {r[0]=v1[0]-v2[0];r[1]=v1[1]-v2[1];r[2]=v1[2]-v2[2];}
02161
02162 #define AY_V2SUB(r,v1,v2) {r[0]=v1[0]-v2[0];r[1]=v1[1]-v2[1];}
02163
02164 #define AY_V3ADD(r,v1,v2) {r[0]=v1[0]+v2[0];r[1]=v1[1]+v2[1];r[2]=v1[2]+v2[2];}
02165
02166 #define AY_V3MUL(r,v1,v2) {r[0]=v1[0]*v2[0];r[1]=v1[1]*v2[1];r[2]=v1[2]*v2[2];}
02167
02168 #define AY_V3CROSS(r,v1,v2) {r[0]=(v1[1] * v2[2]) - (v1[2] * v2[1]);r[1]=(v1[2] * v2[0]) - (v1[0] * v2[2]);r[2]=(v1[0] * v2[1]) - (v1[1] * v2[0]);}
02169
02170 #define AY_V3SCAL(v,f) {(v[0])*=(f);(v[1])*=(f);(v[2])*=(f);}
02171
02172 #define AY_V2SCAL(v,f) {(v[0])*=(f);(v[1])*=(f);}
02173
02174 #define AY_V3DOT(v1,v2) (v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2])
02175
02176 #define AY_V2DOT(v1,v2) (v1[0]*v2[0] + v1[1]*v2[1])
02177
02178 #define AY_V3DIST(v1,v2) sqrt(((v1[0]-v2[0])*(v1[0]-v2[0]))+((v1[1]-v2[1])*(v1[1]-v2[1]))+((v1[2]-v2[2])*(v1[2]-v2[2])))
02179
02180 #define AY_V3SDIST(v1,v2) (((v1[0]-v2[0])*(v1[0]-v2[0]))+((v1[1]-v2[1])*(v1[1]-v2[1]))+((v1[2]-v2[2])*(v1[2]-v2[2])))
02181
02182 #define AY_V4COMP(v1, v2) ((fabs(v1[0]-v2[0]) < AY_EPSILON) &&\
02183 (fabs(v1[1]-v2[1]) < AY_EPSILON) &&\
02184 (fabs(v1[2]-v2[2]) < AY_EPSILON) &&\
02185 (fabs(v1[3]-v2[3]) < AY_EPSILON))
02186
02187 #define AY_V3COMP(v1, v2) ((fabs(v1[0]-v2[0]) < AY_EPSILON) &&\
02188 (fabs(v1[1]-v2[1]) < AY_EPSILON) &&\
02189 (fabs(v1[2]-v2[2]) < AY_EPSILON))
02190
02191 #define AY_V2COMP(v1, v2) ((fabs(v1[0]-v2[0]) < AY_EPSILON) &&\
02192 (fabs(v1[1]-v2[1]) < AY_EPSILON))
02193
02196
02198 #define AY_APTRAN4(v1,v2,m) {v1[0]=v2[0]*m[0]+v2[1]*m[4]+v2[2]*m[8]+v2[3]*m[12];v1[1]=v2[0]*m[1]+v2[1]*m[5]+v2[2]*m[9]+v2[3]*m[13];v1[2]=v2[0]*m[2]+v2[1]*m[6]+v2[2]*m[10]+v2[3]*m[14];v1[3]=v2[0]*m[3]+v2[1]*m[7]+v2[2]*m[11]+v2[3]*m[15];}
02199
02200
02202 #define AY_APTRAN3(v1,v2,m) {v1[0]=v2[0]*m[0]+v2[1]*m[4]+v2[2]*m[8]+1.0*m[12];v1[1]=v2[0]*m[1]+v2[1]*m[5]+v2[2]*m[9]+1.0*m[13];v1[2]=v2[0]*m[2]+v2[1]*m[6]+v2[2]*m[10]+1.0*m[14];}
02203
02205 #define AY_M44(m,r,c) ((m)[(c)*4+(r)])
02206
02208 #define AY_ISTRAFO(o) ((fabs(o->movx) > AY_EPSILON) ||\
02209 (fabs(o->movy) > AY_EPSILON) ||\
02210 (fabs(o->movz) > AY_EPSILON) ||\
02211 (fabs(o->quat[0]) > AY_EPSILON) ||\
02212 (fabs(o->quat[1]) > AY_EPSILON) ||\
02213 (fabs(o->quat[2]) > AY_EPSILON) ||\
02214 (fabs(1.0 - o->quat[3]) > AY_EPSILON) ||\
02215 (fabs(1.0 - o->scalx) > AY_EPSILON) ||\
02216 (fabs(1.0 - o->scaly) > AY_EPSILON) ||\
02217 (fabs(1.0 - o->scalz) > AY_EPSILON))
02218
02220 #define AY_CHTCLERRRET(stat,name,interp) if(stat){\
02221 ay_error(AY_ERROR, name, Tcl_GetStringResult(interp));\
02222 Tcl_ResetResult(interp);\
02223 return TCL_OK;}
02224
02226 #define AY_CHTCLERRGOT(stat,name,interp) if(stat){\
02227 ay_error(AY_ERROR, name, Tcl_GetStringResult(interp));\
02228 Tcl_ResetResult(interp);\
02229 goto cleanup;}
02230
02232 #define AY_PRINTCMDHELP(help) \
02233 if(argc > 1 && argv[1][0] == '-' && argv[1][1] == 'h'){\
02234 ay_error(AY_EOUTPUT, argv[0], help);\
02235 return TCL_OK;}
02236
02238 #define AY_MAX(a,b) ((a) > (b) ? (a) : (b))
02239
02240
02243 #define AY_VERSIONSTR "1.32"
02244 #define AY_VERSIONSTRMI "0"
02245
02246 #define AY_VERSIONMA 1
02247 #define AY_VERSION 32
02248 #define AY_VERSIONMI 0
02249
02251
02252 #include "aycore.h"
02253 #include "nurbs.h"
02254 #include "objects.h"
02255 #include "contrib.h"
02256
02283 #ifdef __cplusplus
02284 }
02285 #endif
02286
02287 #endif
02288