00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 #ifndef RAYTRACE_H
00067 #define RAYTRACE_H seen
00068
00069
00070
00071
00072 #include "bu.h"
00073 #include "compat4.h"
00074 #include "bn.h"
00075 #include "db5.h"
00076 #include "tcl.h"
00077
00078 #include "nmg.h"
00079
00080 __BEGIN_DECLS
00081
00082 #ifndef RT_EXPORT
00083 # if defined(_WIN32) && !defined(__CYGWIN__) && defined(BRLCAD_DLL)
00084 # ifdef RT_EXPORT_DLL
00085 # define RT_EXPORT __declspec(dllexport)
00086 # else
00087 # define RT_EXPORT __declspec(dllimport)
00088 # endif
00089 # else
00090 # define RT_EXPORT
00091 # endif
00092 #endif
00093
00094 #define RAYTRACE_H_VERSION "@(#)$Header: /cvsroot/brlcad/brlcad/include/raytrace.h,v 14.45 2006/09/18 05:24:07 lbutler Exp $ (BRL)"
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 #define DEBUG_OFF 0
00106
00107
00108
00109
00110 #define DEBUG_ALLRAYS 0x00000001
00111 #define DEBUG_ALLHITS 0x00000002
00112 #define DEBUG_SHOOT 0x00000004
00113 #define DEBUG_INSTANCE 0x00000008
00114
00115
00116 #define DEBUG_DB 0x00000010
00117 #define DEBUG_SOLIDS 0x00000020
00118 #define DEBUG_REGIONS 0x00000040
00119 #define DEBUG_ARB8 0x00000080
00120 #define DEBUG_SPLINE 0x00000100
00121 #define DEBUG_ANIM 0x00000200
00122 #define DEBUG_ANIM_FULL 0x00000400
00123 #define DEBUG_VOL 0x00000800
00124
00125
00126 #define DEBUG_ROOTS 0x00001000
00127 #define DEBUG_PARTITION 0x00002000
00128 #define DEBUG_CUT 0x00004000
00129 #define DEBUG_BOXING 0x00008000
00130 #define DEBUG_MEM 0x00010000
00131 #define DEBUG_MEM_FULL 0x00020000
00132 #define DEBUG_FDIFF 0x00040000
00133 #define DEBUG_PARALLEL 0x00080000
00134 #define DEBUG_CUTDETAIL 0x00100000
00135 #define DEBUG_TREEWALK 0x00200000
00136 #define DEBUG_TESTING 0x00400000
00137 #define DEBUG_ADVANCE 0x00800000
00138 #define DEBUG_MATH 0x01000000
00139
00140
00141 #define DEBUG_EBM 0x02000000
00142 #define DEBUG_HF 0x04000000
00143
00144
00145 #define DEBUG_PLOTSOLIDS 0x40000000
00146 #define DEBUG_PLOTBOX 0x80000000
00147
00148
00149 #define DEBUG_FORMAT \
00150 "\020\040PLOTBOX\
00151 \037PLOTSOLIDS\
00152 \033HF\032EBM\031MATH\030ADVANCE\
00153 \027TESTING\026TREEWALK\025CUTDETAIL\024PARALLEL\023FDIFF\022MEM_FULL\
00154 \021MEM\020BOXING\017CUTTING\016PARTITION\015ROOTS\014VOL\
00155 \013ANIM_FULL\012ANIM\011SPLINE\010ARB8\7REGIONS\6SOLIDS\5DB\
00156 \4INSTANCE\3SHOOT\2ALLHITS\1ALLRAYS"
00157
00158
00159
00160
00161
00162
00163
00164 #ifdef INFINITY
00165 # undef INFINITY
00166 #endif
00167
00168 #if defined(vax) || (defined(sgi) && !defined(mips))
00169 # define INFINITY (1.0e20)
00170 #else
00171 # define INFINITY (1.0e40)
00172 #endif
00173
00174 #define RT_BADNUM(n) (!((n) >= -INFINITY && (n) <= INFINITY))
00175 #define RT_BADVEC(v) (RT_BADNUM((v)[X]) || RT_BADNUM((v)[Y]) || RT_BADNUM((v)[Z]))
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204 #define RT_LEN_TOL (1.0e-8)
00205 #define RT_DOT_TOL (0.001)
00206 #define RT_PCOEF_TOL (1.0e-10)
00207
00208
00209
00210
00211
00212
00213
00214
00215 struct rt_tess_tol {
00216 long magic;
00217 double abs;
00218 double rel;
00219 double norm;
00220 };
00221 #define RT_TESS_TOL_MAGIC 0xb9090dab
00222 #define RT_CK_TESS_TOL(_p) BU_CKMAG(_p, RT_TESS_TOL_MAGIC, "rt_tess_tol")
00223
00224
00225
00226
00227
00228
00229
00230 struct rt_db_internal {
00231 long idb_magic;
00232 int idb_major_type;
00233 int idb_minor_type;
00234 const struct rt_functab *idb_meth;
00235 genptr_t idb_ptr;
00236 struct bu_attribute_value_set idb_avs;
00237 };
00238 #define idb_type idb_minor_type
00239 #define RT_DB_INTERNAL_MAGIC 0x0dbbd867
00240 #define RT_INIT_DB_INTERNAL(_p) {(_p)->idb_magic = RT_DB_INTERNAL_MAGIC; \
00241 (_p)->idb_type = -1; (_p)->idb_ptr = GENPTR_NULL;\
00242 (_p)->idb_avs.magic = -1;}
00243 #define RT_CK_DB_INTERNAL(_p) BU_CKMAG(_p, RT_DB_INTERNAL_MAGIC, "rt_db_internal")
00244
00245
00246
00247
00248
00249
00250 struct db_full_path {
00251 long magic;
00252 int fp_len;
00253 int fp_maxlen;
00254 struct directory **fp_names;
00255 };
00256 #define DB_FULL_PATH_POP(_pp) {(_pp)->fp_len--;}
00257 #define DB_FULL_PATH_CUR_DIR(_pp) ((_pp)->fp_names[(_pp)->fp_len-1])
00258 #define DB_FULL_PATH_GET(_pp,_i) ((_pp)->fp_names[(_i)])
00259 #define DB_FULL_PATH_MAGIC 0x64626670
00260 #define RT_CK_FULL_PATH(_p) BU_CKMAG(_p, DB_FULL_PATH_MAGIC, "db_full_path")
00261
00262
00263
00264
00265
00266
00267
00268 struct xray {
00269 long magic;
00270 int index;
00271 point_t r_pt;
00272 vect_t r_dir;
00273 fastf_t r_min;
00274 fastf_t r_max;
00275 };
00276 #define RAY_NULL ((struct xray *)0)
00277 #define RT_RAY_MAGIC 0x78726179
00278 #define RT_CK_RAY(_p) BU_CKMAG(_p,RT_RAY_MAGIC,"struct xray");
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292 struct hit {
00293 long hit_magic;
00294 fastf_t hit_dist;
00295 point_t hit_point;
00296 vect_t hit_normal;
00297 vect_t hit_vpriv;
00298 genptr_t hit_private;
00299 int hit_surfno;
00300 struct xray *hit_rayp;
00301 };
00302 #define HIT_NULL ((struct hit *)0)
00303 #define RT_HIT_MAGIC 0x20686974
00304 #define RT_CK_HIT(_p) BU_CKMAG(_p,RT_HIT_MAGIC,"struct hit")
00305
00306
00307
00308
00309
00310
00311
00312
00313 #define RT_HIT_NORM( _hitp, _stp, _unused ) { \
00314 RT_CK_HIT(_hitp); \
00315 RT_CK_SOLTAB(_stp); \
00316 (_stp)->st_meth->ft_norm(_hitp, _stp, (_hitp)->hit_rayp); }
00317
00318
00319
00320
00321
00322
00323
00324
00325 #define RT_HIT_NORMAL( _normal, _hitp, _stp, _unused, _flipflag ) { \
00326 RT_CK_HIT(_hitp); \
00327 RT_CK_SOLTAB(_stp); \
00328 RT_CK_FUNCTAB((_stp)->st_meth); \
00329 (_stp)->st_meth->ft_norm(_hitp, _stp, (_hitp)->hit_rayp); \
00330 if( _flipflag ) { \
00331 VREVERSE( _normal, (_hitp)->hit_normal ); \
00332 } else { \
00333 VMOVE( _normal, (_hitp)->hit_normal ); \
00334 } \
00335 }
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353 struct curvature {
00354 vect_t crv_pdir;
00355 fastf_t crv_c1;
00356 fastf_t crv_c2;
00357 };
00358 #define CURVE_NULL ((struct curvature *)0)
00359
00360
00361
00362
00363
00364
00365
00366
00367 #define RT_CURVATURE( _curvp, _hitp, _flipflag, _stp ) { \
00368 RT_CK_HIT(_hitp); \
00369 RT_CK_SOLTAB(_stp); \
00370 RT_CK_FUNCTAB((_stp)->st_meth); \
00371 (_stp)->st_meth->ft_curve( _curvp, _hitp, _stp ); \
00372 if( _flipflag ) { \
00373 (_curvp)->crv_c1 = - (_curvp)->crv_c1; \
00374 (_curvp)->crv_c2 = - (_curvp)->crv_c2; \
00375 } \
00376 }
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386 struct uvcoord {
00387 fastf_t uv_u;
00388 fastf_t uv_v;
00389 fastf_t uv_du;
00390 fastf_t uv_dv;
00391 };
00392 #define RT_HIT_UVCOORD( ap, _stp, _hitp, uvp ) { \
00393 RT_CK_HIT(_hitp); \
00394 RT_CK_SOLTAB(_stp); \
00395 RT_CK_FUNCTAB((_stp)->st_meth); \
00396 (_stp)->st_meth->ft_uv( ap, _stp, _hitp, uvp ); }
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412 struct seg {
00413 struct bu_list l;
00414 struct hit seg_in;
00415 struct hit seg_out;
00416 struct soltab *seg_stp;
00417 };
00418 #define RT_SEG_NULL ((struct seg *)0)
00419 #define RT_SEG_MAGIC 0x98bcdef1
00420
00421 #define RT_CHECK_SEG(_p) BU_CKMAG(_p, RT_SEG_MAGIC, "struct seg")
00422 #define RT_CK_SEG(_p) BU_CKMAG(_p, RT_SEG_MAGIC, "struct seg")
00423
00424 #define RT_GET_SEG(p,res) { \
00425 while( !BU_LIST_WHILE((p),seg,&((res)->re_seg)) || !(p) ) \
00426 rt_get_seg(res); \
00427 BU_LIST_DEQUEUE( &((p)->l) ); \
00428 (p)->l.forw = (p)->l.back = BU_LIST_NULL; \
00429 (p)->seg_in.hit_magic = (p)->seg_out.hit_magic = RT_HIT_MAGIC; \
00430 res->re_segget++; }
00431
00432 #define RT_FREE_SEG(p,res) { \
00433 RT_CHECK_SEG(p); \
00434 BU_LIST_INSERT( &((res)->re_seg), &((p)->l) ); \
00435 res->re_segfree++; }
00436
00437
00438
00439
00440
00441 #define RT_FREE_SEG_LIST( _segheadp, _res ) { \
00442 register struct seg *_a; \
00443 while( BU_LIST_WHILE( _a, seg, &((_segheadp)->l) ) ) { \
00444 BU_LIST_DEQUEUE( &(_a->l) ); \
00445 RT_FREE_SEG( _a, _res ); \
00446 } }
00447
00448
00449
00450
00451
00452 struct bound_rpp {
00453 point_t min;
00454 point_t max;
00455 };
00456
00457 #if 0
00458
00459
00460
00461 #define RT_2RPP_DISJOINT(_l1, _h1, _l2, _h2) \
00462 V3RPP_DISJOINT(_l1, _h1, _l2, _h2)
00463
00464
00465 #define RT_POINT_IN_RPP(_pt, _min, _max) \
00466 V3PT_IN_RPP(_pt, _min, _max)
00467 #endif
00468
00469
00470
00471
00472
00473
00474
00475 struct soltab {
00476 struct bu_list l;
00477 struct bu_list l2;
00478 const struct rt_functab *st_meth;
00479 struct rt_i *st_rtip;
00480 long st_uses;
00481 int st_id;
00482 point_t st_center;
00483 fastf_t st_aradius;
00484 fastf_t st_bradius;
00485 genptr_t st_specific;
00486 const struct directory *st_dp;
00487 point_t st_min;
00488 point_t st_max;
00489 long st_bit;
00490 struct bu_ptbl st_regions;
00491 matp_t st_matp;
00492 struct db_full_path st_path;
00493
00494 long st_npieces;
00495 long st_piecestate_num;
00496 struct bound_rpp *st_piece_rpps;
00497 };
00498 #define st_name st_dp->d_namep
00499 #define RT_SOLTAB_NULL ((struct soltab *)0)
00500 #define SOLTAB_NULL RT_SOLTAB_NULL
00501 #define RT_SOLTAB_MAGIC 0x92bfcde0
00502 #define RT_SOLTAB2_MAGIC 0x92bfcde2
00503
00504 #define RT_CHECK_SOLTAB(_p) BU_CKMAG( _p, RT_SOLTAB_MAGIC, "struct soltab")
00505 #define RT_CK_SOLTAB(_p) BU_CKMAG( _p, RT_SOLTAB_MAGIC, "struct soltab")
00506
00507
00508
00509
00510 #define ID_NULL 0
00511 #define ID_TOR 1
00512 #define ID_TGC 2
00513 #define ID_ELL 3
00514 #define ID_ARB8 4
00515 #define ID_ARS 5
00516 #define ID_HALF 6
00517 #define ID_REC 7
00518 #define ID_POLY 8
00519 #define ID_BSPLINE 9
00520 #define ID_SPH 10
00521 #define ID_NMG 11
00522 #define ID_EBM 12
00523 #define ID_VOL 13
00524 #define ID_ARBN 14
00525 #define ID_PIPE 15
00526 #define ID_PARTICLE 16
00527 #define ID_RPC 17
00528 #define ID_RHC 18
00529 #define ID_EPA 19
00530 #define ID_EHY 20
00531 #define ID_ETO 21
00532 #define ID_GRIP 22
00533 #define ID_JOINT 23
00534 #define ID_HF 24
00535 #define ID_DSP 25
00536 #define ID_SKETCH 26
00537 #define ID_EXTRUDE 27
00538 #define ID_SUBMODEL 28
00539 #define ID_CLINE 29
00540 #define ID_BOT 30
00541
00542
00543
00544
00545 #define ID_MAX_SOLID 37
00546
00547
00548
00549
00550 #define ID_COMBINATION 31
00551 #define ID_BINEXPM 32
00552 #define ID_BINUNIF 33
00553 #define ID_BINMIME 34
00554
00555
00556 #define ID_SUPERELL 35
00557 #define ID_METABALL 36
00558
00559 #define ID_MAXIMUM 37
00560
00561
00562
00563
00564 struct mater_info {
00565 float ma_color[3];
00566 float ma_temperature;
00567 char ma_color_valid;
00568 char ma_cinherit;
00569 char ma_minherit;
00570 char *ma_shader;
00571 };
00572
00573
00574
00575
00576
00577
00578 struct region {
00579 struct bu_list l;
00580 const char *reg_name;
00581 union tree *reg_treetop;
00582 int reg_bit;
00583 int reg_regionid;
00584 int reg_aircode;
00585 int reg_gmater;
00586 int reg_los;
00587 struct mater_info reg_mater;
00588 genptr_t reg_mfuncs;
00589 genptr_t reg_udata;
00590 int reg_transmit;
00591 long reg_instnum;
00592 short reg_all_unions;
00593 short reg_is_fastgen;
00594 #define REGION_NON_FASTGEN 0
00595 #define REGION_FASTGEN_PLATE 1
00596 #define REGION_FASTGEN_VOLUME 2
00597 struct bu_mro **attr_values;
00598
00599
00600 };
00601 #define REGION_NULL ((struct region *)0)
00602 #define RT_REGION_MAGIC 0xdffb8001
00603 #define RT_CK_REGION(_p) BU_CKMAG(_p,RT_REGION_MAGIC,"struct region")
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616 struct partition {
00617
00618 long pt_magic;
00619 struct partition *pt_forw;
00620 struct partition *pt_back;
00621 struct seg *pt_inseg;
00622 struct hit *pt_inhit;
00623 struct seg *pt_outseg;
00624 struct hit *pt_outhit;
00625 struct region *pt_regionp;
00626 char pt_inflip;
00627 char pt_outflip;
00628 struct region **pt_overlap_reg;
00629 struct bu_ptbl pt_seglist;
00630 };
00631 #define PT_NULL ((struct partition *)0)
00632 #define PT_MAGIC 0x87687681
00633 #define PT_HD_MAGIC 0x87687680
00634
00635 #define RT_CHECK_PT(_p) RT_CK_PT(_p)
00636 #define RT_CK_PT(_p) BU_CKMAG(_p,PT_MAGIC, "struct partition")
00637 #define RT_CK_PARTITION(_p) BU_CKMAG(_p,PT_MAGIC, "struct partition")
00638 #define RT_CK_PT_HD(_p) BU_CKMAG(_p,PT_HD_MAGIC, "struct partition list head")
00639
00640
00641 #define RT_PT_MIDDLE_START pt_inseg
00642 #define RT_PT_MIDDLE_END pt_seglist.l.magic
00643 #define RT_PT_MIDDLE_LEN(p) \
00644 (((char *)&(p)->RT_PT_MIDDLE_END) - ((char *)&(p)->RT_PT_MIDDLE_START))
00645
00646 #define RT_DUP_PT(ip,new,old,res) { \
00647 GET_PT(ip,new,res); \
00648 memcpy((char *)(&(new)->RT_PT_MIDDLE_START), (char *)(&(old)->RT_PT_MIDDLE_START), RT_PT_MIDDLE_LEN(old) ); \
00649 (new)->pt_overlap_reg = NULL; \
00650 bu_ptbl_cat( &(new)->pt_seglist, &(old)->pt_seglist ); }
00651
00652
00653 #define GET_PT_INIT(ip,p,res) {\
00654 GET_PT(ip,p,res); \
00655 memset( ((char *) &(p)->RT_PT_MIDDLE_START), 0, RT_PT_MIDDLE_LEN(p) ); }
00656
00657 #define GET_PT(ip,p,res) { \
00658 if( BU_LIST_NON_EMPTY_P(p, partition, &res->re_parthead) ) { \
00659 BU_LIST_DEQUEUE((struct bu_list *)(p)); \
00660 bu_ptbl_reset( &(p)->pt_seglist ); \
00661 } else { \
00662 (p) = (struct partition *)bu_calloc(1, sizeof(struct partition), "struct partition"); \
00663 (p)->pt_magic = PT_MAGIC; \
00664 bu_ptbl_init( &(p)->pt_seglist, 42, "pt_seglist ptbl" ); \
00665 (res)->re_partlen++; \
00666 } \
00667 res->re_partget++; }
00668
00669 #define FREE_PT(p,res) { \
00670 BU_LIST_APPEND( &(res->re_parthead), (struct bu_list *)(p) ); \
00671 if( (p)->pt_overlap_reg ) { \
00672 bu_free( (genptr_t)((p)->pt_overlap_reg), "pt_overlap_reg" );\
00673 (p)->pt_overlap_reg = NULL; \
00674 } \
00675 res->re_partfree++; }
00676
00677 #define RT_FREE_PT_LIST( _headp, _res ) { \
00678 register struct partition *_pp, *_zap; \
00679 for( _pp = (_headp)->pt_forw; _pp != (_headp); ) { \
00680 _zap = _pp; \
00681 _pp = _pp->pt_forw; \
00682 BU_LIST_DEQUEUE( (struct bu_list *)(_zap) ); \
00683 FREE_PT(_zap, _res); \
00684 } \
00685 (_headp)->pt_forw = (_headp)->pt_back = (_headp); \
00686 }
00687
00688
00689 #define INSERT_PT(_new,_old) BU_LIST_INSERT((struct bu_list *)_old,(struct bu_list *)_new)
00690
00691
00692 #define APPEND_PT(_new,_old) BU_LIST_APPEND((struct bu_list *)_old,(struct bu_list *)_new)
00693
00694
00695 #define DEQUEUE_PT(_cur) BU_LIST_DEQUEUE((struct bu_list *)_cur)
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708 union cutter {
00709 #define CUT_CUTNODE 1
00710 #define CUT_BOXNODE 2
00711 #define CUT_NUGRIDNODE 3
00712 #define CUT_MAXIMUM 3
00713 int cut_type;
00714 union cutter *cut_forw;
00715 struct cutnode {
00716 int cn_type;
00717 int cn_axis;
00718 fastf_t cn_point;
00719 union cutter *cn_l;
00720 union cutter *cn_r;
00721 } cn;
00722 struct boxnode {
00723 int bn_type;
00724 fastf_t bn_min[3];
00725 fastf_t bn_max[3];
00726 struct soltab **bn_list;
00727 int bn_len;
00728 int bn_maxlen;
00729 struct rt_piecelist *bn_piecelist;
00730 int bn_piecelen;
00731 int bn_maxpiecelen;
00732 } bn;
00733 struct nugridnode {
00734 int nu_type;
00735 struct nu_axis {
00736 fastf_t nu_spos;
00737 fastf_t nu_epos;
00738 fastf_t nu_width;
00739 } *nu_axis[3];
00740 int nu_cells_per_axis[3];
00741 int nu_stepsize[3];
00742 union cutter *nu_grid;
00743 } nugn;
00744 };
00745
00746 #define CUTTER_NULL ((union cutter *)0)
00747
00748
00749
00750
00751
00752
00753
00754 struct mem_map {
00755 struct mem_map *m_nxtp;
00756 unsigned m_size;
00757 unsigned long m_addr;
00758 };
00759 #define MAP_NULL ((struct mem_map *) 0)
00760
00761
00762
00763
00764
00765
00766 #define RT_DBNHASH 1024
00767
00768 #if ((RT_DBNHASH)&((RT_DBNHASH)-1)) != 0
00769 #define RT_DBHASH(sum) ((unsigned)(sum) % (RT_DBNHASH))
00770 #else
00771 #define RT_DBHASH(sum) ((unsigned)(sum) & ((RT_DBNHASH)-1))
00772 #endif
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784 struct db_i {
00785 long dbi_magic;
00786
00787 char *dbi_filename;
00788 int dbi_read_only;
00789 double dbi_local2base;
00790 double dbi_base2local;
00791 char *dbi_title;
00792 char *const*dbi_filepath;
00793
00794 struct directory *dbi_Head[RT_DBNHASH];
00795 int dbi_fd;
00796 FILE *dbi_fp;
00797 long dbi_eof;
00798 long dbi_nrec;
00799 int dbi_uses;
00800 struct mem_map *dbi_freep;
00801 genptr_t dbi_inmem;
00802 struct animate *dbi_anroot;
00803 struct bu_mapped_file *dbi_mf;
00804 struct bu_ptbl dbi_clients;
00805 int dbi_version;
00806 struct rt_wdb *dbi_wdbp;
00807 };
00808 #define DBI_NULL ((struct db_i *)0)
00809 #define DBI_MAGIC 0x57204381
00810
00811 #define RT_CHECK_DBI(_p) BU_CKMAG(_p,DBI_MAGIC,"struct db_i")
00812 #define RT_CHECK_DBI_TCL(_interp,_p) BU_CKMAG_TCL(_interp,_p,DBI_MAGIC,"struct db_i")
00813 #define RT_CK_DBI(_p) RT_CHECK_DBI(_p)
00814 #define RT_CK_DBI_TCL(_interp,_p) RT_CHECK_DBI_TCL(_interp,_p)
00815
00816
00817
00818
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828
00829
00830
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841 struct directory {
00842 long d_magic;
00843 char *d_namep;
00844 union {
00845 long file_offset;
00846 genptr_t ptr;
00847 } d_un;
00848 struct directory *d_forw;
00849 struct animate *d_animate;
00850 long d_uses;
00851 long d_len;
00852 long d_nref;
00853 int d_flags;
00854 unsigned char d_major_type;
00855 unsigned char d_minor_type;
00856 struct bu_list d_use_hd;
00857 char d_shortname[16];
00858 };
00859 #define DIR_NULL ((struct directory *)0)
00860 #define RT_DIR_MAGIC 0x05551212
00861 #define RT_CK_DIR(_dp) BU_CKMAG(_dp, RT_DIR_MAGIC, "(librt)directory")
00862
00863 #define d_addr d_un.file_offset
00864 #define RT_DIR_PHONY_ADDR (-1L)
00865
00866
00867 #define DIR_SOLID 0x1
00868 #define DIR_COMB 0x2
00869 #define DIR_REGION 0x4
00870 #define DIR_HIDDEN 0x8
00871 #define DIR_NON_GEOM 0x10
00872 #define DIR_USED 0x80
00873 #define RT_DIR_INMEM 0x100
00874
00875
00876 #define LOOKUP_NOISY 1
00877 #define LOOKUP_QUIET 0
00878
00879 #define FOR_ALL_DIRECTORY_START(_dp,_dbip) { int _i; \
00880 for( _i = RT_DBNHASH-1; _i >= 0; _i-- ) { \
00881 for( (_dp) = (_dbip)->dbi_Head[_i]; (_dp); (_dp) = (_dp)->d_forw ) {
00882
00883 #define FOR_ALL_DIRECTORY_END }}}
00884
00885 #define RT_DIR_SET_NAMEP(_dp,_name) { \
00886 if( strlen(_name) < sizeof((_dp)->d_shortname) ) {\
00887 strncpy( (_dp)->d_shortname, (_name), sizeof((_dp)->d_shortname) ); \
00888 (_dp)->d_namep = (_dp)->d_shortname; \
00889 } else { \
00890 (_dp)->d_namep = bu_strdup(_name); \
00891 } }
00892
00893
00894 #define RT_DIR_FREE_NAMEP(_dp) { \
00895 if( (_dp)->d_namep != (_dp)->d_shortname ) \
00896 bu_free((_dp)->d_namep, "d_namep"); \
00897 (_dp)->d_namep = NULL; }
00898
00899 #if 1
00900
00901 #define RT_GET_DIRECTORY(_p,_res) { \
00902 while( ((_p) = (_res)->re_directory_hd) == NULL ) \
00903 db_get_directory(_res); \
00904 (_res)->re_directory_hd = (_p)->d_forw; \
00905 (_p)->d_forw = NULL; }
00906 #else
00907
00908 #define RT_GET_DIRECTORY(_p,_res) {BU_GETSTRUCT(_p, directory); \
00909 (_p)->d_magic = RT_DIR_MAGIC; \
00910 BU_LIST_INIT( &((_p)->d_use_hd) ); }
00911 #endif
00912
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922 struct rt_comb_internal {
00923 long magic;
00924 union tree *tree;
00925 char region_flag;
00926 char is_fastgen;
00927
00928 int region_id;
00929 int aircode;
00930 int GIFTmater;
00931 int los;
00932
00933 char rgb_valid;
00934 unsigned char rgb[3];
00935 float temperature;
00936 struct bu_vls shader;
00937 struct bu_vls material;
00938 char inherit;
00939 };
00940 #define RT_COMB_MAGIC 0x436f6d49
00941 #define RT_CHECK_COMB(_p) BU_CKMAG( _p , RT_COMB_MAGIC , "rt_comb_internal" )
00942 #define RT_CK_COMB(_p) RT_CHECK_COMB(_p)
00943 #define RT_CHECK_COMB_TCL(_interp,_p) BU_CKMAG_TCL(interp,_p,RT_COMB_MAGIC, "rt_comb_internal" )
00944 #define RT_CK_COMB_TCL(_interp,_p) RT_CHECK_COMB_TCL(_interp,_p)
00945
00946
00947
00948
00949
00950
00951
00952 struct rt_binunif_internal {
00953 long magic;
00954 int type;
00955 long count;
00956 union {
00957 float *flt;
00958 double *dbl;
00959 char *int8;
00960 short *int16;
00961 int *int32;
00962 long *int64;
00963 unsigned char *uint8;
00964 unsigned short *uint16;
00965 unsigned int *uint32;
00966 unsigned long *uint64;
00967 } u;
00968 };
00969 #define RT_BINUNIF_INTERNAL_MAGIC 0x42696e55
00970 #define RT_CHECK_BINUNIF(_p) BU_CKMAG( _p , RT_BINUNIF_INTERNAL_MAGIC , "rt_binunif_internal" )
00971 #define RT_CK_BINUNIF(_p) RT_CHECK_BINUNIF(_p)
00972 #define RT_CHECK_BINUNIF_TCL(_interp,_p) BU_CKMAG_TCL(interp,_p,RT_BINUNIF_MAGIC, "rt_binunif_internal" )
00973 #define RT_CK_BINUNIF_TCL(_interp,_p) RT_CHECK_BINUNIF_TCL(_interp,_p)
00974
00975
00976
00977
00978
00979
00980
00981 struct db_tree_state {
00982 long magic;
00983 struct db_i *ts_dbip;
00984 int ts_sofar;
00985
00986 int ts_regionid;
00987 int ts_aircode;
00988 int ts_gmater;
00989 int ts_los;
00990 struct mater_info ts_mater;
00991
00992
00993 mat_t ts_mat;
00994 int ts_is_fastgen;
00995 struct bu_attribute_value_set ts_attrs;
00996
00997 int ts_stop_at_regions;
00998 int (*ts_region_start_func) BU_ARGS((
00999 struct db_tree_state * ,
01000 struct db_full_path * ,
01001 const struct rt_comb_internal * ,
01002 genptr_t client_data
01003 ));
01004 union tree * (*ts_region_end_func) BU_ARGS((
01005 struct db_tree_state * ,
01006 struct db_full_path * ,
01007 union tree * ,
01008 genptr_t client_data
01009 ));
01010 union tree * (*ts_leaf_func) BU_ARGS((
01011 struct db_tree_state * ,
01012 struct db_full_path * ,
01013 struct rt_db_internal * ,
01014 genptr_t client_data
01015 ));
01016 const struct rt_tess_tol *ts_ttol;
01017 const struct bn_tol *ts_tol;
01018 struct model **ts_m;
01019 struct rt_i *ts_rtip;
01020 struct resource *ts_resp;
01021 };
01022 #define TS_SOFAR_MINUS 1
01023 #define TS_SOFAR_INTER 2
01024 #define TS_SOFAR_REGION 4
01025
01026 #define RT_DBTS_MAGIC 0x64627473
01027 #define RT_CK_DBTS(_p) BU_CKMAG(_p, RT_DBTS_MAGIC, "db_tree_state")
01028
01029
01030
01031
01032
01033
01034 struct db_traverse
01035 {
01036 long magic;
01037 struct db_i *dbip;
01038 void (*comb_enter_func) (
01039 struct db_i *,
01040 struct directory *,
01041 genptr_t);
01042 void (*comb_exit_func) (
01043 struct db_i *,
01044 struct directory *,
01045 genptr_t);
01046 void (*leaf_func) (
01047 struct db_i *,
01048 struct directory *,
01049 genptr_t);
01050 struct resource *resp;
01051 genptr_t client_data;
01052 };
01053 #define RT_DBTR_MAGIC 0x64627472
01054 #define RT_INIT_DBTR(_p) {(_p)->magic = RT_DBTR_MAGIC; \
01055 (_p)->dbip = GENPTR_NULL; (_p)->comb_enter_func = GENPTR_NULL; \
01056 (_p)->comb_exit_func = GENPTR_NULL; (_p)->leaf_func = GENPTR_NULL; \
01057 (_p)->resp = GENPTR_NULL; (_p)->client_data = GENPTR_NULL;}
01058 #define RT_CK_DBTR(_p) BU_CKMAG(_p, RT_DBTR_MAGIC, "db_traverse")
01059
01060
01061
01062
01063 struct combined_tree_state {
01064 long magic;
01065 struct db_tree_state cts_s;
01066 struct db_full_path cts_p;
01067 };
01068 #define RT_CTS_MAGIC 0x98989123
01069 #define RT_CK_CTS(_p) BU_CKMAG(_p, RT_CTS_MAGIC, "combined_tree_state")
01070
01071
01072
01073
01074
01075
01076 #define MKOP(x) (x)
01077
01078 #define OP_SOLID MKOP(1)
01079 #define OP_UNION MKOP(2)
01080 #define OP_INTERSECT MKOP(3)
01081 #define OP_SUBTRACT MKOP(4)
01082 #define OP_XOR MKOP(5)
01083 #define OP_REGION MKOP(6)
01084 #define OP_NOP MKOP(7)
01085
01086 #define OP_NOT MKOP(8)
01087 #define OP_GUARD MKOP(9)
01088 #define OP_XNOP MKOP(10)
01089 #define OP_NMG_TESS MKOP(11)
01090
01091 #define OP_DB_LEAF MKOP(12)
01092 #define OP_FREE MKOP(13)
01093
01094 union tree {
01095 long magic;
01096
01097 struct tree_node {
01098 long magic;
01099 int tb_op;
01100 struct region *tb_regionp;
01101 union tree *tb_left;
01102 union tree *tb_right;
01103 } tr_b;
01104 struct tree_leaf {
01105 long magic;
01106 int tu_op;
01107 struct region *tu_regionp;
01108 struct soltab *tu_stp;
01109 } tr_a;
01110 struct tree_cts {
01111 long magic;
01112 int tc_op;
01113 struct region *tc_pad;
01114 struct combined_tree_state *tc_ctsp;
01115 } tr_c;
01116 struct tree_nmgregion {
01117 long magic;
01118 int td_op;
01119 const char *td_name;
01120 struct nmgregion *td_r;
01121 } tr_d;
01122 struct tree_db_leaf {
01123 long magic;
01124 int tl_op;
01125 matp_t tl_mat;
01126 char *tl_name;
01127 } tr_l;
01128 };
01129
01130 #define tr_op tr_a.tu_op
01131 #define tr_regionp tr_a.tu_regionp
01132
01133 #define TREE_NULL ((union tree *)0)
01134 #define RT_TREE_MAGIC 0x91191191
01135 #define RT_CK_TREE(_p) BU_CKMAG(_p, RT_TREE_MAGIC, "union tree")
01136
01137
01138
01139
01140
01141
01142 struct rt_tree_array
01143 {
01144 union tree *tl_tree;
01145 int tl_op;
01146 };
01147
01148 #define TREE_LIST_NULL ((struct tree_list *)0)
01149
01150
01151 #define RT_MAXARGS 9000
01152 #define RT_MAXLINE 10240
01153
01154
01155
01156
01157
01158
01159
01160
01161
01162 struct rt_wdb {
01163 struct bu_list l;
01164 int type;
01165 struct db_i *dbip;
01166 struct bu_vls wdb_name;
01167 struct db_tree_state wdb_initial_tree_state;
01168 struct rt_tess_tol wdb_ttol;
01169 struct bn_tol wdb_tol;
01170 struct resource *wdb_resp;
01171
01172
01173 struct bu_vls wdb_prestr;
01174 int wdb_ncharadd;
01175 int wdb_num_dups;
01176
01177
01178 int wdb_item_default;
01179 int wdb_air_default;
01180 int wdb_mat_default;
01181 int wdb_los_default;
01182 struct bu_observer wdb_observers;
01183 Tcl_Interp *wdb_interp;
01184 };
01185
01186 #define RT_WDB_MAGIC 0x5f576462
01187 #define RT_CHECK_WDB(_p) BU_CKMAG(_p,RT_WDB_MAGIC,"rt_wdb")
01188 #define RT_CHECK_WDB_TCL(_interp,_p) BU_CKMAG_TCL(_interp,_p,RT_WDB_MAGIC,"rt_wdb")
01189 #define RT_CK_WDB(_p) RT_CHECK_WDB(_p)
01190 #define RT_CK_WDB_TCL(_interp,_p) RT_CHECK_WDB_TCL(_interp,_p)
01191 #define RT_WDB_NULL ((struct rt_wdb *)NULL)
01192 #define RT_WDB_TYPE_DB_DISK 2
01193 #define RT_WDB_TYPE_DB_DISK_APPEND_ONLY 3
01194 #define RT_WDB_TYPE_DB_INMEM 4
01195 #define RT_WDB_TYPE_DB_INMEM_APPEND_ONLY 5
01196
01197 RT_EXPORT extern struct rt_wdb HeadWDB;
01198
01199
01200
01201
01202 #define RT_VDRW_PREFIX "_VDRW"
01203 #define RT_VDRW_PREFIX_LEN 6
01204 #define RT_VDRW_MAXNAME 31
01205 #define RT_VDRW_DEF_COLOR 0xffff00
01206 struct vd_curve {
01207 struct bu_list l;
01208 char vdc_name[RT_VDRW_MAXNAME+1];
01209 long vdc_rgb;
01210 struct bu_list vdc_vhd;
01211 };
01212 #define VD_CURVE_NULL ((struct vd_curve *)NULL)
01213
01214
01215
01216
01217
01218 struct run_rt {
01219 struct bu_list l;
01220 #ifdef _WIN32
01221 HANDLE fd;
01222 HANDLE hProcess;
01223 DWORD pid;
01224
01225 #ifdef TCL_OK
01226 Tcl_Channel chan;
01227 #else
01228 genptr_t chan;
01229 #endif
01230 #else
01231 int fd;
01232 int pid;
01233 #endif
01234 int aborted;
01235 };
01236
01237
01238
01239
01240
01241
01242
01243
01244
01245
01246 struct dg_qray_color {
01247 unsigned char r;
01248 unsigned char g;
01249 unsigned char b;
01250 };
01251
01252 struct dg_qray_fmt {
01253 char type;
01254 struct bu_vls fmt;
01255 };
01256
01257 struct dg_obj {
01258 struct bu_list l;
01259 struct bu_vls dgo_name;
01260 struct rt_wdb *dgo_wdbp;
01261 struct bu_list dgo_headSolid;
01262 struct bu_list dgo_headVDraw;
01263 struct vd_curve *dgo_currVHead;
01264 struct solid *dgo_freeSolids;
01265 char *dgo_rt_cmd[RT_MAXARGS];
01266 int dgo_rt_cmd_len;
01267 struct bu_observer dgo_observers;
01268 struct run_rt dgo_headRunRt;
01269 struct bu_vls dgo_qray_basename;
01270 struct bu_vls dgo_qray_script;
01271 char dgo_qray_effects;
01272 int dgo_qray_cmd_echo;
01273 struct dg_qray_fmt *dgo_qray_fmts;
01274 struct dg_qray_color dgo_qray_odd_color;
01275 struct dg_qray_color dgo_qray_even_color;
01276 struct dg_qray_color dgo_qray_void_color;
01277 struct dg_qray_color dgo_qray_overlap_color;
01278 int dgo_shaded_mode;
01279 char *dgo_outputHandler;
01280 int dgo_uplotOutputMode;
01281 };
01282 RT_EXPORT extern struct dg_obj HeadDGObj;
01283 #define RT_DGO_NULL ((struct dg_obj *)NULL)
01284
01285
01286
01287
01288
01289
01290 struct view_obj {
01291 struct bu_list l;
01292 struct bu_vls vo_name;
01293 fastf_t vo_scale;
01294 fastf_t vo_size;
01295 fastf_t vo_invSize;
01296 fastf_t vo_perspective;
01297 fastf_t vo_local2base;
01298 fastf_t vo_base2local;
01299 vect_t vo_aet;
01300 vect_t vo_eye_pos;
01301 vect_t vo_keypoint;
01302 char vo_coord;
01303 char vo_rotate_about;
01304 mat_t vo_rotation;
01305 mat_t vo_center;
01306 mat_t vo_model2view;
01307 mat_t vo_pmodel2view;
01308 mat_t vo_view2model;
01309 mat_t vo_pmat;
01310 struct bu_observer vo_observers;
01311 void (*vo_callback)();
01312 genptr_t vo_clientData;
01313 int vo_zclip;
01314 };
01315 RT_EXPORT extern struct view_obj HeadViewObj;
01316 #define RT_VIEW_OBJ_NULL ((struct view_obj *)NULL)
01317 #define RT_MINVIEWSIZE 0.0001
01318 #define RT_MINVIEWSCALE 0.00005
01319
01320
01321
01322
01323
01324
01325
01326
01327
01328
01329
01330 struct anim_mat {
01331 int anm_op;
01332 mat_t anm_mat;
01333 };
01334 #define ANM_RSTACK 1
01335 #define ANM_RARC 2
01336 #define ANM_LMUL 3
01337 #define ANM_RMUL 4
01338 #define ANM_RBOTH 5
01339
01340 struct rt_anim_property {
01341 long magic;
01342 int anp_op;
01343 struct bu_vls anp_shader;
01344 };
01345 #define RT_ANP_REPLACE 1
01346 #define RT_ANP_APPEND 2
01347 #define RT_ANP_MAGIC 0x41507270
01348 #define RT_CK_ANP(_p) BU_CKMAG((_p), RT_ANP_MAGIC, "rt_anim_property")
01349
01350 struct rt_anim_color {
01351 int anc_rgb[3];
01352 };
01353
01354 struct animate {
01355 long magic;
01356 struct animate *an_forw;
01357 struct db_full_path an_path;
01358 int an_type;
01359 union animate_specific {
01360 struct anim_mat anu_m;
01361 struct rt_anim_property anu_p;
01362 struct rt_anim_color anu_c;
01363 float anu_t;
01364 } an_u;
01365 };
01366 #define RT_AN_MATRIX 1
01367 #define RT_AN_MATERIAL 2
01368 #define RT_AN_COLOR 3
01369 #define RT_AN_SOLID 4
01370 #define RT_AN_TEMPERATURE 5
01371
01372 #define ANIM_NULL ((struct animate *)0)
01373 #define ANIMATE_MAGIC 0x414e4963
01374 #define RT_CK_ANIMATE(_p) BU_CKMAG((_p), ANIMATE_MAGIC, "animate")
01375
01376
01377
01378
01379
01380
01381
01382 struct rt_htbl {
01383 struct bu_list l;
01384 int end;
01385 int blen;
01386 struct hit *hits;
01387 };
01388 #define RT_HTBL_MAGIC 0x6874626c
01389 #define RT_CK_HTBL(_p) BU_CKMAG(_p, RT_HTBL_MAGIC, "rt_htbl")
01390
01391
01392
01393
01394
01395
01396
01397
01398
01399
01400
01401 struct rt_piecestate {
01402 long magic;
01403 long ray_seqno;
01404 struct soltab *stp;
01405 struct bu_bitv *shot;
01406 fastf_t mindist;
01407 fastf_t maxdist;
01408 struct rt_htbl htab;
01409 const union cutter *cutp;
01410 };
01411 #define RT_PIECESTATE_MAGIC 0x70637374
01412 #define RT_CK_PIECESTATE(_p) BU_CKMAG(_p, RT_PIECESTATE_MAGIC, "struct rt_piecestate")
01413
01414
01415
01416
01417
01418
01419
01420
01421
01422
01423
01424
01425
01426
01427
01428
01429 struct rt_piecelist {
01430 long magic;
01431 long npieces;
01432 long *pieces;
01433 struct soltab *stp;
01434 };
01435 #define RT_PIECELIST_MAGIC 0x70636c73
01436 #define RT_CK_PIECELIST(_p) BU_CKMAG(_p, RT_PIECELIST_MAGIC, "struct rt_piecelist")
01437
01438
01439 #define RT_DEFAULT_MINPIECES 32
01440 #define RT_DEFAULT_TRIS_PER_PIECE 4
01441
01442
01443
01444
01445
01446
01447
01448
01449
01450
01451
01452
01453
01454
01455
01456
01457
01458
01459
01460
01461
01462
01463
01464
01465
01466
01467 struct resource {
01468 long re_magic;
01469 int re_cpu;
01470 struct bu_list re_seg;
01471 struct bu_ptbl re_seg_blocks;
01472 long re_seglen;
01473 long re_segget;
01474 long re_segfree;
01475 struct bu_list re_parthead;
01476 long re_partlen;
01477 long re_partget;
01478 long re_partfree;
01479 struct bu_list re_solid_bitv;
01480 struct bu_list re_region_ptbl;
01481 struct bu_list re_nmgfree;
01482 union tree **re_boolstack;
01483 long re_boolslen;
01484 float *re_randptr;
01485
01486 long re_nshootray;
01487 long re_nmiss_model;
01488
01489 long re_shots;
01490 long re_shot_hit;
01491 long re_shot_miss;
01492
01493 long re_prune_solrpp;
01494 long re_ndup;
01495 long re_nempty_cells;
01496
01497 struct rt_piecestate *re_pieces;
01498 long re_piece_ndup;
01499 long re_piece_shots;
01500 long re_piece_shot_hit;
01501 long re_piece_shot_miss;
01502 struct bu_ptbl re_pieces_pending;
01503
01504 union tree *re_tree_hd;
01505 long re_tree_get;
01506 long re_tree_malloc;
01507 long re_tree_free;
01508 struct directory *re_directory_hd;
01509 struct bu_ptbl re_directory_blocks;
01510 };
01511 RT_EXPORT extern struct resource rt_uniresource;
01512 #define RESOURCE_NULL ((struct resource *)0)
01513 #define RESOURCE_MAGIC 0x83651835
01514 #define RT_CK_RESOURCE(_p) BU_CKMAG(_p, RESOURCE_MAGIC, "struct resource")
01515
01516
01517 #define RT_GET_TREE(_tp,_res) { \
01518 if( ((_tp) = (_res)->re_tree_hd) != TREE_NULL ) { \
01519 (_res)->re_tree_hd = (_tp)->tr_b.tb_left; \
01520 (_tp)->tr_b.tb_left = TREE_NULL; \
01521 (_res)->re_tree_get++; \
01522 } else { \
01523 GETUNION( _tp, tree ); \
01524 (_res)->re_tree_malloc++; \
01525 }\
01526 }
01527 #define RT_FREE_TREE(_tp,_res) { \
01528 (_tp)->tr_b.tb_left = (_res)->re_tree_hd; \
01529 (_tp)->tr_b.tb_right = TREE_NULL; \
01530 (_res)->re_tree_hd = (_tp); \
01531 (_tp)->tr_b.tb_op = OP_FREE; \
01532 (_res)->re_tree_free++; \
01533 }
01534
01535
01536
01537
01538
01539
01540 struct rt_reprep_obj_list {
01541 int ntopobjs;
01542 char **topobjs;
01543 int nunprepped;
01544 char **unprepped;
01545
01546
01547 struct bu_ptbl paths;
01548 struct db_tree_state **tsp;
01549 struct bu_ptbl unprep_regions;
01550 long old_nsolids;
01551 long old_nregions;
01552 long nsolids_unprepped;
01553 long nregions_unprepped;
01554 };
01555
01556
01557
01558
01559
01560
01561
01562
01563
01564
01565
01566
01567
01568
01569
01570
01571 #define CORNER_PTS 4
01572 struct pixel_ext {
01573 unsigned long magic;
01574 struct xray corner[CORNER_PTS];
01575 };
01576
01577 #define PIXEL_EXT_MAGIC 0x50787400
01578 #define BU_CK_PIXEL_EXT(_p) BU_CKMAG(_p, PIXEL_EXT_MAGIC, "struct pixel_ext")
01579
01580
01581
01582
01583
01584
01585
01586
01587
01588
01589
01590
01591
01592
01593
01594
01595
01596
01597
01598
01599
01600
01601
01602
01603
01604
01605
01606
01607
01608
01609
01610
01611
01612
01613
01614
01615
01616
01617
01618
01619
01620
01621
01622
01623
01624
01625
01626
01627
01628
01629
01630 struct application {
01631 long a_magic;
01632
01633 struct xray a_ray;
01634 int (*a_hit)BU_ARGS( (struct application *, struct partition *, struct seg *));
01635 int (*a_miss)BU_ARGS( (struct application *));
01636 int a_onehit;
01637 fastf_t a_ray_length;
01638 struct rt_i *a_rt_i;
01639 int a_zero1;
01640
01641 struct resource *a_resource;
01642 int (*a_overlap)();
01643 void (*a_multioverlap)BU_ARGS( (struct application *,
01644 struct partition *,
01645 struct bu_ptbl *,
01646 struct partition *) );
01647 void (*a_logoverlap)BU_ARGS( (struct application *,
01648 const struct partition *,
01649 const struct bu_ptbl *,
01650 const struct partition *) );
01651 int a_level;
01652 int a_x;
01653 int a_y;
01654 char *a_purpose;
01655 fastf_t a_rbeam;
01656 fastf_t a_diverge;
01657 int a_return;
01658 int a_no_booleans;
01659 char **attrs;
01660
01661
01662
01663
01664
01665 struct pixel_ext *a_pixelext;
01666
01667 struct seg *a_finished_segs_hdp;
01668 struct partition *a_Final_Part_hdp;
01669 vect_t a_inv_dir;
01670
01671
01672 int a_user;
01673 genptr_t a_uptr;
01674 struct bn_tabdata *a_spectrum;
01675 fastf_t a_color[3];
01676 fastf_t a_dist;
01677 vect_t a_uvec;
01678 vect_t a_vvec;
01679 fastf_t a_refrac_index;
01680 fastf_t a_cumlen;
01681 int a_flag;
01682 int a_zero2;
01683 };
01684 #define RT_AFN_NULL ((int (*)())0)
01685 #define RT_AP_MAGIC 0x4170706c
01686 #define RT_CK_AP(_p) BU_CKMAG(_p,RT_AP_MAGIC,"struct application")
01687 #define RT_CK_APPLICATION(_p) BU_CKMAG(_p,RT_AP_MAGIC,"struct application")
01688 #define RT_CK_AP_TCL(_interp,_p) BU_CKMAG_TCL(_interp,_p,RT_AP_MAGIC,"struct application")
01689 #define RT_APPLICATION_INIT(_p) { \
01690 memset( (char *)(_p), 0, sizeof(struct application) ); \
01691 (_p)->a_magic = RT_AP_MAGIC; \
01692 }
01693
01694
01695 #ifdef NO_BOMBING_MACROS
01696 # define RT_AP_CHECK(_ap)
01697 #else
01698 # define RT_AP_CHECK(_ap) \
01699 {if((_ap)->a_zero1||(_ap)->a_zero2) \
01700 rt_bomb("corrupt application struct"); }
01701 #endif
01702
01703
01704
01705
01706
01707
01708
01709 struct rt_g {
01710 int debug;
01711
01712 int rtg_parallel;
01713 struct bu_list rtg_vlfree;
01714 int NMG_debug;
01715 struct rt_wdb rtg_headwdb;
01716 };
01717 RT_EXPORT extern struct rt_g rt_g;
01718
01719
01720
01721
01722
01723
01724 #ifdef NO_DEBUG_CHECKING
01725 # define RT_G_DEBUG 0
01726 #else
01727 # define RT_G_DEBUG rt_g.debug
01728 #endif
01729
01730
01731
01732
01733
01734
01735
01736
01737 #define RT_SEM_TREE0 (BU_SEM_LAST)
01738 #define RT_SEM_TREE1 (RT_SEM_TREE0+1)
01739 #define RT_SEM_TREE2 (RT_SEM_TREE1+1)
01740 #define RT_SEM_TREE3 (RT_SEM_TREE2+1)
01741 #define RT_SEM_WORKER (RT_SEM_TREE3+1)
01742 #define RT_SEM_STATS (RT_SEM_WORKER+1)
01743 #define RT_SEM_RESULTS (RT_SEM_STATS+1)
01744 #define RT_SEM_MODEL (RT_SEM_RESULTS+1)
01745
01746 #define RT_SEM_LAST (RT_SEM_MODEL+1)
01747
01748
01749
01750
01751
01752
01753
01754
01755
01756
01757
01758
01759
01760
01761
01762
01763 struct rt_i {
01764 long rti_magic;
01765
01766 int useair;
01767 int rti_save_overlaps;
01768 int rti_dont_instance;
01769 int rti_hasty_prep;
01770 int rti_nlights;
01771 int rti_prismtrace;
01772 char *rti_region_fix_file;
01773 int rti_space_partition;
01774 int rti_nugrid_dimlimit;
01775 struct bn_tol rti_tol;
01776 struct rt_tess_tol rti_ttol;
01777 fastf_t rti_max_beam_radius;
01778
01779 point_t mdl_min;
01780 point_t mdl_max;
01781 point_t rti_pmin;
01782 point_t rti_pmax;
01783 double rti_radius;
01784 struct db_i *rti_dbip;
01785
01786 int needprep;
01787 struct region **Regions;
01788 struct bu_list HeadRegion;
01789 genptr_t Orca_hash_tbl;
01790 struct bu_ptbl delete_regs;
01791
01792 long nregions;
01793 long nsolids;
01794 long rti_nrays;
01795 long nmiss_model;
01796 long nshots;
01797 long nmiss;
01798 long nhits;
01799 long nmiss_tree;
01800 long nmiss_solid;
01801 long ndup;
01802 long nempty_cells;
01803 union cutter rti_CutHead;
01804 union cutter rti_inf_box;
01805 union cutter *rti_CutFree;
01806 struct bu_ptbl rti_busy_cutter_nodes;
01807 struct bu_ptbl rti_cuts_waiting;
01808 int rti_cut_maxlen;
01809 int rti_ncut_by_type[CUT_MAXIMUM+1];
01810 int rti_cut_totobj;
01811 int rti_cut_maxdepth;
01812 struct soltab **rti_sol_by_type[ID_MAX_SOLID+1];
01813 int rti_nsol_by_type[ID_MAX_SOLID+1];
01814 int rti_maxsol_by_type;
01815 int rti_air_discards;
01816 struct bu_hist rti_hist_cellsize;
01817 struct bu_hist rti_hist_cell_pieces;
01818 struct bu_hist rti_hist_cutdepth;
01819 struct soltab **rti_Solids;
01820 struct bu_list rti_solidheads[RT_DBNHASH];
01821 struct bu_ptbl rti_resources;
01822 double rti_nu_gfactor;
01823 int rti_cutlen;
01824 int rti_cutdepth;
01825
01826 char *rti_treetop;
01827 int rti_uses;
01828
01829 int rti_nsolids_with_pieces;
01830
01831 int rti_add_to_new_solids_list;
01832 struct bu_ptbl rti_new_solids;
01833 };
01834
01835 #define RT_NU_GFACTOR_DEFAULT 1.5
01836
01837
01838 #define RTI_NULL ((struct rt_i *)0)
01839 #define RTI_MAGIC 0x99101658
01840
01841 #define RT_CHECK_RTI(_p) BU_CKMAG(_p,RTI_MAGIC,"struct rt_i")
01842 #define RT_CHECK_RTI_TCL(_interp,_p) BU_CKMAG_TCL(_interp,_p,RTI_MAGIC,"struct rt_i")
01843 #define RT_CK_RTI(_p) RT_CHECK_RTI(_p)
01844 #define RT_CK_RTI_TCL(_interp,_p) RT_CHECK_RTI_TCL(_interp,_p)
01845
01846 #define RT_PART_NUBSPT 0
01847 #define RT_PART_NUGRID 1
01848
01849
01850
01851
01852
01853
01854
01855
01856 #define RT_VISIT_ALL_SOLTABS_START(_s, _rti) { \
01857 register struct bu_list *_head = &((_rti)->rti_solidheads[0]); \
01858 for( ; _head < &((_rti)->rti_solidheads[RT_DBNHASH]); _head++ ) \
01859 for( BU_LIST_FOR( _s, soltab, _head ) ) {
01860
01861 #define RT_VISIT_ALL_SOLTABS_END } }
01862
01863
01864
01865
01866
01867
01868
01869
01870 #define RT_GET_VLIST(p) BN_GET_VLIST(&rt_g.rtg_vlfree, p)
01871
01872
01873 #define RT_FREE_VLIST(hd) BN_FREE_VLIST(&rt_g.rtg_vlfree, hd)
01874
01875 #define RT_ADD_VLIST(hd,pnt,draw) BN_ADD_VLIST(&rt_g.rtg_vlfree,hd,pnt,draw)
01876
01877
01878
01879
01880
01881
01882 #undef V2PRINT
01883 #undef VPRINT
01884 #undef HPRINT
01885 #define V2PRINT(a,b) bu_log("%s (%g, %g)\n", a, (b)[0], (b)[1] );
01886 #define VPRINT(a,b) bu_log("%s (%g, %g, %g)\n", a, (b)[0], (b)[1], (b)[2])
01887 #define HPRINT(a,b) bu_log("%s (%g, %g, %g, %g)\n", a, (b)[0], (b)[1], (b)[2], (b)[3])
01888
01889
01890
01891
01892
01893
01894 struct command_tab {
01895 char *ct_cmd;
01896 char *ct_parms;
01897 char *ct_comment;
01898 int (*ct_func)();
01899 int ct_min;
01900 int ct_max;
01901 };
01902
01903
01904
01905
01906
01907
01908 struct rt_point_labels {
01909 char str[8];
01910 point_t pt;
01911 };
01912
01913
01914
01915
01916
01917
01918 struct rt_pt_node {
01919 point_t p;
01920 struct rt_pt_node *next;
01921 };
01922
01923
01924
01925
01926
01927
01928
01929 struct line_seg
01930 {
01931 long magic;
01932 int start, end;
01933 };
01934 #define CURVE_LSEG_MAGIC 0x6c736567
01935
01936 struct carc_seg
01937 {
01938 long magic;
01939 int start, end;
01940 fastf_t radius;
01941
01942 int center_is_left;
01943
01944
01945 int orientation;
01946 int center;
01947 };
01948 #define CURVE_CARC_MAGIC 0x63617263
01949
01950 struct nurb_seg
01951 {
01952 long magic;
01953 int order;
01954 int pt_type;
01955 struct knot_vector k;
01956 int c_size;
01957 int *ctl_points;
01958 fastf_t *weights;
01959 };
01960 #define CURVE_NURB_MAGIC 0x6e757262
01961
01962 struct bezier_seg
01963 {
01964 long magic;
01965 int degree;
01966 int *ctl_points;
01967 };
01968 #define CURVE_BEZIER_MAGIC 0x62657a69
01969
01970
01971
01972
01973
01974
01975
01976
01977
01978
01979
01980
01981
01982
01983
01984
01985
01986
01987
01988 struct rt_functab {
01989 long magic;
01990 char ft_name[16];
01991 char ft_label[8];
01992 int ft_use_rpp;
01993 int (*ft_prep) BU_ARGS((struct soltab * ,
01994 struct rt_db_internal * ,
01995 struct rt_i * ));
01996 int (*ft_shot) BU_ARGS((struct soltab * ,
01997 struct xray * ,
01998 struct application * ,
01999 struct seg * ));
02000 void (*ft_print) BU_ARGS((const struct soltab * ));
02001 void (*ft_norm) BU_ARGS((struct hit * ,
02002 struct soltab * ,
02003 struct xray * ));
02004 int (*ft_piece_shot) BU_ARGS((
02005 struct rt_piecestate * ,
02006 struct rt_piecelist * ,
02007 double ,
02008 struct xray * ,
02009 struct application * ,
02010 struct seg * ));
02011 void (*ft_piece_hitsegs) BU_ARGS((
02012 struct rt_piecestate * ,
02013 struct seg * ,
02014 struct application * ));
02015 void (*ft_uv) BU_ARGS((struct application * ,
02016 struct soltab * ,
02017 struct hit * ,
02018 struct uvcoord * ));
02019 void (*ft_curve) BU_ARGS((struct curvature * ,
02020 struct hit * ,
02021 struct soltab * ));
02022 int (*ft_classify) BU_ARGS((
02023 const struct soltab * ,
02024 const vect_t ,
02025 const vect_t ,
02026 const struct bn_tol * ));
02027 void (*ft_free) BU_ARGS((struct soltab * ));
02028 int (*ft_plot) BU_ARGS((
02029 struct bu_list * ,
02030 struct rt_db_internal * ,
02031 const struct rt_tess_tol * ,
02032 const struct bn_tol * ));
02033 void (*ft_vshot) BU_ARGS((struct soltab * [],
02034 struct xray *[] ,
02035 struct seg [] , int ,
02036 struct application * ));
02037 int (*ft_tessellate) BU_ARGS((
02038 struct nmgregion ** ,
02039 struct model * ,
02040 struct rt_db_internal * ,
02041 const struct rt_tess_tol * ,
02042 const struct bn_tol * ));
02043 int (*ft_tnurb) BU_ARGS((
02044 struct nmgregion ** ,
02045 struct model * ,
02046 struct rt_db_internal * ,
02047 const struct bn_tol * ));
02048 int (*ft_import5) BU_ARGS((struct rt_db_internal * ,
02049 const struct bu_external * ,
02050 const mat_t ,
02051 const struct db_i * ,
02052 struct resource * ,
02053 const int minor_type));
02054 int (*ft_export5) BU_ARGS((struct bu_external * ,
02055 const struct rt_db_internal * ,
02056 double ,
02057 const struct db_i * ,
02058 struct resource * ,
02059 const int minor_type));
02060 int (*ft_import) BU_ARGS((struct rt_db_internal * ,
02061 const struct bu_external * ,
02062 const mat_t ,
02063 const struct db_i * ,
02064 struct resource * ));
02065 int (*ft_export) BU_ARGS((struct bu_external * ,
02066 const struct rt_db_internal * ,
02067 double ,
02068 const struct db_i * ,
02069 struct resource * ));
02070 void (*ft_ifree) BU_ARGS((struct rt_db_internal * ,
02071 struct resource * ));
02072 int (*ft_describe) BU_ARGS((struct bu_vls * ,
02073 const struct rt_db_internal * ,
02074 int ,
02075 double ,
02076 struct resource * ,
02077 struct db_i *));
02078 int (*ft_xform) BU_ARGS((struct rt_db_internal * ,
02079 const mat_t , struct rt_db_internal * ,
02080 int , struct db_i * ,
02081 struct resource * ));
02082 const struct bu_structparse *ft_parsetab;
02083 size_t ft_internal_size;
02084 unsigned long ft_internal_magic;
02085 #if defined(TCL_OK)
02086 int (*ft_tclget) BU_ARGS((Tcl_Interp *,
02087 const struct rt_db_internal *, const char *item));
02088 int (*ft_tcladjust) BU_ARGS((Tcl_Interp *,
02089 struct rt_db_internal *,
02090 int , char ** ,
02091 struct resource * ));
02092 int (*ft_tclform) BU_ARGS((const struct rt_functab *,
02093 Tcl_Interp *));
02094 #else
02095 int (*ft_tclget) BU_ARGS((genptr_t ,
02096 const struct rt_db_internal *, const char *item));
02097 int (*ft_tcladjust) BU_ARGS((genptr_t ,
02098 struct rt_db_internal *,
02099 int , char ** ,
02100 struct resource * ));
02101 int (*ft_tclform) BU_ARGS((const struct rt_functab *,
02102 genptr_t ));
02103 #endif
02104 void (*ft_make) BU_ARGS((const struct rt_functab *,
02105 struct rt_db_internal *, double ));
02106 };
02107 RT_EXPORT extern const struct rt_functab rt_functab[];
02108 RT_EXPORT extern const int rt_nfunctab;
02109 #define RT_FUNCTAB_MAGIC 0x46754e63
02110 #define RT_CK_FUNCTAB(_p) BU_CKMAG(_p, RT_FUNCTAB_MAGIC, "functab" );
02111
02112 #define RT_CLASSIFY_UNIMPLEMENTED BN_CLASSIFY_UNIMPLEMENTED
02113 #define RT_CLASSIFY_INSIDE BN_CLASSIFY_INSIDE
02114 #define RT_CLASSIFY_OVERLAPPING BN_CLASSIFY_OVERLAPPING
02115 #define RT_CLASSIFY_OUTSIDE BN_CLASSIFY_OUTSIDE
02116
02117
02118
02119
02120
02121
02122 struct rt_shootray_status {
02123 fastf_t dist_corr;
02124 fastf_t odist_corr;
02125 fastf_t box_start;
02126 fastf_t obox_start;
02127 fastf_t box_end;
02128 fastf_t obox_end;
02129 fastf_t model_start;
02130 fastf_t model_end;
02131 struct xray newray;
02132 struct application *ap;
02133 struct resource *resp;
02134 vect_t inv_dir;
02135 vect_t abs_inv_dir;
02136 int rstep[3];
02137 const union cutter *lastcut, *lastcell;
02138 const union cutter *curcut;
02139 point_t curmin, curmax;
02140 int igrid[3];
02141 vect_t tv;
02142 int out_axis;
02143 struct rt_shootray_status *old_status;
02144 int box_num;
02145 };
02146
02147 #define NUGRID_T_SETUP(_ax,_cval,_cno) \
02148 if( ssp->rstep[_ax] > 0 ) { \
02149 ssp->tv[_ax] = t0 + (nu_axis[_ax][_cno].nu_epos - _cval) * \
02150 ssp->inv_dir[_ax]; \
02151 } else if( ssp->rstep[_ax] < 0 ) { \
02152 ssp->tv[_ax] = t0 + (nu_axis[_ax][_cno].nu_spos - _cval) * \
02153 ssp->inv_dir[_ax]; \
02154 } else { \
02155 ssp->tv[_ax] = INFINITY; \
02156 }
02157 #define NUGRID_T_ADV(_ax,_cno) \
02158 if( ssp->rstep[_ax] != 0 ) { \
02159 ssp->tv[_ax] += nu_axis[_ax][_cno].nu_width * \
02160 ssp->abs_inv_dir[_ax]; \
02161 }
02162
02163 #define BACKING_DIST (-2.0)
02164 #define OFFSET_DIST 0.01
02165
02166
02167
02168
02169
02170
02171
02172
02173
02174
02175
02176
02177
02178
02179
02180
02181
02182
02183
02184
02185 #define FAST_NMG 1
02186
02187 #define NMG_HIT_LIST 0
02188 #define NMG_MISS_LIST 1
02189 #define NMG_RT_HIT_MAGIC 0x48697400
02190 #define NMG_RT_HIT_SUB_MAGIC 0x48696d00
02191 #define NMG_RT_MISS_MAGIC 0x4d697300
02192
02193
02194
02195
02196
02197 #define HMG_INBOUND_STATE(_hm) (((_hm)->in_out & 0x0f0) >> 4)
02198 #define HMG_OUTBOUND_STATE(_hm) ((_hm)->in_out & 0x0f)
02199
02200
02201 #define NMG_RAY_STATE_INSIDE 1
02202 #define NMG_RAY_STATE_ON 2
02203 #define NMG_RAY_STATE_OUTSIDE 4
02204 #define NMG_RAY_STATE_ANY 8
02205
02206 #define HMG_HIT_IN_IN 0x11
02207 #define HMG_HIT_IN_OUT 0x14
02208 #define HMG_HIT_OUT_IN 0x41
02209 #define HMG_HIT_OUT_OUT 0x44
02210 #define HMG_HIT_IN_ON 0x12
02211 #define HMG_HIT_ON_IN 0x21
02212 #define HMG_HIT_ON_ON 0x22
02213 #define HMG_HIT_OUT_ON 0x42
02214 #define HMG_HIT_ON_OUT 0x24
02215 #define HMG_HIT_ANY_ANY 0x88
02216
02217 #define NMG_VERT_ENTER 1
02218 #define NMG_VERT_ENTER_LEAVE 0
02219 #define NMG_VERT_LEAVE -1
02220 #define NMG_VERT_UNKNOWN -2
02221
02222 #define NMG_HITMISS_SEG_IN 0x696e00
02223 #define NMG_HITMISS_SEG_OUT 0x6f757400
02224
02225 struct hitmiss {
02226 struct bu_list l;
02227 struct hit hit;
02228 fastf_t dist_in_plane;
02229 int in_out;
02230
02231
02232 long *inbound_use;
02233 vect_t inbound_norm;
02234 long *outbound_use;
02235 vect_t outbound_norm;
02236 int start_stop;
02237 struct hitmiss *other;
02238
02239
02240
02241 };
02242
02243 #define NMG_CK_HITMISS(hm) {\
02244 switch (hm->l.magic) { \
02245 case NMG_RT_HIT_MAGIC: \
02246 case NMG_RT_HIT_SUB_MAGIC: \
02247 case NMG_RT_MISS_MAGIC: \
02248 break; \
02249 case NMG_MISS_LIST: \
02250 bu_log("%s[%d]: struct hitmiss has NMG_MISS_LIST magic #\n",\
02251 __FILE__, __LINE__); \
02252 rt_bomb("NMG_CK_HITMISS: going down in flames\n"); \
02253 case NMG_HIT_LIST: \
02254 bu_log("%s[%d]: struct hitmiss has NMG_MISS_LIST magic #\n",\
02255 __FILE__, __LINE__); \
02256 rt_bomb("NMG_CK_HITMISS: going down in flames\n"); \
02257 default: \
02258 bu_log("%s[%d]: bad struct hitmiss magic: %d:(0x%08x)\n", \
02259 __FILE__, __LINE__, hm->l.magic, hm->l.magic); \
02260 rt_bomb("NMG_CK_HITMISS: going down in flames\n"); \
02261 }\
02262 if (!hm->hit.hit_private) { \
02263 bu_log("%s[%d]: NULL hit_private in hitmiss struct\n", \
02264 __FILE__, __LINE__); \
02265 rt_bomb("NMG_CK_HITMISS: going down in flames\n"); \
02266 } \
02267 }
02268
02269 #define NMG_CK_HITMISS_LISTS(a_hit, rd) { \
02270 for (BU_LIST_FOR(a_hit, hitmiss, &rd->rd_hit)){NMG_CK_HITMISS(a_hit);} \
02271 for (BU_LIST_FOR(a_hit, hitmiss, &rd->rd_miss)){NMG_CK_HITMISS(a_hit);} }
02272
02273
02274
02275
02276
02277
02278
02279
02280
02281
02282
02283
02284
02285
02286
02287
02288
02289
02290
02291
02292
02293 #define NMG_PCA_EDGE 1
02294 #define NMG_PCA_EDGE_VERTEX 2
02295 #define NMG_PCA_VERTEX 3
02296 #define NMG_RAY_DATA_MAGIC 0x1651771
02297 #define NMG_CK_RD(_rd) NMG_CKMAG(_rd, NMG_RAY_DATA_MAGIC, "ray data");
02298 struct ray_data {
02299 long magic;
02300 struct model *rd_m;
02301 char *manifolds;
02302 vect_t rd_invdir;
02303 struct xray *rp;
02304 struct application *ap;
02305 struct seg *seghead;
02306 struct soltab *stp;
02307 const struct bn_tol *tol;
02308 struct hitmiss **hitmiss;
02309 struct bu_list rd_hit;
02310 struct bu_list rd_miss;
02311
02312
02313
02314
02315
02316
02317 point_t plane_pt;
02318
02319
02320
02321
02322 fastf_t ray_dist_to_plane;
02323
02324
02325
02326
02327
02328
02329
02330
02331 int face_subhit;
02332
02333
02334
02335
02336
02337 int classifying_ray;
02338 };
02339
02340
02341 #ifdef FAST_NMG
02342 #define GET_HITMISS(_p, _ap) { \
02343 (_p) = BU_LIST_FIRST( hitmiss, &((_ap)->a_resource->re_nmgfree) ); \
02344 if( BU_LIST_IS_HEAD( (_p), &((_ap)->a_resource->re_nmgfree ) ) ) \
02345 (_p) = (struct hitmiss *)bu_calloc(1, sizeof( struct hitmiss ), "hitmiss" ); \
02346 else \
02347 BU_LIST_DEQUEUE( &((_p)->l) ); \
02348 }
02349
02350 #define NMG_FREE_HITLIST(_p, _ap) { \
02351 BU_CK_LIST_HEAD( (_p) ); \
02352 BU_LIST_APPEND_LIST( &((_ap)->a_resource->re_nmgfree), (_p) ); \
02353 }
02354 #else
02355 #define GET_HITMISS(_p) { \
02356 char str[64]; \
02357 (void)sprintf(str, "GET_HITMISS %s %d", __FILE__, __LINE__); \
02358 (_p) = (struct hitmiss *)bu_calloc(1, sizeof(struct hitmiss), str); \
02359 }
02360
02361 #define FREE_HITMISS(_p) { \
02362 char str[64]; \
02363 (void)sprintf(str, "FREE_HITMISS %s %d", __FILE__, __LINE__); \
02364 (void)bu_free( (char *)_p, str); \
02365 }
02366
02367 #define NMG_FREE_HITLIST(_p) { \
02368 struct hitmiss *_hit; \
02369 while ( BU_LIST_WHILE(_hit, hitmiss, _p)) { \
02370 NMG_CK_HITMISS(_hit); \
02371 BU_LIST_DEQUEUE( &_hit->l ); \
02372 FREE_HITMISS( _hit ); \
02373 } }
02374
02375 #endif
02376
02377 #define HIT 1
02378 #define MISS 0
02379
02380
02381 #ifdef NO_BOMBING_MACROS
02382 # define nmg_rt_bomb(rd, str)
02383 #else
02384 # define nmg_rt_bomb(rd, str) { \
02385 bu_log("%s", str); \
02386 if (rt_g.NMG_debug & DEBUG_NMGRT) rt_bomb("End of diagnostics"); \
02387 BU_LIST_INIT(&rd->rd_hit); \
02388 BU_LIST_INIT(&rd->rd_miss); \
02389 rt_g.NMG_debug |= DEBUG_NMGRT; \
02390 nmg_isect_ray_model(rd); \
02391 (void) nmg_ray_segs(rd); \
02392 rt_bomb("Should have bombed before this\n"); }
02393 #endif
02394
02395
02396 struct nmg_radial {
02397 struct bu_list l;
02398 struct edgeuse *eu;
02399 struct faceuse *fu;
02400 struct shell *s;
02401 int existing_flag;
02402 int is_crack;
02403 int is_outie;
02404 int needs_flip;
02405 fastf_t ang;
02406 };
02407 #define NMG_RADIAL_MAGIC 0x52614421
02408 #define NMG_CK_RADIAL(_p) NMG_CKMAG(_p, NMG_RADIAL_MAGIC, "nmg_radial")
02409
02410 struct nmg_inter_struct {
02411 long magic;
02412 struct bu_ptbl *l1;
02413 struct bu_ptbl *l2;
02414 fastf_t *mag1;
02415 fastf_t *mag2;
02416 int mag_len;
02417 struct shell *s1;
02418 struct shell *s2;
02419 struct faceuse *fu1;
02420 struct faceuse *fu2;
02421 struct bn_tol tol;
02422 int coplanar;
02423 struct edge_g_lseg *on_eg;
02424 point_t pt;
02425 vect_t dir;
02426 point_t pt2d;
02427 vect_t dir2d;
02428 fastf_t *vert2d;
02429 int maxindex;
02430 mat_t proj;
02431 const long *twod;
02432 };
02433 #define NMG_INTER_STRUCT_MAGIC 0x99912120
02434 #define NMG_CK_INTER_STRUCT(_p) NMG_CKMAG(_p, NMG_INTER_STRUCT_MAGIC, "nmg_inter_struct")
02435
02436
02437
02438
02439
02440
02441
02442 RT_EXPORT BU_EXTERN(struct rt_i *rt_dirbuild,
02443 (const char *filename,
02444 char *buf,
02445 int len));
02446
02447 RT_EXPORT BU_EXTERN(struct rt_i *rt_new_rti,
02448 (struct db_i *dbip));
02449 RT_EXPORT BU_EXTERN(void rt_free_rti,
02450 (struct rt_i *rtip));
02451 RT_EXPORT BU_EXTERN(void rt_prep,
02452 (struct rt_i *rtip));
02453 RT_EXPORT BU_EXTERN(void rt_prep_parallel,
02454 (struct rt_i *rtip,
02455 int ncpu));
02456
02457 RT_EXPORT BU_EXTERN(int rt_overlap_quietly,
02458 (struct application *ap,
02459 struct partition *pp,
02460 struct region *reg1,
02461 struct region *reg2,
02462 struct partition *pheadp));
02463 RT_EXPORT BU_EXTERN(void rt_default_multioverlap,
02464 (struct application *ap,
02465 struct partition *pp,
02466 struct bu_ptbl *regiontable,
02467 struct partition *InputHdp));
02468 RT_EXPORT BU_EXTERN(void rt_silent_logoverlap,
02469 (struct application *ap,
02470 const struct partition *pp,
02471 const struct bu_ptbl *regiontable,
02472 const struct partition *InputHdp));
02473 RT_EXPORT BU_EXTERN(void rt_default_logoverlap,
02474 (struct application *ap,
02475 const struct partition *pp,
02476 const struct bu_ptbl *regiontable,
02477 const struct partition *InputHdp));
02478
02479 RT_EXPORT BU_EXTERN(int rt_shootray,
02480 (struct application *ap));
02481
02482 RT_EXPORT BU_EXTERN(const char *rt_basename,
02483 (const char *str));
02484 RT_EXPORT BU_EXTERN(void rt_free_soltab,
02485 (struct soltab *stp));
02486 RT_EXPORT BU_EXTERN(int rt_gettree,
02487 (struct rt_i *rtip,
02488 const char *node));
02489 RT_EXPORT BU_EXTERN(int rt_gettrees,
02490 (struct rt_i *rtip,
02491 int argc,
02492 const char **argv, int ncpus));
02493 RT_EXPORT BU_EXTERN(int rt_gettrees_and_attrs,
02494 (struct rt_i *rtip,
02495 const char **attrs,
02496 int argc,
02497 const char **argv, int ncpus));
02498 RT_EXPORT BU_EXTERN(int rt_gettrees_muves,
02499 (struct rt_i *rtip,
02500 const char **attrs,
02501 int argc,
02502 const char **argv,
02503 int ncpus));
02504 RT_EXPORT BU_EXTERN(int rt_load_attrs,
02505 (struct rt_i *rtip,
02506 char **attrs));
02507
02508 RT_EXPORT BU_EXTERN(void rt_pr_seg,
02509 (const struct seg *segp));
02510
02511 RT_EXPORT BU_EXTERN(void rt_pr_partitions,
02512 (const struct rt_i *rtip,
02513 const struct partition *phead,
02514 const char *title));
02515
02516 RT_EXPORT BU_EXTERN(struct soltab *rt_find_solid,
02517 (const struct rt_i *rtip,
02518 const char *name));
02519
02520 RT_EXPORT BU_EXTERN(void rt_prep_timer,
02521 (void));
02522
02523 RT_EXPORT BU_EXTERN(double rt_get_timer,
02524 (struct bu_vls *vp,
02525 double *elapsed));
02526
02527 RT_EXPORT BU_EXTERN(double rt_read_timer,
02528 (char *str, int len));
02529
02530 int rt_plot_solid(
02531 FILE *fp,
02532 struct rt_i *rtip,
02533 const struct soltab *stp,
02534 struct resource *resp);
02535
02536 RT_EXPORT BU_EXTERN(void rt_clean,
02537 (struct rt_i *rtip));
02538 RT_EXPORT BU_EXTERN(int rt_del_regtree,
02539 (struct rt_i *rtip,
02540 struct region *delregp,
02541 struct resource *resp));
02542
02543 RT_EXPORT BU_EXTERN(void rt_ck,
02544 (struct rt_i *rtip));
02545 RT_EXPORT BU_EXTERN(void rt_pr_library_version,
02546 ());
02547
02548 RT_EXPORT BU_EXTERN(int rt_matrix_transform,
02549 (struct rt_db_internal *output, const mat_t matrix, struct rt_db_internal *input, int free, struct db_i *dbip, struct resource *resource));
02550
02551
02552
02553
02554
02555
02556
02557
02558
02559
02560
02561
02562 RT_EXPORT BU_EXTERN(void rt_boolweave,
02563 (struct seg *out_hd,
02564 struct seg *in_hd,
02565 struct partition *PartHeadp,
02566 struct application *ap));
02567
02568 RT_EXPORT BU_EXTERN(int rt_boolfinal,
02569 (struct partition *InputHdp,
02570 struct partition *FinalHdp,
02571 fastf_t startdist,
02572 fastf_t enddist,
02573 struct bu_ptbl *regionbits,
02574 struct application *ap,
02575 const struct bu_bitv *solidbits));
02576
02577 RT_EXPORT BU_EXTERN(void rt_grow_boolstack,
02578 (struct resource *res));
02579
02580 RT_EXPORT BU_EXTERN(int rt_fdiff,
02581 (double a, double b));
02582
02583 RT_EXPORT BU_EXTERN(double rt_reldiff,
02584 (double a, double b));
02585
02586 RT_EXPORT BU_EXTERN(void rt_pr_soltab,
02587 (const struct soltab *stp));
02588
02589 RT_EXPORT BU_EXTERN(void rt_pr_region,
02590 (const struct region *rp));
02591
02592 RT_EXPORT BU_EXTERN(void rt_pr_tree,
02593 (const union tree *tp,
02594 int lvl));
02595
02596 RT_EXPORT BU_EXTERN(void rt_pr_tree_val,
02597 (const union tree *tp,
02598 const struct partition *partp,
02599 int pr_name, int lvl));
02600
02601 RT_EXPORT BU_EXTERN(void rt_pr_pt,
02602 (const struct rt_i *rtip,
02603 const struct partition *pp));
02604
02605 RT_EXPORT BU_EXTERN(void rt_pr_hit,
02606 (const char *str,
02607 const struct hit *hitp));
02608
02609
02610
02611
02612
02613 RT_EXPORT BU_EXTERN(void rt_get_seg,
02614 (struct resource *res));
02615 RT_EXPORT BU_EXTERN(void rt_cut_it,
02616 (struct rt_i *rtip,
02617 int ncpu));
02618
02619 RT_EXPORT BU_EXTERN(void rt_pr_cut,
02620 (const union cutter *cutp,
02621 int lvl));
02622
02623 RT_EXPORT BU_EXTERN(void rt_fr_cut,
02624 (struct rt_i *rtip,
02625 union cutter *cutp));
02626
02627
02628
02629 RT_EXPORT BU_EXTERN(void rt_rebuild_overlaps,
02630 (struct partition *PartHdp,
02631 struct application *ap,
02632 int rebuild_fastgen_plates_only));
02633 RT_EXPORT BU_EXTERN(int rt_partition_len,
02634 (const struct partition *partheadp));
02635 RT_EXPORT BU_EXTERN(int rt_defoverlap,
02636 (struct application *ap,
02637 struct partition *pp,
02638 struct region *reg1,
02639 struct region *reg2,
02640 struct partition *pheadp));
02641
02642
02643
02644
02645
02646 RT_EXPORT BU_EXTERN(void rt_region_color_map,
02647 (struct region *regp));
02648
02649 RT_EXPORT BU_EXTERN(void rt_color_addrec,
02650 (int low,
02651 int hi,
02652 int r,
02653 int g,
02654 int b,
02655 long addr));
02656 RT_EXPORT BU_EXTERN(void rt_color_free,
02657 ());
02658
02659
02660
02661
02662 RT_EXPORT BU_EXTERN(void rt_pr_cut_info,
02663 (const struct rt_i *rtip,
02664 const char *str));
02665 RT_EXPORT BU_EXTERN(void remove_from_bsp,
02666 (struct soltab *stp,
02667 union cutter *cutp,
02668 struct bn_tol *tol));
02669 RT_EXPORT BU_EXTERN(void insert_in_bsp,
02670 (struct soltab *stp,
02671 union cutter *cutp));
02672 RT_EXPORT BU_EXTERN(void fill_out_bsp,
02673 (struct rt_i *rtip,
02674 union cutter *cutp,
02675 struct resource *resp,
02676 fastf_t bb[6]));
02677 RT_EXPORT BU_EXTERN(void rt_cut_extend,
02678 (union cutter *cutp,
02679 struct soltab *stp,
02680 const struct rt_i *rtip));
02681
02682 RT_EXPORT BU_EXTERN(int rt_rpp_region,
02683 (struct rt_i *rtip,
02684 const char *reg_name,
02685 fastf_t *min_rpp,
02686 fastf_t *max_rpp));
02687 RT_EXPORT BU_EXTERN(void rt_bomb,
02688 (const char *s));
02689 RT_EXPORT BU_EXTERN(int rt_in_rpp,
02690 (struct xray *rp,
02691 const fastf_t *invdir,
02692 const fastf_t *min,
02693 const fastf_t *max));
02694 RT_EXPORT BU_EXTERN(const union cutter *rt_cell_n_on_ray,
02695 (struct application *ap,
02696 int n));
02697 RT_EXPORT BU_EXTERN(void rt_cut_clean,
02698 (struct rt_i *rtip));
02699
02700
02701
02702 RT_EXPORT BU_EXTERN(char *rt_read_cmd,
02703 (FILE *fp));
02704 RT_EXPORT BU_EXTERN(int rt_split_cmd,
02705 (char **argv,
02706 int lim,
02707 char *lp));
02708
02709 RT_EXPORT BU_EXTERN(int rt_do_cmd,
02710 (struct rt_i *rtip,
02711 const char *ilp,
02712 const struct command_tab *tp));
02713
02714
02715
02716
02717
02718 RT_EXPORT BU_EXTERN(struct rt_wdb *wdb_fopen,
02719 (const char *filename));
02720 RT_EXPORT BU_EXTERN(struct rt_wdb *wdb_fopen_v,
02721 (const char *filename,
02722 int version));
02723 RT_EXPORT BU_EXTERN(struct rt_wdb *wdb_dbopen,
02724 (struct db_i *dbip,
02725 int mode));
02726 RT_EXPORT BU_EXTERN(int wdb_import,
02727 (struct rt_wdb *wdbp,
02728 struct rt_db_internal *internp,
02729 const char *name,
02730 const mat_t mat));
02731 RT_EXPORT BU_EXTERN(int wdb_export_external,
02732 (struct rt_wdb *wdbp,
02733 struct bu_external *ep,
02734 const char *name,
02735 int flags,
02736 unsigned char minor_type));
02737 RT_EXPORT BU_EXTERN(int wdb_put_internal,
02738 (struct rt_wdb *wdbp,
02739 const char *name,
02740 struct rt_db_internal *ip,
02741 double local2mm));
02742 RT_EXPORT BU_EXTERN(int wdb_export,
02743 (struct rt_wdb *wdbp,
02744 const char *name,
02745 genptr_t gp,
02746 int id,
02747 double local2mm));
02748 RT_EXPORT BU_EXTERN(void wdb_close,
02749 (struct rt_wdb *wdbp));
02750
02751
02752 RT_EXPORT BU_EXTERN(struct animate *db_parse_1anim,
02753 (struct db_i *dbip,
02754 int argc,
02755 const char **argv));
02756
02757 RT_EXPORT BU_EXTERN(int db_parse_anim,
02758 (struct db_i *dbip,
02759 int argc,
02760 const char **argv));
02761
02762
02763
02764 RT_EXPORT BU_EXTERN(int db_add_anim,
02765 (struct db_i *dbip,
02766 struct animate *anp,
02767 int root));
02768 RT_EXPORT BU_EXTERN(int db_do_anim,
02769 (struct animate *anp,
02770 mat_t stack,
02771 mat_t arc,
02772 struct mater_info *materp));
02773 RT_EXPORT BU_EXTERN(void db_free_anim,
02774 (struct db_i *dbip));
02775 RT_EXPORT BU_EXTERN(void db_write_anim,
02776 (FILE *fop,
02777 struct animate *anp));
02778 RT_EXPORT BU_EXTERN(struct animate *db_parse_1anim,
02779 (struct db_i *dbip,
02780 int argc,
02781 const char **argv));
02782 RT_EXPORT BU_EXTERN(void db_free_1anim,
02783 (struct animate *anp));
02784
02785
02786 RT_EXPORT BU_EXTERN(void db_full_path_init,
02787 (struct db_full_path *pathp));
02788 RT_EXPORT BU_EXTERN(void db_add_node_to_full_path,
02789 (struct db_full_path *pp,
02790 struct directory *dp));
02791 RT_EXPORT BU_EXTERN(void db_dup_full_path,
02792 (struct db_full_path *newp,
02793 const struct db_full_path *oldp));
02794 RT_EXPORT BU_EXTERN(void db_extend_full_path,
02795 (struct db_full_path *pathp,
02796 int incr));
02797 RT_EXPORT BU_EXTERN(void db_append_full_path,
02798 (struct db_full_path *dest,
02799 const struct db_full_path *src));
02800 RT_EXPORT BU_EXTERN(void db_dup_path_tail,
02801 (struct db_full_path *newp,
02802 const struct db_full_path *oldp,
02803 int start));
02804 RT_EXPORT BU_EXTERN(char *db_path_to_string,
02805 (const struct db_full_path *pp));
02806 RT_EXPORT BU_EXTERN(void db_path_to_vls,
02807 (struct bu_vls *str,
02808 const struct db_full_path *pp));
02809 RT_EXPORT BU_EXTERN(void db_pr_full_path,
02810 (const char *msg,
02811 const struct db_full_path *pathp));
02812 RT_EXPORT BU_EXTERN(int db_string_to_path,
02813 (struct db_full_path *pp,
02814 const struct db_i *dbip,
02815 const char *str));
02816 RT_EXPORT BU_EXTERN(int db_argv_to_path,
02817 (register struct db_full_path *pp,
02818 struct db_i *dbip,
02819 int argc,
02820 const char *const*argv));
02821 RT_EXPORT BU_EXTERN(void db_free_full_path,
02822 (struct db_full_path *pp));
02823 RT_EXPORT BU_EXTERN(int db_identical_full_paths,
02824 ( const struct db_full_path *a,
02825 const struct db_full_path *b));
02826 RT_EXPORT BU_EXTERN(int db_full_path_subset,
02827 (const struct db_full_path *a,
02828 const struct db_full_path *b));
02829 RT_EXPORT BU_EXTERN(int db_full_path_search,
02830 (const struct db_full_path *a,
02831 const struct directory *dp));
02832
02833
02834
02835 RT_EXPORT BU_EXTERN(void db_sync,
02836 (struct db_i *dbip));
02837
02838
02839 RT_EXPORT BU_EXTERN(struct db_i *db_open,
02840 (const char *name,
02841 const char *mode));
02842
02843 RT_EXPORT BU_EXTERN(struct db_i *db_create,
02844 (const char *name,
02845 int version));
02846
02847 RT_EXPORT BU_EXTERN(void db_close_client,
02848 (struct db_i *dbip,
02849 long *client));
02850 RT_EXPORT BU_EXTERN(void db_close,
02851 (struct db_i *dbip));
02852
02853 RT_EXPORT BU_EXTERN(int db_dump,
02854 (struct rt_wdb *wdbp,
02855 struct db_i *dbip));
02856 RT_EXPORT BU_EXTERN(struct db_i *db_clone_dbi,
02857 (struct db_i *dbip,
02858 long *client));
02859
02860
02861 RT_EXPORT BU_EXTERN(int db5_write_free,
02862 (struct db_i *dbip,
02863 struct directory *dp,
02864 long length));
02865 RT_EXPORT BU_EXTERN(int db5_realloc,
02866 (struct db_i *dbip,
02867 struct directory *dp,
02868 struct bu_external *ep));
02869
02870
02871 RT_EXPORT BU_EXTERN(void db5_export_object3,
02872 (struct bu_external *out,
02873 int dli,
02874 const char *name,
02875 const unsigned char hidden,
02876 const struct bu_external *attrib,
02877 const struct bu_external *body,
02878 int major,
02879 int minor,
02880 int a_zzz,
02881 int b_zzz));
02882 RT_EXPORT BU_EXTERN(int rt_db_cvt_to_external5,
02883 (struct bu_external *ext,
02884 const char *name,
02885 const struct rt_db_internal *ip,
02886 double conv2mm,
02887 struct db_i *dbip,
02888 struct resource *resp,
02889 const int major));
02890
02891 RT_EXPORT BU_EXTERN(int db_wrap_v5_external,
02892 (struct bu_external *ep,
02893 const char *name));
02894
02895 RT_EXPORT BU_EXTERN(int rt_db_get_internal5,
02896 (struct rt_db_internal *ip,
02897 const struct directory *dp,
02898 const struct db_i *dbip,
02899 const mat_t mat,
02900 struct resource *resp));
02901 RT_EXPORT BU_EXTERN(int rt_db_put_internal5,
02902 (struct directory *dp,
02903 struct db_i *dbip,
02904 struct rt_db_internal *ip,
02905 struct resource *resp,
02906 const int major));
02907
02908 RT_EXPORT BU_EXTERN(void db5_make_free_object_hdr,
02909 (struct bu_external *ep,
02910 long length));
02911 RT_EXPORT BU_EXTERN(void db5_make_free_object,
02912 (struct bu_external *ep,
02913 long length));
02914 RT_EXPORT BU_EXTERN(int db5_decode_signed,
02915 (long *lenp,
02916 const unsigned char *cp,
02917 int format));
02918
02919 RT_EXPORT BU_EXTERN(int db5_decode_length,
02920 (long *lenp,
02921 const unsigned char *cp,
02922 int format));
02923
02924 RT_EXPORT BU_EXTERN(int db5_select_length_encoding,
02925 (long len));
02926
02927 RT_EXPORT BU_EXTERN(void db5_import_color_table,
02928 (char *cp));
02929
02930 RT_EXPORT BU_EXTERN(int db5_import_attributes,
02931 (struct bu_attribute_value_set *avs,
02932 const struct bu_external *ap));
02933
02934 RT_EXPORT BU_EXTERN(void db5_export_attributes,
02935 (struct bu_external *ap,
02936 const struct bu_attribute_value_set *avs));
02937
02938 RT_EXPORT BU_EXTERN(int db5_get_raw_internal_fp,
02939 (struct db5_raw_internal *rip,
02940 FILE *fp));
02941
02942 RT_EXPORT BU_EXTERN(int db5_header_is_valid,
02943 (const unsigned char *hp));
02944 #define rt_fwrite_internal5 +++__deprecated_rt_fwrite_internal5__+++
02945 RT_EXPORT BU_EXTERN(int db5_fwrite_ident,
02946 (FILE *,
02947 const char *,
02948 double));
02949
02950 RT_EXPORT BU_EXTERN(int db5_put_color_table,
02951 (struct db_i *dbip));
02952 RT_EXPORT BU_EXTERN(int db5_update_ident,
02953 (struct db_i *dbip,
02954 const char *title,
02955 double local2mm));
02956 RT_EXPORT BU_EXTERN(int db_put_external5,
02957 (struct bu_external *ep,
02958 struct directory *dp,
02959 struct db_i *dbip));
02960 RT_EXPORT BU_EXTERN(int db5_update_attributes,
02961 (struct directory *dp,
02962 struct bu_attribute_value_set *avsp,
02963 struct db_i *dbip));
02964 RT_EXPORT BU_EXTERN(int db5_update_attribute,
02965 (const char *obj_name,
02966 const char *aname,
02967 const char *value,
02968 struct db_i *dbip));
02969 RT_EXPORT BU_EXTERN(int db5_replace_attributes,
02970 (struct directory *dp,
02971 struct bu_attribute_value_set *avsp,
02972 struct db_i *dbip));
02973 RT_EXPORT BU_EXTERN(int db5_get_attributes,
02974 (const struct db_i *dbip,
02975 struct bu_attribute_value_set *avs,
02976 const struct directory *dp));
02977
02978
02979 RT_EXPORT BU_EXTERN(int db_tree_nleaves,
02980 (const union tree *tp));
02981 RT_EXPORT BU_EXTERN(struct rt_tree_array *db_flatten_tree,
02982 (struct rt_tree_array *rt_tree_array,
02983 union tree *tp,
02984 int op,
02985 int avail,
02986 struct resource *resp));
02987 RT_EXPORT BU_EXTERN(int rt_comb_import4,
02988 (struct rt_db_internal *ip,
02989 const struct bu_external *ep,
02990 const mat_t matrix,
02991 const struct db_i *dbip,
02992 struct resource *resp));
02993 RT_EXPORT BU_EXTERN(int rt_comb_export4,
02994 (struct bu_external *ep,
02995 const struct rt_db_internal *ip,
02996 double local2mm,
02997 const struct db_i *dbip,
02998 struct resource *resp));
02999 RT_EXPORT BU_EXTERN(void db_tree_flatten_describe,
03000 (struct bu_vls *vls,
03001 const union tree *tp,
03002 int indented,
03003 int lvl,
03004 double mm2local,
03005 struct resource *resp));
03006 RT_EXPORT BU_EXTERN(void db_tree_describe,
03007 (struct bu_vls *vls,
03008 const union tree *tp,
03009 int indented,
03010 int lvl,
03011 double mm2local));
03012 RT_EXPORT BU_EXTERN(void db_comb_describe,
03013 (struct bu_vls *str,
03014 const struct rt_comb_internal *comb,
03015 int verbose,
03016 double mm2local,
03017 struct resource *resp));
03018 RT_EXPORT BU_EXTERN(void rt_comb_ifree,
03019 (struct rt_db_internal *ip,
03020 struct resource *resp));
03021 RT_EXPORT BU_EXTERN(int rt_comb_describe,
03022 (struct bu_vls *str,
03023 const struct rt_db_internal *ip,
03024 int verbose,
03025 double mm2local,
03026 struct resource *resp,
03027 struct db_i *db_i));
03028 RT_EXPORT BU_EXTERN(void db_wrap_v4_external,
03029 (struct bu_external *op,
03030 const char *name));
03031 RT_EXPORT BU_EXTERN(int db_ck_left_heavy_tree,
03032 (const union tree *tp,
03033 int no_unions));
03034 RT_EXPORT BU_EXTERN(int db_ck_v4gift_tree,
03035 (const union tree *tp));
03036 RT_EXPORT BU_EXTERN(union tree *db_mkbool_tree,
03037 (struct rt_tree_array *rt_tree_array,
03038 int howfar,
03039 struct resource *resp));
03040 RT_EXPORT BU_EXTERN(union tree *db_mkgift_tree,
03041 (struct rt_tree_array *trees,
03042 int subtreecount,
03043 struct resource *resp));
03044
03045
03046 RT_EXPORT BU_EXTERN(void rt_pt_sort,
03047 (register fastf_t t[],
03048 int npts));
03049
03050
03051 RT_EXPORT BU_EXTERN(void rt_ell_16pts,
03052 (register fastf_t *ov,
03053 register fastf_t *V,
03054 fastf_t *A,
03055 fastf_t *B));
03056
03057
03058
03059 RT_EXPORT BU_EXTERN(int rt_poly_roots,
03060 (bn_poly_t *eqn,
03061 bn_complex_t roots[],
03062 const char *name));
03063
03064
03065
03066 RT_EXPORT BU_EXTERN(int db_write,
03067 (struct db_i *dbip,
03068 const genptr_t addr,
03069 long count,
03070 long offset));
03071 RT_EXPORT BU_EXTERN(int db_fwrite_external,
03072 (FILE *fp,
03073 const char *name,
03074 struct bu_external *ep));
03075
03076
03077
03078
03079
03080
03081
03082 #if defined(RECORD_DEFINED)
03083
03084 RT_EXPORT BU_EXTERN(union record *db_getmrec,
03085 (const struct db_i *,
03086 const struct directory *dp ));
03087
03088 RT_EXPORT BU_EXTERN(int db_get,
03089 (const struct db_i *,
03090 const struct directory *dp,
03091 union record *where,
03092 int offset,
03093 int len));
03094
03095 RT_EXPORT BU_EXTERN(int db_put,
03096 (struct db_i *,
03097 const struct directory *dp,
03098 union record *where,
03099 int offset, int len));
03100 #else
03101
03102 RT_EXPORT BU_EXTERN(genptr_t db_getmrec,
03103 (const struct db_i *,
03104 const struct directory *dp));
03105
03106 RT_EXPORT BU_EXTERN(int db_get,
03107 (const struct db_i *,
03108 const struct directory *dp,
03109 genptr_t where,
03110 int offset,
03111 int len));
03112
03113 RT_EXPORT BU_EXTERN(int db_put,
03114 (const struct db_i *,
03115 const struct directory *dp,
03116 genptr_t where,
03117 int offset,
03118 int len));
03119 #endif
03120 RT_EXPORT BU_EXTERN(int db_get_external,
03121 (struct bu_external *ep,
03122 const struct directory *dp,
03123 const struct db_i *dbip));
03124 RT_EXPORT BU_EXTERN(int db_put_external,
03125 (struct bu_external *ep,
03126 struct directory *dp,
03127 struct db_i *dbip));
03128 RT_EXPORT BU_EXTERN(void db_free_external,
03129 (struct bu_external *ep));
03130
03131
03132
03133 RT_EXPORT BU_EXTERN(int db_scan,
03134 (struct db_i *,
03135 int (*handler)BU_ARGS((struct db_i *,
03136 const char *name,
03137 long addr,
03138 int nrec,
03139 int flags,
03140 genptr_t client_data)),
03141 int do_old_matter,
03142 genptr_t client_data));
03143
03144 #define db_ident(a,b,c) +++error+++
03145 RT_EXPORT BU_EXTERN(int db_update_ident,
03146 (struct db_i *dbip,
03147 const char *title,
03148 double local2mm));
03149 RT_EXPORT BU_EXTERN(int db_fwrite_ident,
03150 (FILE *fp,
03151 const char *title,
03152 double local2mm));
03153 RT_EXPORT BU_EXTERN(void db_conversions,
03154 (struct db_i *,
03155 int units));
03156 RT_EXPORT BU_EXTERN(int db_v4_get_units_code,
03157 (const char *str));
03158
03159
03160 RT_EXPORT BU_EXTERN(int db_dirbuild,
03161 (struct db_i *dbip));
03162 RT_EXPORT BU_EXTERN(struct directory *db5_diradd,
03163 (struct db_i *dbip,
03164 const struct db5_raw_internal *rip,
03165 long laddr,
03166 genptr_t client_data));
03167 RT_EXPORT BU_EXTERN(int db_get_version,
03168 (struct db_i *dbip));
03169 RT_EXPORT BU_EXTERN(int db5_scan,
03170 (struct db_i *dbip,
03171 void (*handler)(struct db_i *,
03172 const struct db5_raw_internal *,
03173 long addr,
03174 genptr_t client_data),
03175 genptr_t client_data));
03176
03177
03178 RT_EXPORT BU_EXTERN(int rt_comb_import5,
03179 (struct rt_db_internal *ip,
03180 const struct bu_external *ep,
03181 const mat_t mat,
03182 const struct db_i *dbip,
03183 struct resource *resp,
03184 const int minor_type));
03185
03186
03187 RT_EXPORT BU_EXTERN(int rt_extrude_import5,
03188 (struct rt_db_internal *ip,
03189 const struct bu_external *ep,
03190 register const mat_t mat,
03191 const struct db_i *dbip,
03192 struct resource *resp,
03193 const int minor_type));
03194
03195
03196
03197 RT_EXPORT BU_EXTERN(struct db_i * db_open_inmem, (void));
03198
03199 RT_EXPORT BU_EXTERN(struct db_i * db_create_inmem, (void));
03200
03201 RT_EXPORT BU_EXTERN(void db_inmem,
03202 (struct directory *dp,
03203 struct bu_external *ext,
03204 int flags,
03205 struct db_i *dbip));
03206
03207
03208 RT_EXPORT BU_EXTERN(int db_get_directory_size,
03209 (const struct db_i *dbip));
03210 RT_EXPORT BU_EXTERN(void db_ck_directory,
03211 (const struct db_i *dbip));
03212
03213 RT_EXPORT BU_EXTERN(int db_is_directory_non_empty,
03214 (const struct db_i *dbip));
03215
03216 RT_EXPORT BU_EXTERN(int db_dirhash,
03217 (const char *str));
03218 RT_EXPORT BU_EXTERN(int db_dircheck,
03219 (struct db_i *dbip,
03220 struct bu_vls *ret_name,
03221 int noisy,
03222 struct directory ***headp));
03223
03224 RT_EXPORT BU_EXTERN(struct directory *db_lookup,
03225 (const struct db_i *,
03226 const char *name,
03227 int noisy));
03228
03229 RT_EXPORT BU_EXTERN(struct bu_ptbl *db_lookup_by_attr,
03230 (struct db_i *dbip,
03231 int dir_flags,
03232 struct bu_attribute_value_set *avs,
03233 int op));
03234
03235 RT_EXPORT BU_EXTERN(struct directory *db_diradd,
03236 (struct db_i *,
03237 const char *name,
03238 long laddr,
03239 int len,
03240 int flags,
03241 genptr_t ptr));
03242 RT_EXPORT BU_EXTERN(struct directory *db_diradd5,
03243 (struct db_i *dbip,
03244 const char *name,
03245 long laddr,
03246 unsigned char major_type,
03247 unsigned char minor_type,
03248 unsigned char name_hidden,
03249 long object_length,
03250 struct bu_attribute_value_set *avs));
03251
03252
03253 RT_EXPORT BU_EXTERN(int db_dirdelete,
03254 (struct db_i *,
03255 struct directory *dp));
03256 RT_EXPORT BU_EXTERN(int db_fwrite_ident,
03257 (FILE *,
03258 const char *,
03259 double));
03260 RT_EXPORT BU_EXTERN(void db_pr_dir,
03261 (const struct db_i *dbip));
03262 RT_EXPORT BU_EXTERN(int db_rename,
03263 (struct db_i *,
03264 struct directory *,
03265 const char *newname));
03266
03267
03268
03269 RT_EXPORT BU_EXTERN(void db_update_nref,
03270 (struct db_i *dbip,
03271 struct resource *resp));
03272
03273 RT_EXPORT BU_EXTERN(int db_regexp_match,
03274 (const char *pattern,
03275 const char *string));
03276 RT_EXPORT BU_EXTERN(int db_regexp_match_all,
03277 (struct bu_vls *dest,
03278 struct db_i *dbip,
03279 const char *pattern));
03280
03281
03282 RT_EXPORT BU_EXTERN(int db_flags_internal,
03283 (const struct rt_db_internal *intern));
03284
03285 RT_EXPORT BU_EXTERN(int db_flags_raw_internal,
03286 (const struct db5_raw_internal *intern));
03287
03288
03289
03290
03291 RT_EXPORT BU_EXTERN(int db_alloc,
03292 (struct db_i *,
03293 struct directory *dp,
03294 int count));
03295
03296 RT_EXPORT BU_EXTERN(int db_delrec,
03297 (struct db_i *,
03298 struct directory *dp,
03299 int recnum));
03300
03301 RT_EXPORT BU_EXTERN(int db_delete,
03302 (struct db_i *,
03303 struct directory *dp));
03304
03305 RT_EXPORT BU_EXTERN(int db_zapper,
03306 (struct db_i *,
03307 struct directory *dp,
03308 int start));
03309
03310
03311 RT_EXPORT BU_EXTERN(void db_dup_db_tree_state,
03312 (struct db_tree_state *otsp,
03313 const struct db_tree_state *itsp));
03314 RT_EXPORT BU_EXTERN(void db_free_db_tree_state,
03315 (struct db_tree_state *tsp));
03316 RT_EXPORT BU_EXTERN(void db_init_db_tree_state,
03317 (struct db_tree_state *tsp,
03318 struct db_i *dbip,
03319 struct resource *resp));
03320 RT_EXPORT BU_EXTERN(struct combined_tree_state *db_new_combined_tree_state,
03321 (const struct db_tree_state *tsp,
03322 const struct db_full_path *pathp));
03323 RT_EXPORT BU_EXTERN(struct combined_tree_state *db_dup_combined_tree_state,
03324 (const struct combined_tree_state *old));
03325 RT_EXPORT BU_EXTERN(void db_free_combined_tree_state,
03326 (struct combined_tree_state *ctsp));
03327 RT_EXPORT BU_EXTERN(void db_pr_tree_state,
03328 (const struct db_tree_state *tsp));
03329 RT_EXPORT BU_EXTERN(void db_pr_combined_tree_state,
03330 (const struct combined_tree_state *ctsp));
03331 RT_EXPORT BU_EXTERN(int db_apply_state_from_comb,
03332 (struct db_tree_state *tsp,
03333 const struct db_full_path *pathp,
03334 const struct rt_comb_internal *comb));
03335 RT_EXPORT BU_EXTERN(int db_apply_state_from_memb,
03336 (struct db_tree_state *tsp,
03337 struct db_full_path *pathp,
03338 const union tree *tp));
03339 RT_EXPORT BU_EXTERN(int db_apply_state_from_one_member,
03340 (struct db_tree_state *tsp,
03341 struct db_full_path *pathp,
03342 const char *cp,
03343 int sofar,
03344 const union tree *tp));
03345 RT_EXPORT BU_EXTERN(union tree *db_find_named_leaf,
03346 (union tree *tp, const char *cp));
03347 RT_EXPORT BU_EXTERN(union tree *db_find_named_leafs_parent,
03348 (int *side,
03349 union tree *tp,
03350 const char *cp));
03351 RT_EXPORT BU_EXTERN(void db_tree_del_lhs,
03352 (union tree *tp,
03353 struct resource *resp));
03354 RT_EXPORT BU_EXTERN(void db_tree_del_rhs,
03355 (union tree *tp,
03356 struct resource *resp));
03357 RT_EXPORT BU_EXTERN(int db_tree_del_dbleaf,
03358 (union tree **tp,
03359 const char *cp,
03360 struct resource *resp));
03361 RT_EXPORT BU_EXTERN(void db_tree_mul_dbleaf,
03362 (union tree *tp,
03363 const mat_t mat));
03364 RT_EXPORT BU_EXTERN(void db_tree_funcleaf,
03365 (struct db_i *dbip,
03366 struct rt_comb_internal *comb,
03367 union tree *comb_tree,
03368 void (*leaf_func)(),
03369 genptr_t user_ptr1,
03370 genptr_t user_ptr2,
03371 genptr_t user_ptr3));
03372 RT_EXPORT BU_EXTERN(int db_follow_path,
03373 (struct db_tree_state *tsp,
03374 struct db_full_path *total_path,
03375 const struct db_full_path *new_path,
03376 int noisy,
03377 int depth));
03378 RT_EXPORT BU_EXTERN(int db_follow_path_for_state,
03379 (struct db_tree_state *tsp,
03380 struct db_full_path *pathp,
03381 const char *orig_str, int noisy));
03382 RT_EXPORT BU_EXTERN(union tree *db_recurse,
03383 (struct db_tree_state *tsp,
03384 struct db_full_path *pathp,
03385 struct combined_tree_state **region_start_statepp,
03386 genptr_t client_data));
03387 RT_EXPORT BU_EXTERN(union tree *db_dup_subtree,
03388 (const union tree *tp,
03389 struct resource *resp));
03390 RT_EXPORT BU_EXTERN(void db_ck_tree,
03391 (const union tree *tp));
03392 RT_EXPORT BU_EXTERN(void db_free_tree,
03393 (union tree *tp,
03394 struct resource *resp));
03395 RT_EXPORT BU_EXTERN(void db_left_hvy_node,
03396 (union tree *tp));
03397 RT_EXPORT BU_EXTERN(void db_non_union_push,
03398 (union tree *tp,
03399 struct resource *resp));
03400 RT_EXPORT BU_EXTERN(int db_count_tree_nodes,
03401 (const union tree *tp,
03402 int count));
03403 RT_EXPORT BU_EXTERN(int db_is_tree_all_unions,
03404 (const union tree *tp));
03405 RT_EXPORT BU_EXTERN(int db_count_subtree_regions,
03406 (const union tree *tp));
03407 RT_EXPORT BU_EXTERN(int db_tally_subtree_regions,
03408 (union tree *tp,
03409 union tree **reg_trees,
03410 int cur,
03411 int lim,
03412 struct resource *resp));
03413 RT_EXPORT BU_EXTERN(int db_walk_tree,
03414 (struct db_i *dbip,
03415 int argc,
03416 const char **argv,
03417 int ncpu,
03418 const struct db_tree_state *init_state,
03419 int (*reg_start_func) (struct db_tree_state * ,
03420 struct db_full_path * ,
03421 const struct rt_comb_internal * ,
03422 genptr_t client_data),
03423 union tree *(*reg_end_func) (struct db_tree_state * ,
03424 struct db_full_path * ,
03425 union tree * ,
03426 genptr_t client_data),
03427 union tree *(*leaf_func) (struct db_tree_state * ,
03428 struct db_full_path * ,
03429 struct rt_db_internal * ,
03430 genptr_t client_data ),
03431 genptr_t client_data ));
03432 RT_EXPORT BU_EXTERN(int db_path_to_mat,
03433 (struct db_i *dbip,
03434 struct db_full_path *pathp,
03435 mat_t mat,
03436 int depth,
03437 struct resource *resp));
03438 RT_EXPORT BU_EXTERN(void db_apply_anims,
03439 (struct db_full_path *pathp,
03440 struct directory *dp,
03441 mat_t stck,
03442 mat_t arc,
03443 struct mater_info *materp));
03444
03445 RT_EXPORT BU_EXTERN(int db_region_mat,
03446 (mat_t m,
03447 struct db_i *dbip,
03448 const char *name,
03449 struct resource *resp));
03450 RT_EXPORT BU_EXTERN(int db_shader_mat,
03451 (mat_t model_to_shader,
03452 const struct rt_i *rtip,
03453 const struct region *rp,
03454 point_t p_min,
03455 point_t p_max,
03456 struct resource *resp));
03457
03458
03459 RT_EXPORT BU_EXTERN(struct rt_i *rt_dirbuild,
03460 (const char *filename,
03461 char *buf, int len));
03462 RT_EXPORT BU_EXTERN(int rt_db_get_internal,
03463 (struct rt_db_internal *ip,
03464 const struct directory *dp,
03465 const struct db_i *dbip,
03466 const mat_t mat,
03467 struct resource *resp));
03468 RT_EXPORT BU_EXTERN(int rt_db_put_internal,
03469 (struct directory *dp,
03470 struct db_i *dbip,
03471 struct rt_db_internal *ip,
03472 struct resource *resp));
03473 RT_EXPORT BU_EXTERN(int rt_fwrite_internal,
03474 (FILE *fp,
03475 const char *name,
03476 const struct rt_db_internal *ip,
03477 double conv2mm));
03478 RT_EXPORT BU_EXTERN(void rt_db_free_internal,
03479 (struct rt_db_internal *ip,
03480 struct resource *resp));
03481 RT_EXPORT BU_EXTERN(int rt_db_lookup_internal,
03482 (struct db_i *dbip,
03483 const char *obj_name,
03484 struct directory **dpp,
03485 struct rt_db_internal *ip,
03486 int noisy,
03487 struct resource *resp));
03488 RT_EXPORT BU_EXTERN(void rt_optim_tree,
03489 (register union tree *tp,
03490 struct resource *resp));
03491 RT_EXPORT BU_EXTERN(void db_get_directory,
03492 (register struct resource *resp));
03493
03494
03495 RT_EXPORT BU_EXTERN(void db_functree,
03496 (struct db_i *dbip,
03497 struct directory *dp,
03498 void (*comb_func)(struct db_i *,
03499 struct directory *,
03500 genptr_t),
03501 void (*leaf_func)(struct db_i *,
03502 struct directory *,
03503 genptr_t),
03504 struct resource *resp,
03505 genptr_t client_data));
03506
03507
03508
03509
03510
03511
03512
03513
03514 RT_EXPORT BU_EXTERN(int rt_arb_get_cgtype,
03515 ());
03516 RT_EXPORT BU_EXTERN(int rt_arb_std_type,
03517 (const struct rt_db_internal *ip,
03518 const struct bn_tol *tol));
03519 RT_EXPORT BU_EXTERN(void rt_arb_centroid,
03520 ());
03521 RT_EXPORT BU_EXTERN(int rt_arb_calc_points,
03522 ());
03523 RT_EXPORT BU_EXTERN(int rt_arb_3face_intersect,
03524 (point_t point,
03525 const plane_t planes[6],
03526 int type,
03527 int loc));
03528 #ifdef SEEN_RTGEOM_H
03529 RT_EXPORT BU_EXTERN(int rt_arb_calc_planes,
03530 (Tcl_Interp *interp,
03531 struct rt_arb_internal *arb,
03532 int type,
03533 plane_t planes[6],
03534 const struct bn_tol *tol));
03535 RT_EXPORT BU_EXTERN(int rt_arb_move_edge,
03536 (Tcl_Interp *interp,
03537 struct rt_arb_internal *arb,
03538 vect_t thru,
03539 int bp1,
03540 int bp2,
03541 int end1,
03542 int end2,
03543 const vect_t dir,
03544 plane_t planes[6],
03545 const struct bn_tol *tol));
03546 RT_EXPORT BU_EXTERN(int rt_arb_edit,
03547 (Tcl_Interp *interp,
03548 struct rt_arb_internal *arb,
03549 int arb_type,
03550 int edit_type,
03551 vect_t pos_model,
03552 plane_t planes[6],
03553 const struct bn_tol *tol));
03554 #endif
03555 RT_EXPORT extern const int rt_arb_faces[5][24];
03556 RT_EXPORT extern short earb8[12][18];
03557 RT_EXPORT extern short earb7[12][18];
03558 RT_EXPORT extern short earb6[10][18];
03559 RT_EXPORT extern short earb5[9][18];
03560 RT_EXPORT extern short earb4[5][18];
03561
03562
03563 RT_EXPORT BU_EXTERN(void rt_ell,
03564 (fastf_t *ov,
03565 const fastf_t *V,
03566 const fastf_t *A,
03567 const fastf_t *B,
03568 int sides));
03569
03570
03571 RT_EXPORT BU_EXTERN(void rt_vls_pipept,
03572 (struct bu_vls *vp,
03573 int seg_no,
03574 const struct rt_db_internal *ip,
03575 double mm2local));
03576 RT_EXPORT BU_EXTERN(void rt_pipept_print,
03577 ());
03578 RT_EXPORT BU_EXTERN(int rt_pipe_ck,
03579 (const struct bu_list *headp));
03580
03581
03582 RT_EXPORT BU_EXTERN(int rt_mk_parabola,
03583 (struct rt_pt_node *pts,
03584 fastf_t r,
03585 fastf_t b,
03586 fastf_t dtol,
03587 fastf_t ntol));
03588 RT_EXPORT BU_EXTERN(struct rt_pt_node *rt_ptalloc,
03589 ());
03590
03591
03592 RT_EXPORT BU_EXTERN(unsigned long rt_memalloc,
03593 (struct mem_map **pp,
03594 unsigned size));
03595 RT_EXPORT BU_EXTERN(struct mem_map * rt_memalloc_nosplit,
03596 (struct mem_map **pp,
03597 unsigned size));
03598 RT_EXPORT BU_EXTERN(unsigned long rt_memget,
03599 (struct mem_map **pp,
03600 unsigned int size,
03601 unsigned int place));
03602 RT_EXPORT BU_EXTERN(void rt_memfree,
03603 (struct mem_map **pp,
03604 unsigned size,
03605 unsigned long addr));
03606 RT_EXPORT BU_EXTERN(void rt_mempurge,
03607 (struct mem_map **pp));
03608 RT_EXPORT BU_EXTERN(void rt_memprint,
03609 (struct mem_map **pp));
03610 RT_EXPORT BU_EXTERN(void rt_memclose,
03611 ());
03612
03613 RT_EXPORT BU_EXTERN(struct bn_vlblock *rt_vlblock_init,
03614 ());
03615 RT_EXPORT BU_EXTERN(void rt_vlblock_free,
03616 (struct bn_vlblock *vbp));
03617 RT_EXPORT BU_EXTERN(struct bu_list *rt_vlblock_find,
03618 (struct bn_vlblock *vbp,
03619 int r,
03620 int g,
03621 int b));
03622
03623
03624 RT_EXPORT BU_EXTERN(void rt_hitsort,
03625 (struct hit h[],
03626 int nh));
03627
03628
03629 RT_EXPORT BU_EXTERN(int rt_pg_to_bot,
03630 (struct rt_db_internal *ip,
03631 const struct bn_tol *tol,
03632 struct resource *resp0));
03633 RT_EXPORT BU_EXTERN(int rt_pg_plot,
03634 (struct bu_list *vhead,
03635 struct rt_db_internal *ip,
03636 const struct rt_tess_tol *ttol,
03637 const struct bn_tol *tol));
03638 RT_EXPORT BU_EXTERN(int rt_pg_plot_poly,
03639 (struct bu_list *vhead,
03640 struct rt_db_internal *ip,
03641 const struct rt_tess_tol *ttol,
03642 const struct bn_tol *tol));
03643
03644
03645 RT_EXPORT BU_EXTERN(int rt_hf_to_dsp,
03646 (struct rt_db_internal *db_intern,
03647 struct resource *resp));
03648
03649
03650 RT_EXPORT BU_EXTERN(int dsp_pos,
03651 (point_t out,
03652 struct soltab *stp,
03653 point_t p));
03654
03655
03656 RT_EXPORT BU_EXTERN(void rt_pr_soltab,
03657 (const struct soltab *stp));
03658 RT_EXPORT BU_EXTERN(void rt_pr_region,
03659 (const struct region *rp));
03660 RT_EXPORT BU_EXTERN(void rt_pr_partitions,
03661 (const struct rt_i *rtip,
03662 const struct partition *phead,
03663 const char *title));
03664 RT_EXPORT BU_EXTERN(void rt_pr_pt_vls,
03665 (struct bu_vls *v,
03666 const struct rt_i *rtip,
03667 const struct partition *pp));
03668 RT_EXPORT BU_EXTERN(void rt_pr_pt,
03669 (const struct rt_i *rtip,
03670 const struct partition *pp));
03671 RT_EXPORT BU_EXTERN(void rt_pr_seg_vls,
03672 (struct bu_vls *,
03673 const struct seg *));
03674 RT_EXPORT BU_EXTERN(void rt_pr_seg,
03675 (const struct seg *segp));
03676 RT_EXPORT BU_EXTERN(void rt_pr_hit,
03677 (const char *str,
03678 const struct hit *hitp));
03679 RT_EXPORT BU_EXTERN(void rt_pr_hit_vls,
03680 (struct bu_vls *v,
03681 const char *str,
03682 const struct hit *hitp));
03683 RT_EXPORT BU_EXTERN(void rt_pr_hitarray_vls,
03684 (struct bu_vls *v,
03685 const char *str,
03686 const struct hit *hitp,
03687 int count));
03688 RT_EXPORT BU_EXTERN(void rt_pr_tree,
03689 (const union tree *tp,
03690 int lvl));
03691 RT_EXPORT BU_EXTERN(void rt_pr_tree_vls,
03692 (struct bu_vls *vls,
03693 const union tree *tp));
03694 RT_EXPORT BU_EXTERN(char *rt_pr_tree_str,
03695 (const union tree *tree));
03696 RT_EXPORT BU_EXTERN(void rt_pr_tree_val,
03697 (const union tree *tp,
03698 const struct partition *partp,
03699 int pr_name,
03700 int lvl));
03701 RT_EXPORT BU_EXTERN(void rt_pr_fallback_angle,
03702 (struct bu_vls *str,
03703 const char *prefix,
03704 const double angles[5]));
03705 RT_EXPORT BU_EXTERN(void rt_find_fallback_angle,
03706 (double angles[5],
03707 const vect_t vec));
03708 RT_EXPORT BU_EXTERN(void rt_pr_tol,
03709 (const struct bn_tol *tol));
03710
03711
03712 RT_EXPORT BU_EXTERN(void rt_regionfix,
03713 (struct rt_i *rtip));
03714
03715
03716 RT_EXPORT BU_EXTERN(int rt_id_solid,
03717 (struct bu_external *ep));
03718 RT_EXPORT BU_EXTERN(const struct rt_functab *rt_get_functab_by_label,
03719 (const char *label));
03720 RT_EXPORT BU_EXTERN(int rt_generic_xform,
03721 (struct rt_db_internal *op,
03722 const mat_t mat,
03723 struct rt_db_internal *ip,
03724 int avail,
03725 struct db_i *dbip,
03726 struct resource *resp));
03727
03728 RT_EXPORT BU_EXTERN(void rt_nul_make,
03729 (const struct rt_functab *ftp,
03730 struct rt_db_internal *intern,
03731 double diameter));
03732
03733
03734 RT_EXPORT BU_EXTERN(void rt_plot_all_bboxes,
03735 (FILE *fp,
03736 struct rt_i *rtip));
03737 RT_EXPORT BU_EXTERN(void rt_plot_all_solids,
03738 (FILE *fp,
03739 struct rt_i *rtip,
03740 struct resource *resp));
03741 RT_EXPORT BU_EXTERN(void rt_init_resource,
03742 (struct resource *resp,
03743 int cpu_num,
03744 struct rt_i *rtip));
03745 RT_EXPORT BU_EXTERN(void rt_clean_resource,
03746 (struct rt_i *rtip,
03747 struct resource *resp));
03748 RT_EXPORT BU_EXTERN(int rt_unprep,
03749 (struct rt_i *rtip,
03750 struct rt_reprep_obj_list *objs,
03751 struct resource *resp));
03752 RT_EXPORT BU_EXTERN(int rt_reprep,
03753 (struct rt_i *rtip,
03754 struct rt_reprep_obj_list *objs,
03755 struct resource *resp));
03756 RT_EXPORT BU_EXTERN(int re_prep_solids,
03757 (struct rt_i *rtip,
03758 int num_solids,
03759 char **solid_names,
03760 struct resource *resp));
03761 RT_EXPORT BU_EXTERN(int rt_find_paths,
03762 (struct db_i *dbip,
03763 struct directory *start,
03764 struct directory *end,
03765 struct bu_ptbl *paths,
03766 struct resource *resp));
03767 RT_EXPORT BU_EXTERN(struct bu_bitv *get_solidbitv,
03768 (long nbits,
03769 struct resource *resp));
03770
03771
03772 RT_EXPORT BU_EXTERN(void rt_add_res_stats,
03773 (struct rt_i *rtip,
03774 struct resource *resp));
03775
03776 RT_EXPORT BU_EXTERN(void rt_zero_res_stats,
03777 (struct resource *resp));
03778 RT_EXPORT BU_EXTERN(void rt_res_pieces_clean,
03779 (struct resource *resp,
03780 struct rt_i *rtip));
03781 RT_EXPORT BU_EXTERN(void rt_res_pieces_init,
03782 (struct resource *resp,
03783 struct rt_i *rtip));
03784 RT_EXPORT BU_EXTERN(void rt_vstub,
03785 (struct soltab *stp[],
03786 struct xray *rp[],
03787 struct seg segp[],
03788 int n,
03789 struct application *ap));
03790
03791
03792
03793 RT_EXPORT BU_EXTERN(int rt_bound_tree,
03794 (const union tree *tp,
03795 vect_t tree_min,
03796 vect_t tree_max));
03797 RT_EXPORT BU_EXTERN(int rt_tree_elim_nops,
03798 (union tree *,
03799 struct resource *resp));
03800
03801
03802
03803
03804 RT_EXPORT BU_EXTERN(struct bn_vlblock *bn_vlblock_init,
03805 (struct bu_list *free_vlist_hd,
03806 int max_ent));
03807 RT_EXPORT BU_EXTERN(struct bn_vlblock * rt_vlblock_init,
03808 ());
03809 RT_EXPORT BU_EXTERN(void rt_vlblock_free,
03810 (struct bn_vlblock *vbp));
03811 RT_EXPORT BU_EXTERN(struct bu_list *rt_vlblock_find,
03812 (struct bn_vlblock *vbp,
03813 int r,
03814 int g,
03815 int b));
03816 RT_EXPORT BU_EXTERN(int rt_ck_vlist,
03817 (const struct bu_list *vhead));
03818 RT_EXPORT BU_EXTERN(void rt_vlist_copy,
03819 (struct bu_list *dest,
03820 const struct bu_list *src));
03821 RT_EXPORT BU_EXTERN(void bn_vlist_cleanup,
03822 (struct bu_list *hd));
03823 RT_EXPORT BU_EXTERN(void rt_vlist_cleanup,
03824 ());
03825 RT_EXPORT BU_EXTERN(void bn_vlist_rpp,
03826 (struct bu_list *hd,
03827 const point_t minn,
03828 const point_t maxx));
03829 RT_EXPORT BU_EXTERN(void rt_vlist_export,
03830 (struct bu_vls *vls,
03831 struct bu_list *hp,
03832 const char *name));
03833 RT_EXPORT BU_EXTERN(void rt_vlist_import,
03834 (struct bu_list *hp,
03835 struct bu_vls *namevls,
03836 const unsigned char *buf));
03837 RT_EXPORT BU_EXTERN(void rt_plot_vlblock,
03838 (FILE *fp,
03839 const struct bn_vlblock *vbp));
03840 RT_EXPORT BU_EXTERN(void rt_vlist_to_uplot,
03841 (FILE *fp,
03842 const struct bu_list *vhead));
03843 RT_EXPORT BU_EXTERN(int rt_process_uplot_value,
03844 (struct bu_list **vhead,
03845 struct bn_vlblock *vbp,
03846 FILE *fp,
03847 int c,
03848 double char_size,
03849 int mode));
03850 RT_EXPORT BU_EXTERN(int rt_uplot_to_vlist,
03851 (struct bn_vlblock *vbp,
03852 FILE *fp,
03853 double char_size,
03854 int mode));
03855 RT_EXPORT BU_EXTERN(void rt_label_vlist_verts,
03856 (struct bn_vlblock *vbp,
03857 struct bu_list *src,
03858 mat_t mat,
03859 double sz,
03860 double mm2local));
03861
03862 #ifdef SEEN_RTGEOM_H
03863
03864 RT_EXPORT BU_EXTERN(void rt_sketch_ifree,
03865 (struct rt_db_internal *ip));
03866 RT_EXPORT BU_EXTERN(int curve_to_vlist,
03867 (struct bu_list *vhead,
03868 const struct rt_tess_tol *ttol,
03869 point_t V,
03870 vect_t u_vec,
03871 vect_t v_vec,
03872 struct rt_sketch_internal *sketch_ip,
03873 struct curve *crv));
03874
03875 RT_EXPORT BU_EXTERN(int rt_check_curve,
03876 (struct curve *crv,
03877 struct rt_sketch_internal *skt,
03878 int noisey));
03879
03880 RT_EXPORT BU_EXTERN(void rt_curve_reverse_segment,
03881 (long *lng));
03882 RT_EXPORT BU_EXTERN(void rt_curve_order_segments,
03883 (struct curve *crv));
03884
03885 RT_EXPORT BU_EXTERN(void rt_copy_curve,
03886 (struct curve *crv_out,
03887 const struct curve *crv_in));
03888
03889 RT_EXPORT BU_EXTERN(int rt_check_curve,
03890 (struct curve *crv,
03891 struct rt_sketch_internal *skt,
03892 int noisey));
03893 RT_EXPORT BU_EXTERN(void rt_curve_free,
03894 (struct curve *crv));
03895 RT_EXPORT BU_EXTERN(void rt_copy_curve,
03896 (struct curve *crv_out,
03897 const struct curve *crv_in));
03898 RT_EXPORT BU_EXTERN(struct rt_sketch_internal *rt_copy_sketch,
03899 (const struct rt_sketch_internal *sketch_ip));
03900 RT_EXPORT BU_EXTERN(int curve_to_tcl_list,
03901 (struct bu_vls *vls,
03902 struct curve *crv));
03903 #endif
03904
03905
03906 RT_EXPORT BU_EXTERN(void rt_htbl_init,
03907 (struct rt_htbl *b,
03908 int len,
03909 const char *str));
03910 RT_EXPORT BU_EXTERN(void rt_htbl_reset,
03911 (struct rt_htbl *b));
03912 RT_EXPORT BU_EXTERN(void rt_htbl_free,
03913 (struct rt_htbl *b));
03914 RT_EXPORT BU_EXTERN(struct hit *rt_htbl_get,
03915 (struct rt_htbl *b));
03916
03917
03918
03919
03920
03921
03922 #if defined(NMG_H)
03923
03924
03925
03926 RT_EXPORT BU_EXTERN(struct model *nmg_mm,
03927 ());
03928 RT_EXPORT BU_EXTERN(struct model *nmg_mmr,
03929 ());
03930 RT_EXPORT BU_EXTERN(struct nmgregion *nmg_mrsv,
03931 (struct model *m));
03932 RT_EXPORT BU_EXTERN(struct shell *nmg_msv,
03933 (struct nmgregion *r_p));
03934 RT_EXPORT BU_EXTERN(struct faceuse *nmg_mf,
03935 (struct loopuse *lu1));
03936 RT_EXPORT BU_EXTERN(struct loopuse *nmg_mlv,
03937 (long *magic,
03938 struct vertex *v,
03939 int orientation));
03940 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_me,
03941 (struct vertex *v1,
03942 struct vertex *v2,
03943 struct shell *s));
03944 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_meonvu,
03945 (struct vertexuse *vu));
03946 RT_EXPORT BU_EXTERN(struct loopuse *nmg_ml,
03947 (struct shell *s));
03948
03949 RT_EXPORT BU_EXTERN(int nmg_keg,
03950 (struct edgeuse *eu));
03951 RT_EXPORT BU_EXTERN(int nmg_kvu,
03952 (struct vertexuse *vu));
03953 RT_EXPORT BU_EXTERN(int nmg_kfu,
03954 (struct faceuse *fu1));
03955 RT_EXPORT BU_EXTERN(int nmg_klu,
03956 (struct loopuse *lu1));
03957 RT_EXPORT BU_EXTERN(int nmg_keu,
03958 (struct edgeuse *eu));
03959 RT_EXPORT BU_EXTERN(int nmg_ks,
03960 (struct shell *s));
03961 RT_EXPORT BU_EXTERN(int nmg_kr,
03962 (struct nmgregion *r));
03963 RT_EXPORT BU_EXTERN(void nmg_km,
03964 (struct model *m));
03965
03966 RT_EXPORT BU_EXTERN(void nmg_vertex_gv,
03967 (struct vertex *v,
03968 const point_t pt));
03969 RT_EXPORT BU_EXTERN(void nmg_vertex_g,
03970 (struct vertex *v,
03971 fastf_t x,
03972 fastf_t y,
03973 fastf_t z));
03974 RT_EXPORT BU_EXTERN(void nmg_vertexuse_nv,
03975 (struct vertexuse *vu,
03976 const vect_t norm));
03977 RT_EXPORT BU_EXTERN(void nmg_vertexuse_a_cnurb,
03978 (struct vertexuse *vu,
03979 const fastf_t *uvw));
03980 RT_EXPORT BU_EXTERN(void nmg_edge_g,
03981 (struct edgeuse *eu));
03982 RT_EXPORT BU_EXTERN(void nmg_edge_g_cnurb,
03983 (struct edgeuse *eu,
03984 int order,
03985 int n_knots,
03986 fastf_t *kv,
03987 int n_pts,
03988 int pt_type,
03989 fastf_t *points));
03990 RT_EXPORT BU_EXTERN(void nmg_edge_g_cnurb_plinear,
03991 (struct edgeuse *eu));
03992 RT_EXPORT BU_EXTERN(int nmg_use_edge_g,
03993 (struct edgeuse *eu,
03994 long *eg));
03995 RT_EXPORT BU_EXTERN(void nmg_loop_g,
03996 (struct loop *l,
03997 const struct bn_tol *tol));
03998 RT_EXPORT BU_EXTERN(void nmg_face_g,
03999 (struct faceuse *fu,
04000 const plane_t p));
04001 RT_EXPORT BU_EXTERN(void nmg_face_new_g,
04002 (struct faceuse *fu,
04003 const plane_t pl));
04004 RT_EXPORT BU_EXTERN(void nmg_face_g_snurb,
04005 (struct faceuse *fu,
04006 int u_order,
04007 int v_order,
04008 int n_u_knots,
04009 int n_v_knots,
04010 fastf_t *ukv,
04011 fastf_t *vkv,
04012 int n_rows,
04013 int n_cols,
04014 int pt_type,
04015 fastf_t *mesh));
04016 RT_EXPORT BU_EXTERN(void nmg_face_bb,
04017 (struct face *f,
04018 const struct bn_tol *tol));
04019 RT_EXPORT BU_EXTERN(void nmg_shell_a,
04020 (struct shell *s,
04021 const struct bn_tol *tol));
04022 RT_EXPORT BU_EXTERN(void nmg_region_a,
04023 (struct nmgregion *r,
04024 const struct bn_tol *tol));
04025
04026 RT_EXPORT BU_EXTERN(int nmg_demote_lu,
04027 (struct loopuse *lu));
04028 RT_EXPORT BU_EXTERN(int nmg_demote_eu,
04029 (struct edgeuse *eu));
04030
04031 RT_EXPORT BU_EXTERN(void nmg_movevu,
04032 (struct vertexuse *vu,
04033 struct vertex *v));
04034 #define nmg_moveeu(a,b) nmg_je(a,b)
04035 RT_EXPORT BU_EXTERN(void nmg_je,
04036 (struct edgeuse *eudst,
04037 struct edgeuse *eusrc));
04038 RT_EXPORT BU_EXTERN(void nmg_unglueedge,
04039 (struct edgeuse *eu));
04040 RT_EXPORT BU_EXTERN(void nmg_jv,
04041 (struct vertex *v1,
04042 struct vertex *v2));
04043 RT_EXPORT BU_EXTERN(void nmg_jfg,
04044 (struct face *f1,
04045 struct face *f2));
04046 RT_EXPORT BU_EXTERN(void nmg_jeg,
04047 (struct edge_g_lseg *dest_eg,
04048 struct edge_g_lseg *src_eg));
04049
04050
04051
04052 RT_EXPORT BU_EXTERN(void nmg_merge_regions,
04053 (struct nmgregion *r1,
04054 struct nmgregion *r2,
04055 const struct bn_tol *tol));
04056
04057
04058 RT_EXPORT BU_EXTERN(void nmg_shell_coplanar_face_merge,
04059 (struct shell *s,
04060 const struct bn_tol *tol,
04061 const int simplify));
04062 RT_EXPORT BU_EXTERN(int nmg_simplify_shell,
04063 (struct shell *s));
04064 RT_EXPORT BU_EXTERN(void nmg_rm_redundancies,
04065 (struct shell *s,
04066 const struct bn_tol *tol));
04067 RT_EXPORT BU_EXTERN(void nmg_sanitize_s_lv,
04068 (struct shell *s,
04069 int orient));
04070 RT_EXPORT BU_EXTERN(void nmg_s_split_touchingloops,
04071 (struct shell *s,
04072 const struct bn_tol *tol));
04073 RT_EXPORT BU_EXTERN(void nmg_s_join_touchingloops,
04074 (struct shell *s,
04075 const struct bn_tol *tol));
04076 RT_EXPORT BU_EXTERN(void nmg_js,
04077 (struct shell *s1,
04078 struct shell *s2,
04079 const struct bn_tol *tol));
04080 RT_EXPORT BU_EXTERN(void nmg_invert_shell,
04081 (struct shell *s,
04082 const struct bn_tol *tol));
04083
04084
04085 RT_EXPORT BU_EXTERN(struct faceuse *nmg_cmface,
04086 (struct shell *s,
04087 struct vertex **vt[],
04088 int n));
04089 RT_EXPORT BU_EXTERN(struct faceuse *nmg_cface,
04090 (struct shell *s,
04091 struct vertex **vt,
04092 int n));
04093 RT_EXPORT BU_EXTERN(struct faceuse *nmg_add_loop_to_face,
04094 (struct shell *s,
04095 struct faceuse *fu,
04096 struct vertex **verts,
04097 int n,
04098 int dir));
04099 RT_EXPORT BU_EXTERN(int nmg_fu_planeeqn,
04100 (struct faceuse *fu,
04101 const struct bn_tol *tol));
04102 RT_EXPORT BU_EXTERN(void nmg_gluefaces,
04103 (struct faceuse *fulist[],
04104 int n,
04105 const struct bn_tol *tol));
04106 RT_EXPORT BU_EXTERN(int nmg_simplify_face,
04107 (struct faceuse *fu));
04108 RT_EXPORT BU_EXTERN(void nmg_reverse_face,
04109 (struct faceuse *fu));
04110 RT_EXPORT BU_EXTERN(void nmg_mv_fu_between_shells,
04111 (struct shell *dest,
04112 struct shell *src,
04113 struct faceuse *fu));
04114 RT_EXPORT BU_EXTERN(void nmg_jf,
04115 (struct faceuse *dest_fu,
04116 struct faceuse *src_fu));
04117 RT_EXPORT BU_EXTERN(struct faceuse *nmg_dup_face,
04118 (struct faceuse *fu,
04119 struct shell *s));
04120
04121 RT_EXPORT BU_EXTERN(void nmg_jl,
04122 (struct loopuse *lu,
04123 struct edgeuse *eu));
04124 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_join_2loops,
04125 (struct vertexuse *vu1,
04126 struct vertexuse *vu2));
04127 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_join_singvu_loop,
04128 (struct vertexuse *vu1,
04129 struct vertexuse *vu2));
04130 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_join_2singvu_loops,
04131 (struct vertexuse *vu1,
04132 struct vertexuse *vu2));
04133 RT_EXPORT BU_EXTERN(struct loopuse *nmg_cut_loop,
04134 (struct vertexuse *vu1,
04135 struct vertexuse *vu2));
04136 RT_EXPORT BU_EXTERN(struct loopuse *nmg_split_lu_at_vu,
04137 (struct loopuse *lu,
04138 struct vertexuse *vu));
04139 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_find_repeated_v_in_lu,
04140 (struct vertexuse *vu));
04141 RT_EXPORT BU_EXTERN(void nmg_split_touchingloops,
04142 (struct loopuse *lu,
04143 const struct bn_tol *tol));
04144 RT_EXPORT BU_EXTERN(int nmg_join_touchingloops,
04145 (struct loopuse *lu));
04146 RT_EXPORT BU_EXTERN(int nmg_get_touching_jaunts,
04147 (const struct loopuse *lu,
04148 struct bu_ptbl *tbl,
04149 int *need_init));
04150 RT_EXPORT BU_EXTERN(void nmg_kill_accordions,
04151 (struct loopuse *lu));
04152 RT_EXPORT BU_EXTERN(int nmg_loop_split_at_touching_jaunt,
04153 (struct loopuse *lu,
04154 const struct bn_tol *tol));
04155 RT_EXPORT BU_EXTERN(void nmg_simplify_loop,
04156 (struct loopuse *lu));
04157 RT_EXPORT BU_EXTERN(int nmg_kill_snakes,
04158 (struct loopuse *lu));
04159 RT_EXPORT BU_EXTERN(void nmg_mv_lu_between_shells,
04160 (struct shell *dest,
04161 struct shell *src,
04162 struct loopuse *lu));
04163 RT_EXPORT BU_EXTERN(void nmg_moveltof,
04164 (struct faceuse *fu,
04165 struct shell *s));
04166 RT_EXPORT BU_EXTERN(struct loopuse *nmg_dup_loop,
04167 (struct loopuse *lu,
04168 long *parent,
04169 long **trans_tbl));
04170 RT_EXPORT BU_EXTERN(void nmg_set_lu_orientation,
04171 (struct loopuse *lu,
04172 int is_opposite));
04173 RT_EXPORT BU_EXTERN(void nmg_lu_reorient,
04174 (struct loopuse *lu));
04175
04176 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_eusplit,
04177 (struct vertex *v,
04178 struct edgeuse *oldeu,
04179 int share_geom));
04180 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_esplit,
04181 (struct vertex *v,
04182 struct edgeuse *eu,
04183 int share_geom));
04184 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_ebreak,
04185 (struct vertex *v,
04186 struct edgeuse *eu));
04187 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_ebreaker,
04188 (struct vertex *v,
04189 struct edgeuse *eu,
04190 const struct bn_tol *tol));
04191 RT_EXPORT BU_EXTERN(struct vertex *nmg_e2break,
04192 (struct edgeuse *eu1,
04193 struct edgeuse *eu2));
04194 RT_EXPORT BU_EXTERN(int nmg_unbreak_edge,
04195 (struct edgeuse *eu1_first));
04196 RT_EXPORT BU_EXTERN(int nmg_unbreak_shell_edge_unsafe,
04197 (struct edgeuse *eu1_first));
04198 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_eins,
04199 (struct edgeuse *eu));
04200 RT_EXPORT BU_EXTERN(void nmg_mv_eu_between_shells,
04201 (struct shell *dest,
04202 struct shell *src,
04203 struct edgeuse *eu));
04204
04205 RT_EXPORT BU_EXTERN(void nmg_mv_vu_between_shells,
04206 (struct shell *dest,
04207 struct shell *src,
04208 struct vertexuse *vu));
04209
04210
04211
04212 RT_EXPORT BU_EXTERN(struct model *nmg_find_model,
04213 (const long *magic_p));
04214 RT_EXPORT BU_EXTERN(void nmg_model_bb,
04215 (point_t min_pt,
04216 point_t max_pt,
04217 const struct model *m));
04218
04219
04220
04221 RT_EXPORT BU_EXTERN(int nmg_shell_is_empty,
04222 (const struct shell *s));
04223 RT_EXPORT BU_EXTERN(struct shell *nmg_find_s_of_lu,
04224 (const struct loopuse *lu));
04225 RT_EXPORT BU_EXTERN(struct shell *nmg_find_s_of_eu,
04226 (const struct edgeuse *eu));
04227 RT_EXPORT BU_EXTERN(struct shell *nmg_find_s_of_vu,
04228 (const struct vertexuse *vu));
04229
04230
04231 RT_EXPORT BU_EXTERN(struct faceuse *nmg_find_fu_of_eu,
04232 (const struct edgeuse *eu));
04233 RT_EXPORT BU_EXTERN(struct faceuse *nmg_find_fu_of_lu,
04234 (const struct loopuse *lu));
04235 RT_EXPORT BU_EXTERN(struct faceuse *nmg_find_fu_of_vu,
04236 (const struct vertexuse *vu));
04237 RT_EXPORT BU_EXTERN(struct faceuse *nmg_find_fu_with_fg_in_s,
04238 (const struct shell *s1,
04239 const struct faceuse *fu2));
04240 RT_EXPORT BU_EXTERN(double nmg_measure_fu_angle,
04241 (const struct edgeuse *eu,
04242 const vect_t xvec,
04243 const vect_t yvec,
04244 const vect_t zvec));
04245
04246
04247 RT_EXPORT BU_EXTERN(struct loopuse*nmg_find_lu_of_vu,
04248 (const struct vertexuse *vu));
04249 RT_EXPORT BU_EXTERN(int nmg_loop_is_a_crack,
04250 (const struct loopuse *lu));
04251 RT_EXPORT BU_EXTERN(int nmg_loop_is_ccw,
04252 (const struct loopuse *lu,
04253 const plane_t norm,
04254 const struct bn_tol *tol));
04255 RT_EXPORT BU_EXTERN(const struct vertexuse *nmg_loop_touches_self,
04256 (const struct loopuse *lu));
04257 RT_EXPORT BU_EXTERN(int nmg_2lu_identical,
04258 (const struct edgeuse *eu1,
04259 const struct edgeuse *eu2));
04260
04261
04262 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_find_matching_eu_in_s,
04263 (const struct edgeuse *eu1,
04264 const struct shell *s2));
04265 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_findeu,
04266 (const struct vertex *v1,
04267 const struct vertex *v2,
04268 const struct shell *s,
04269 const struct edgeuse *eup,
04270 int dangling_only));
04271 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_find_eu_in_face,
04272 (const struct vertex *v1,
04273 const struct vertex *v2,
04274 const struct faceuse *fu,
04275 const struct edgeuse *eup,
04276 int dangling_only));
04277 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_find_e,
04278 (const struct vertex *v1,
04279 const struct vertex *v2,
04280 const struct shell *s,
04281 const struct edge *ep));
04282 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_find_eu_of_vu,
04283 (const struct vertexuse *vu));
04284 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_find_eu_with_vu_in_lu,
04285 (const struct loopuse *lu,
04286 const struct vertexuse *vu));
04287 RT_EXPORT BU_EXTERN(const struct edgeuse *nmg_faceradial,
04288 (const struct edgeuse *eu));
04289 RT_EXPORT BU_EXTERN(const struct edgeuse *nmg_radial_face_edge_in_shell,
04290 (const struct edgeuse *eu));
04291 RT_EXPORT BU_EXTERN(const struct edgeuse *nmg_find_edge_between_2fu,
04292 (const struct faceuse *fu1,
04293 const struct faceuse *fu2,
04294 const struct bn_tol *tol));
04295 RT_EXPORT BU_EXTERN(struct edge *nmg_find_e_nearest_pt2,
04296 (long *magic_p,
04297 const point_t pt2,
04298 const mat_t mat,
04299 const struct bn_tol *tol));
04300 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_find_matching_eu_in_s,
04301 (const struct edgeuse *eu1,
04302 const struct shell *s2));
04303 RT_EXPORT BU_EXTERN(void nmg_eu_2vecs_perp,
04304 (vect_t xvec,
04305 vect_t yvec,
04306 vect_t zvec,
04307 const struct edgeuse *eu,
04308 const struct bn_tol *tol));
04309 RT_EXPORT BU_EXTERN(int nmg_find_eu_leftvec,
04310 (vect_t left,
04311 const struct edgeuse *eu));
04312 RT_EXPORT BU_EXTERN(int nmg_find_eu_left_non_unit,
04313 (vect_t left,
04314 const struct edgeuse *eu));
04315 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_find_ot_same_eu_of_e,
04316 (const struct edge *e));
04317
04318
04319 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_find_v_in_face,
04320 (const struct vertex *,
04321 const struct faceuse *));
04322 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_find_v_in_shell,
04323 (const struct vertex *v,
04324 const struct shell *s,
04325 int edges_only));
04326 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_find_pt_in_lu,
04327 (const struct loopuse *lu,
04328 const point_t pt,
04329 const struct bn_tol *tol));
04330 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_find_pt_in_face,
04331 (const struct faceuse *fu,
04332 const point_t pt,
04333 const struct bn_tol *tol));
04334 RT_EXPORT BU_EXTERN(struct vertex *nmg_find_pt_in_shell,
04335 (const struct shell *s,
04336 const point_t pt,
04337 const struct bn_tol *tol));
04338 RT_EXPORT BU_EXTERN(struct vertex *nmg_find_pt_in_model,
04339 (const struct model *m,
04340 const point_t pt,
04341 const struct bn_tol *tol));
04342 RT_EXPORT BU_EXTERN(int nmg_is_vertex_in_edgelist,
04343 (const struct vertex *v,
04344 const struct bu_list *hd));
04345 RT_EXPORT BU_EXTERN(int nmg_is_vertex_in_looplist,
04346 (const struct vertex *v,
04347 const struct bu_list *hd,
04348 int singletons));
04349 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_is_vertex_in_face,
04350 (const struct vertex *v,
04351 const struct face *f));
04352 RT_EXPORT BU_EXTERN(int nmg_is_vertex_a_selfloop_in_shell,
04353 (const struct vertex *v,
04354 const struct shell *s));
04355 RT_EXPORT BU_EXTERN(int nmg_is_vertex_in_facelist,
04356 (const struct vertex *v,
04357 const struct bu_list *hd));
04358 RT_EXPORT BU_EXTERN(int nmg_is_edge_in_edgelist,
04359 (const struct edge *e,
04360 const struct bu_list *hd));
04361 RT_EXPORT BU_EXTERN(int nmg_is_edge_in_looplist,
04362 (const struct edge *e,
04363 const struct bu_list *hd));
04364 RT_EXPORT BU_EXTERN(int nmg_is_edge_in_facelist,
04365 (const struct edge *e,
04366 const struct bu_list *hd));
04367 RT_EXPORT BU_EXTERN(int nmg_is_loop_in_facelist,
04368 (const struct loop *l,
04369 const struct bu_list *fu_hd));
04370
04371
04372 RT_EXPORT BU_EXTERN(void nmg_vertex_tabulate,
04373 (struct bu_ptbl *tab,
04374 const long *magic_p));
04375 RT_EXPORT BU_EXTERN(void nmg_vertexuse_normal_tabulate,
04376 (struct bu_ptbl *tab,
04377 const long *magic_p));
04378 RT_EXPORT BU_EXTERN(void nmg_edgeuse_tabulate,
04379 (struct bu_ptbl *tab,
04380 const long *magic_p));
04381 RT_EXPORT BU_EXTERN(void nmg_edge_tabulate,
04382 (struct bu_ptbl *tab,
04383 const long *magic_p));
04384 RT_EXPORT BU_EXTERN(void nmg_edge_g_tabulate,
04385 (struct bu_ptbl *tab,
04386 const long *magic_p));
04387 RT_EXPORT BU_EXTERN(void nmg_face_tabulate,
04388 (struct bu_ptbl *tab,
04389 const long *magic_p));
04390 RT_EXPORT BU_EXTERN(void nmg_edgeuse_with_eg_tabulate,
04391 (struct bu_ptbl *tab,
04392 const struct edge_g_lseg *eg));
04393 RT_EXPORT BU_EXTERN(void nmg_edgeuse_on_line_tabulate,
04394 (struct bu_ptbl *tab,
04395 const long *magic_p,
04396 const point_t pt,
04397 const vect_t dir,
04398 const struct bn_tol *tol));
04399 RT_EXPORT BU_EXTERN(void nmg_e_and_v_tabulate,
04400 (struct bu_ptbl *eutab,
04401 struct bu_ptbl *vtab,
04402 const long *magic_p));
04403 RT_EXPORT BU_EXTERN(int nmg_2edgeuse_g_coincident,
04404 (const struct edgeuse *eu1,
04405 const struct edgeuse *eu2,
04406 const struct bn_tol *tol));
04407
04408
04409 RT_EXPORT BU_EXTERN(void nmg_translate_face,
04410 (struct faceuse *fu,
04411 const vect_t Vec,
04412 const struct bn_tol *tol));
04413 RT_EXPORT BU_EXTERN(int nmg_extrude_face,
04414 (struct faceuse *fu,
04415 const vect_t Vec,
04416 const struct bn_tol *tol));
04417 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_find_vertex_in_lu,
04418 (const struct vertex *v,
04419 const struct loopuse *lu));
04420 RT_EXPORT BU_EXTERN(void nmg_fix_overlapping_loops,
04421 (struct shell *s,
04422 const struct bn_tol *tol));
04423 RT_EXPORT BU_EXTERN(void nmg_break_crossed_loops,
04424 (struct shell *is,
04425 const struct bn_tol *tol));
04426 RT_EXPORT BU_EXTERN(struct shell *nmg_extrude_cleanup,
04427 (struct shell *is,
04428 const int is_void,
04429 const struct bn_tol *tol));
04430 RT_EXPORT BU_EXTERN(void nmg_hollow_shell,
04431 (struct shell *s,
04432 const fastf_t thick,
04433 const int approximate,
04434 const struct bn_tol *tol));
04435 RT_EXPORT BU_EXTERN(struct shell *nmg_extrude_shell,
04436 (struct shell *s,
04437 const fastf_t dist,
04438 const int normal_ward,
04439 const int approximate,
04440 const struct bn_tol *tol));
04441
04442
04443 RT_EXPORT BU_EXTERN(char *nmg_orientation,
04444 (int orientation));
04445 RT_EXPORT BU_EXTERN(void nmg_pr_orient,
04446 (int orientation,
04447 const char *h));
04448 RT_EXPORT BU_EXTERN(void nmg_pr_m,
04449 (const struct model *m));
04450 RT_EXPORT BU_EXTERN(void nmg_pr_r,
04451 (const struct nmgregion *r,
04452 char *h));
04453 RT_EXPORT BU_EXTERN(void nmg_pr_sa,
04454 (const struct shell_a *sa,
04455 char *h));
04456 RT_EXPORT BU_EXTERN(void nmg_pr_lg,
04457 (const struct loop_g *lg,
04458 char *h));
04459 RT_EXPORT BU_EXTERN(void nmg_pr_fg,
04460 (const long *magic,
04461 char *h));
04462 RT_EXPORT BU_EXTERN(void nmg_pr_s,
04463 (const struct shell *s,
04464 char *h));
04465 RT_EXPORT BU_EXTERN(void nmg_pr_s_briefly,
04466 (const struct shell *s,
04467 char *h));
04468 RT_EXPORT BU_EXTERN(void nmg_pr_f,
04469 (const struct face *f,
04470 char *h));
04471 RT_EXPORT BU_EXTERN(void nmg_pr_fu,
04472 (const struct faceuse *fu,
04473 char *h));
04474 RT_EXPORT BU_EXTERN(void nmg_pr_fu_briefly,
04475 (const struct faceuse *fu,
04476 char *h));
04477 RT_EXPORT BU_EXTERN(void nmg_pr_l,
04478 (const struct loop *l,
04479 char *h));
04480 RT_EXPORT BU_EXTERN(void nmg_pr_lu,
04481 (const struct loopuse *lu,
04482 char *h));
04483 RT_EXPORT BU_EXTERN(void nmg_pr_lu_briefly,
04484 (const struct loopuse *lu,
04485 char *h));
04486 RT_EXPORT BU_EXTERN(void nmg_pr_eg,
04487 (const long *eg,
04488 char *h));
04489 RT_EXPORT BU_EXTERN(void nmg_pr_e,
04490 (const struct edge *e,
04491 char *h));
04492 RT_EXPORT BU_EXTERN(void nmg_pr_eu,
04493 (const struct edgeuse *eu,
04494 char *h));
04495 RT_EXPORT BU_EXTERN(void nmg_pr_eu_briefly,
04496 (const struct edgeuse *eu,
04497 char *h));
04498 RT_EXPORT BU_EXTERN(void nmg_pr_eu_endpoints,
04499 (const struct edgeuse *eu,
04500 char *h));
04501 RT_EXPORT BU_EXTERN(void nmg_pr_vg,
04502 (const struct vertex_g *vg,
04503 char *h));
04504 RT_EXPORT BU_EXTERN(void nmg_pr_v,
04505 (const struct vertex *v,
04506 char *h));
04507 RT_EXPORT BU_EXTERN(void nmg_pr_vu,
04508 (const struct vertexuse *vu,
04509 char *h));
04510 RT_EXPORT BU_EXTERN(void nmg_pr_vu_briefly,
04511 (const struct vertexuse *vu,
04512 char *h));
04513 RT_EXPORT BU_EXTERN(void nmg_pr_vua,
04514 (const long *magic_p,
04515 char *h));
04516 RT_EXPORT BU_EXTERN(void nmg_euprint,
04517 (const char *str,
04518 const struct edgeuse *eu));
04519 RT_EXPORT BU_EXTERN(void nmg_pr_ptbl,
04520 (const char *title,
04521 const struct bu_ptbl *tbl,
04522 int verbose));
04523 RT_EXPORT BU_EXTERN(void nmg_pr_ptbl_vert_list,
04524 (const char *str,
04525 const struct bu_ptbl *tbl,
04526 const fastf_t *mag));
04527 RT_EXPORT BU_EXTERN(void nmg_pr_one_eu_vecs,
04528 (const struct edgeuse *eu,
04529 const vect_t xvec,
04530 const vect_t yvec,
04531 const vect_t zvec,
04532 const struct bn_tol *tol));
04533 RT_EXPORT BU_EXTERN(void nmg_pr_fu_around_eu_vecs,
04534 (const struct edgeuse *eu,
04535 const vect_t xvec,
04536 const vect_t yvec,
04537 const vect_t zvec,
04538 const struct bn_tol *tol));
04539 RT_EXPORT BU_EXTERN(void nmg_pr_fu_around_eu,
04540 (const struct edgeuse *eu,
04541 const struct bn_tol *tol));
04542 RT_EXPORT BU_EXTERN(void nmg_pl_lu_around_eu,
04543 (const struct edgeuse *eu));
04544 RT_EXPORT BU_EXTERN(void nmg_pr_fus_in_fg,
04545 (const long *fg_magic));
04546
04547
04548 RT_EXPORT BU_EXTERN(struct rt_bot_internal *nmg_bot,
04549 (struct shell *s,
04550 const struct bn_tol *tol));
04551 RT_EXPORT BU_EXTERN(int rt_dist_pt3_line3,
04552 (fastf_t *dist,
04553 point_t pca,
04554 const point_t a,
04555 const point_t p,
04556 const vect_t dir,
04557 const struct bn_tol *tol));
04558
04559 RT_EXPORT BU_EXTERN(int rt_dist_line3_line3,
04560 (fastf_t dist[2],
04561 const point_t p1,
04562 const point_t p2,
04563 const vect_t d1,
04564 const vect_t d2,
04565 const struct bn_tol *tol));
04566
04567 RT_EXPORT BU_EXTERN(int nmg_snurb_calc_lu_uv_orient,
04568 (const struct loopuse *lu));
04569 RT_EXPORT BU_EXTERN(void nmg_snurb_fu_eval,
04570 (const struct faceuse *fu,
04571 const fastf_t u,
04572 const fastf_t v,
04573 point_t pt_on_srf));
04574 RT_EXPORT BU_EXTERN(void nmg_snurb_fu_get_norm,
04575 (const struct faceuse *fu,
04576 const fastf_t u,
04577 const fastf_t v,
04578 vect_t norm));
04579 RT_EXPORT BU_EXTERN(void nmg_snurb_fu_get_norm_at_vu,
04580 (const struct faceuse *fu,
04581 const struct vertexuse *vu,
04582 vect_t norm));
04583 RT_EXPORT BU_EXTERN(void nmg_find_zero_length_edges,
04584 (const struct model *m));
04585 RT_EXPORT BU_EXTERN(struct face *nmg_find_top_face_in_dir,
04586 (const struct shell *s,
04587 int dir, long *flags));
04588 RT_EXPORT BU_EXTERN(struct face *nmg_find_top_face,
04589 (const struct shell *s,
04590 int *dir,
04591 long *flags));
04592 RT_EXPORT BU_EXTERN(int nmg_find_outer_and_void_shells,
04593 (struct nmgregion *r,
04594 struct bu_ptbl ***shells,
04595 const struct bn_tol *tol));
04596 RT_EXPORT BU_EXTERN(int nmg_mark_edges_real,
04597 (const long *magic_p));
04598 RT_EXPORT BU_EXTERN(void nmg_tabulate_face_g_verts,
04599 (struct bu_ptbl *tab,
04600 const struct face_g_plane *fg));
04601 RT_EXPORT BU_EXTERN(void nmg_isect_shell_self,
04602 (struct shell *s,
04603 const struct bn_tol *tol));
04604 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_next_radial_eu,
04605 (const struct edgeuse *eu,
04606 const struct shell *s,
04607 const int wires));
04608 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_prev_radial_eu,
04609 (const struct edgeuse *eu,
04610 const struct shell *s,
04611 const int wires));
04612 RT_EXPORT BU_EXTERN(int nmg_radial_face_count,
04613 (const struct edgeuse *eu,
04614 const struct shell *s));
04615 RT_EXPORT BU_EXTERN(int nmg_check_closed_shell,
04616 (const struct shell *s,
04617 const struct bn_tol *tol));
04618 RT_EXPORT BU_EXTERN(int nmg_move_lu_between_fus,
04619 (struct faceuse *dest,
04620 struct faceuse *src,
04621 struct loopuse *lu));
04622 RT_EXPORT BU_EXTERN(void nmg_loop_plane_newell,
04623 (const struct loopuse *lu,
04624 plane_t pl));
04625 RT_EXPORT BU_EXTERN(fastf_t nmg_loop_plane_area,
04626 (const struct loopuse *lu,
04627 plane_t pl));
04628 RT_EXPORT BU_EXTERN(int nmg_calc_face_plane,
04629 (struct faceuse *fu_in,
04630 plane_t pl));
04631 RT_EXPORT BU_EXTERN(int nmg_calc_face_g,
04632 (struct faceuse *fu));
04633 RT_EXPORT BU_EXTERN(fastf_t nmg_faceuse_area,
04634 (const struct faceuse *fu));
04635 RT_EXPORT BU_EXTERN(fastf_t nmg_shell_area,
04636 (const struct shell *s));
04637 RT_EXPORT BU_EXTERN(fastf_t nmg_region_area,
04638 (const struct nmgregion *r));
04639 RT_EXPORT BU_EXTERN(fastf_t nmg_model_area,
04640 (const struct model *m));
04641
04642 RT_EXPORT BU_EXTERN(void nmg_purge_unwanted_intersection_points,
04643 (struct bu_ptbl *vert_list,
04644 fastf_t *mag,
04645 const struct faceuse *fu,
04646 const struct bn_tol *tol));
04647 RT_EXPORT BU_EXTERN(int nmg_in_or_ref,
04648 (struct vertexuse *vu,
04649 struct bu_ptbl *b));
04650 RT_EXPORT BU_EXTERN(void nmg_rebound,
04651 (struct model *m,
04652 const struct bn_tol *tol));
04653 RT_EXPORT BU_EXTERN(void nmg_count_shell_kids,
04654 (const struct model *m,
04655 unsigned long *total_wires,
04656 unsigned long *total_faces,
04657 unsigned long *total_points));
04658 RT_EXPORT BU_EXTERN(void nmg_close_shell,
04659 (struct shell *s,
04660 const struct bn_tol *tol));
04661 RT_EXPORT BU_EXTERN(struct shell *nmg_dup_shell ,
04662 (struct shell *s,
04663 long ***copy_tbl,
04664 const struct bn_tol *tol));
04665 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_pop_eu,
04666 (struct bu_ptbl *stack));
04667 RT_EXPORT BU_EXTERN(void nmg_reverse_radials,
04668 (struct faceuse *fu,
04669 const struct bn_tol *tol));
04670 RT_EXPORT BU_EXTERN(void nmg_reverse_face_and_radials,
04671 (struct faceuse *fu,
04672 const struct bn_tol *tol));
04673 RT_EXPORT BU_EXTERN(int nmg_shell_is_void,
04674 (const struct shell *s));
04675 RT_EXPORT BU_EXTERN(void nmg_propagate_normals,
04676 (struct faceuse *fu_in,
04677 long *flags,
04678 const struct bn_tol *tol));
04679 RT_EXPORT BU_EXTERN(void nmg_connect_same_fu_orients,
04680 (struct shell *s));
04681 RT_EXPORT BU_EXTERN(void nmg_fix_decomposed_shell_normals,
04682 (struct shell *s,
04683 const struct bn_tol *tol));
04684 RT_EXPORT BU_EXTERN(struct model *nmg_mk_model_from_region,
04685 (struct nmgregion *r,
04686 int reindex));
04687 RT_EXPORT BU_EXTERN(void nmg_fix_normals,
04688 (struct shell *s_orig,
04689 const struct bn_tol *tol));
04690 RT_EXPORT BU_EXTERN(int nmg_break_long_edges,
04691 (struct shell *s,
04692 const struct bn_tol *tol));
04693 RT_EXPORT BU_EXTERN(struct faceuse *nmg_mk_new_face_from_loop,
04694 (struct loopuse *lu));
04695 RT_EXPORT BU_EXTERN(int nmg_split_loops_into_faces,
04696 (long *magic_p,
04697 const struct bn_tol *tol));
04698 RT_EXPORT BU_EXTERN(int nmg_decompose_shell,
04699 (struct shell *s,
04700 const struct bn_tol *tol));
04701 RT_EXPORT BU_EXTERN(void nmg_stash_model_to_file,
04702 (const char *filename,
04703 const struct model *m,
04704 const char *title));
04705 RT_EXPORT BU_EXTERN(int nmg_unbreak_region_edges,
04706 (long *magic_p));
04707
04708 RT_EXPORT BU_EXTERN(int nmg_mv_shell_to_region,
04709 (struct shell *s,
04710 struct nmgregion *r));
04711 RT_EXPORT BU_EXTERN(int nmg_find_isect_faces,
04712 (const struct vertex *new_v,
04713 struct bu_ptbl *faces,
04714 int *free_edges,
04715 const struct bn_tol *tol));
04716 RT_EXPORT BU_EXTERN(int nmg_simple_vertex_solve,
04717 (struct vertex *new_v,
04718 const struct bu_ptbl *faces,
04719 const struct bn_tol *tol));
04720 RT_EXPORT BU_EXTERN(int nmg_ck_vert_on_fus,
04721 (const struct vertex *v,
04722 const struct bn_tol *tol));
04723 RT_EXPORT BU_EXTERN(void nmg_make_faces_at_vert,
04724 (struct vertex *new_v,
04725 struct bu_ptbl *int_faces,
04726 const struct bn_tol *tol));
04727 RT_EXPORT BU_EXTERN(void nmg_kill_cracks_at_vertex,
04728 (const struct vertex *vp));
04729 RT_EXPORT BU_EXTERN(int nmg_complex_vertex_solve,
04730 (struct vertex *new_v,
04731 const struct bu_ptbl *faces,
04732 const int free_edges,
04733 const int approximate,
04734 const struct bn_tol *tol));
04735 RT_EXPORT BU_EXTERN(int nmg_bad_face_normals,
04736 (const struct shell *s,
04737 const struct bn_tol *tol));
04738 RT_EXPORT BU_EXTERN(int nmg_faces_are_radial,
04739 (const struct faceuse *fu1,
04740 const struct faceuse *fu2));
04741 RT_EXPORT BU_EXTERN(int nmg_move_edge_thru_pt,
04742 (struct edgeuse *mv_eu,
04743 const point_t pt,
04744 const struct bn_tol *tol));
04745 RT_EXPORT BU_EXTERN(void nmg_vlist_to_wire_edges,
04746 (struct shell *s,
04747 const struct bu_list *vhead));
04748 RT_EXPORT BU_EXTERN(void nmg_follow_free_edges_to_vertex,
04749 (const struct vertex *vpa,
04750 const struct vertex *vpb,
04751 struct bu_ptbl *bad_verts,
04752 const struct shell *s,
04753 const struct edgeuse *eu,
04754 struct bu_ptbl *verts,
04755 int *found));
04756 RT_EXPORT BU_EXTERN(void nmg_glue_face_in_shell,
04757 (const struct faceuse *fu,
04758 struct shell *s,
04759 const struct bn_tol *tol));
04760 RT_EXPORT BU_EXTERN(int nmg_open_shells_connect,
04761 (struct shell *dst,
04762 struct shell *src,
04763 const long **copy_tbl,
04764 const struct bn_tol *tol));
04765 RT_EXPORT BU_EXTERN(int nmg_in_vert,
04766 (struct vertex *new_v,
04767 const int approximate,
04768 const struct bn_tol *tol));
04769 RT_EXPORT BU_EXTERN(void nmg_mirror_model,
04770 (struct model *m));
04771 RT_EXPORT BU_EXTERN(int nmg_kill_cracks,
04772 (struct shell *s));
04773 RT_EXPORT BU_EXTERN(int nmg_kill_zero_length_edgeuses,
04774 (struct model *m));
04775 RT_EXPORT BU_EXTERN(void nmg_make_faces_within_tol,
04776 (struct shell *s,
04777 const struct bn_tol *tol));
04778 RT_EXPORT BU_EXTERN(void nmg_intersect_loops_self,
04779 (struct shell *s,
04780 const struct bn_tol *tol));
04781 RT_EXPORT BU_EXTERN(struct edge_g_cnurb *rt_join_cnurbs,
04782 (struct bu_list *crv_head));
04783 RT_EXPORT BU_EXTERN(struct edge_g_cnurb *rt_arc2d_to_cnurb,
04784 (point_t i_center,
04785 point_t i_start,
04786 point_t i_end,
04787 int point_type,
04788 const struct bn_tol *tol));
04789 RT_EXPORT BU_EXTERN(int nmg_break_edge_at_verts,
04790 (struct edge *e,
04791 struct bu_ptbl *verts,
04792 const struct bn_tol *tol));
04793 RT_EXPORT BU_EXTERN(void nmg_isect_shell_self,
04794 (struct shell *s,
04795 const struct bn_tol *tol));
04796 RT_EXPORT BU_EXTERN(fastf_t nmg_loop_plane_area,
04797 (const struct loopuse *lu,
04798 plane_t pl));
04799 RT_EXPORT BU_EXTERN(int nmg_break_edges,
04800 (long *magic_p,
04801 const struct bn_tol *tol));
04802 RT_EXPORT BU_EXTERN(int nmg_lu_is_convex,
04803 (struct loopuse *lu,
04804 const struct bn_tol *tol));
04805 #ifdef SEEN_RTGEOM_H
04806 RT_EXPORT BU_EXTERN(int nmg_to_arb,
04807 (const struct model *m,
04808 struct rt_arb_internal *arb_int));
04809 RT_EXPORT BU_EXTERN(int nmg_to_tgc,
04810 (const struct model *m,
04811 struct rt_tgc_internal *tgc_int,
04812 const struct bn_tol *tol));
04813 RT_EXPORT BU_EXTERN(int nmg_to_poly,
04814 (const struct model *m,
04815 struct rt_pg_internal *poly_int,
04816 const struct bn_tol *tol));
04817 RT_EXPORT BU_EXTERN(struct rt_bot_internal *nmg_bot,
04818 (struct shell *s,
04819 const struct bn_tol *tol));
04820 #endif
04821
04822 RT_EXPORT BU_EXTERN(int nmg_simplify_shell_edges,
04823 (struct shell *s,
04824 const struct bn_tol *tol));
04825 RT_EXPORT BU_EXTERN(int nmg_edge_collapse,
04826 (struct model *m,
04827 const struct bn_tol *tol,
04828 const fastf_t tol_coll,
04829 const fastf_t min_angle));
04830
04831
04832 RT_EXPORT BU_EXTERN(int rt_bot_edge_in_list,
04833 (const int v1,
04834 const int v2,
04835 const int edge_list[],
04836 const int edge_count0));
04837 RT_EXPORT BU_EXTERN(int rt_bot_plot,
04838 (struct bu_list *vhead,
04839 struct rt_db_internal *ip,
04840 const struct rt_tess_tol *ttol,
04841 const struct bn_tol *tol));
04842 RT_EXPORT BU_EXTERN(int rt_bot_plot_poly,
04843 (struct bu_list *vhead,
04844 struct rt_db_internal *ip,
04845 const struct rt_tess_tol *ttol,
04846 const struct bn_tol *tol));
04847 #ifdef SEEN_RTGEOM_H
04848 RT_EXPORT BU_EXTERN(int rt_bot_find_v_nearest_pt2,
04849 (const struct rt_bot_internal *bot,
04850 const point_t pt2,
04851 const mat_t mat));
04852 RT_EXPORT BU_EXTERN(int rt_bot_find_e_nearest_pt2,
04853 (int *vert1,
04854 int *vert2,
04855 const struct rt_bot_internal *bot,
04856 const point_t pt2,
04857 const mat_t mat));
04858 RT_EXPORT BU_EXTERN(int rt_bot_vertex_fuse,
04859 (struct rt_bot_internal *bot));
04860 RT_EXPORT BU_EXTERN(int rt_bot_face_fuse,
04861 (struct rt_bot_internal *bot));
04862 RT_EXPORT BU_EXTERN(int rt_bot_condense,
04863 (struct rt_bot_internal *bot));
04864 RT_EXPORT BU_EXTERN(int rt_smooth_bot,
04865 (struct rt_bot_internal *bot,
04866 char *bot_name,
04867 struct db_i *dbip,
04868 fastf_t normal_tolerance_angle));
04869
04870 #endif
04871 RT_EXPORT BU_EXTERN(int rt_bot_same_orientation,
04872 (const int *a,
04873 const int *b));
04874
04875
04876 RT_EXPORT BU_EXTERN(void nmg_triangulate_shell,
04877 (struct shell *s,
04878 const struct bn_tol *tol));
04879
04880
04881 RT_EXPORT BU_EXTERN(void nmg_triangulate_model,
04882 (struct model *m,
04883 const struct bn_tol *tol));
04884 RT_EXPORT BU_EXTERN(void nmg_triangulate_fu,
04885 (struct faceuse *fu,
04886 const struct bn_tol *tol));
04887
04888
04889 RT_EXPORT BU_EXTERN(int nmg_dangling_face,
04890 (const struct faceuse *fu,
04891 const char *manifolds));
04892
04893
04894
04895
04896 RT_EXPORT BU_EXTERN(char *nmg_shell_manifolds,
04897 (struct shell *sp,
04898 char *tbl));
04899 RT_EXPORT BU_EXTERN(char *nmg_manifolds,
04900 (struct model *m));
04901
04902
04903 RT_EXPORT BU_EXTERN(int nmg_ray_segs,
04904 (struct ray_data *rd));
04905
04906
04907 RT_EXPORT BU_EXTERN(int rt_num_circular_segments,
04908 (double maxerr,
04909 double radius));
04910
04911
04912 RT_EXPORT BU_EXTERN(int rt_tcl_parse_ray,
04913 (Tcl_Interp *interp,
04914 struct xray *rp,
04915 const char *const*argv));
04916 RT_EXPORT BU_EXTERN(void rt_tcl_pr_cutter,
04917 (Tcl_Interp *interp,
04918 const union cutter *cutp));
04919 RT_EXPORT BU_EXTERN(int rt_tcl_cutter,
04920 (ClientData clientData,
04921 Tcl_Interp *interp,
04922 int argc,
04923 const char *const*argv));
04924 RT_EXPORT BU_EXTERN(void rt_tcl_pr_hit,
04925 (Tcl_Interp *interp,
04926 struct hit *hitp,
04927 const struct seg *segp,
04928 const struct xray *rayp,
04929 int flipflag));
04930 RT_EXPORT BU_EXTERN(void rt_tcl_setup,
04931 (Tcl_Interp *interp));
04932 #ifdef BRLCAD_DEBUG
04933 RT_EXPORT BU_EXTERN(int Sysv_d_Init,
04934 (Tcl_Interp *interp));
04935 RT_EXPORT BU_EXTERN(int Rt_d_Init,
04936 (Tcl_Interp *interp));
04937 #else
04938 RT_EXPORT BU_EXTERN(int Sysv_Init,
04939 (Tcl_Interp *interp));
04940 RT_EXPORT BU_EXTERN(int Rt_Init,
04941 (Tcl_Interp *interp));
04942 #endif
04943 RT_EXPORT BU_EXTERN(void db_full_path_appendresult,
04944 (Tcl_Interp *interp,
04945 const struct db_full_path *pp));
04946 RT_EXPORT BU_EXTERN(int tcl_obj_to_int_array,
04947 (Tcl_Interp *interp,
04948 Tcl_Obj *list,
04949 int **array,
04950 int *array_len));
04951
04952
04953 RT_EXPORT BU_EXTERN(int tcl_obj_to_fastf_array,
04954 (Tcl_Interp *interp,
04955 Tcl_Obj *list,
04956 fastf_t **array,
04957 int *array_len));
04958
04959 RT_EXPORT BU_EXTERN(int tcl_list_to_int_array,
04960 (Tcl_Interp *interp,
04961 char *char_list,
04962 int **array,
04963 int *array_len));
04964
04965 RT_EXPORT BU_EXTERN(int tcl_list_to_fastf_array,
04966 (Tcl_Interp *interp,
04967 char *char_list,
04968 fastf_t **array,
04969 int *array_len));
04970
04971
04972
04973 RT_EXPORT BU_EXTERN(int rt_mk_hyperbola,
04974 (struct rt_pt_node *pts,
04975 fastf_t r,
04976 fastf_t b,
04977 fastf_t c,
04978 fastf_t dtol,
04979 fastf_t ntol));
04980
04981
04982
04983
04984 RT_EXPORT BU_EXTERN(int nmg_classify_pt_loop,
04985 (const point_t pt,
04986 const struct loopuse *lu,
04987 const struct bn_tol *tol));
04988
04989 RT_EXPORT BU_EXTERN(int nmg_classify_s_vs_s,
04990 (struct shell *s,
04991 struct shell *s2,
04992 const struct bn_tol *tol));
04993
04994 RT_EXPORT BU_EXTERN(int nmg_classify_lu_lu,
04995 (const struct loopuse *lu1,
04996 const struct loopuse *lu2,
04997 const struct bn_tol *tol));
04998
04999 RT_EXPORT BU_EXTERN(int nmg_class_pt_f,
05000 (const point_t pt,
05001 const struct faceuse *fu,
05002 const struct bn_tol *tol));
05003 RT_EXPORT BU_EXTERN(int nmg_class_pt_s,
05004 (const point_t pt,
05005 const struct shell *s,
05006 const int in_or_out_only,
05007 const struct bn_tol *tol));
05008
05009
05010 RT_EXPORT BU_EXTERN(int nmg_eu_is_part_of_crack,
05011 (const struct edgeuse *eu));
05012
05013 RT_EXPORT BU_EXTERN(int nmg_class_pt_lu_except,
05014 (point_t pt,
05015 const struct loopuse *lu,
05016 const struct edge *e_p,
05017 const struct bn_tol *tol));
05018
05019 RT_EXPORT BU_EXTERN(int nmg_class_pt_fu_except,
05020 (const point_t pt,
05021 const struct faceuse *fu,
05022 const struct loopuse *ignore_lu,
05023 void (*eu_func)(), void (*vu_func)(),
05024 const char *priv,
05025 const int call_on_hits,
05026 const int in_or_out_only,
05027 const struct bn_tol *tol));
05028
05029
05030 RT_EXPORT BU_EXTERN(void nmg_pl_shell,
05031 (FILE *fp,
05032 const struct shell *s,
05033 int fancy));
05034
05035 RT_EXPORT BU_EXTERN(void nmg_vu_to_vlist,
05036 (struct bu_list *vhead,
05037 const struct vertexuse *vu));
05038 RT_EXPORT BU_EXTERN(void nmg_eu_to_vlist,
05039 (struct bu_list *vhead,
05040 const struct bu_list *eu_hd));
05041 RT_EXPORT BU_EXTERN(void nmg_lu_to_vlist,
05042 (struct bu_list *vhead,
05043 const struct loopuse *lu,
05044 int poly_markers,
05045 const vectp_t normal));
05046 RT_EXPORT BU_EXTERN(void nmg_snurb_fu_to_vlist,
05047 (struct bu_list *vhead,
05048 const struct faceuse *fu,
05049 int poly_markers));
05050 RT_EXPORT BU_EXTERN(void nmg_s_to_vlist,
05051 (struct bu_list *vhead,
05052 const struct shell *s,
05053 int poly_markers));
05054 RT_EXPORT BU_EXTERN(void nmg_r_to_vlist,
05055 (struct bu_list *vhead,
05056 const struct nmgregion *r,
05057 int poly_markers));
05058 RT_EXPORT BU_EXTERN(void nmg_m_to_vlist,
05059 (struct bu_list *vhead,
05060 struct model *m,
05061 int poly_markers));
05062 RT_EXPORT BU_EXTERN(void nmg_offset_eu_vert,
05063 (point_t base,
05064 const struct edgeuse *eu,
05065 const vect_t face_normal,
05066 int tip));
05067
05068 RT_EXPORT BU_EXTERN(void nmg_pl_v,
05069 (FILE *fp,
05070 const struct vertex *v,
05071 long *b));
05072 RT_EXPORT BU_EXTERN(void nmg_pl_e,
05073 (FILE *fp,
05074 const struct edge *e,
05075 long *b,
05076 int red,
05077 int green,
05078 int blue));
05079 RT_EXPORT BU_EXTERN(void nmg_pl_eu,
05080 (FILE *fp,
05081 const struct edgeuse *eu,
05082 long *b,
05083 int red,
05084 int green,
05085 int blue));
05086 RT_EXPORT BU_EXTERN(void nmg_pl_lu,
05087 (FILE *fp,
05088 const struct loopuse *fu,
05089 long *b,
05090 int red,
05091 int green,
05092 int blue));
05093 RT_EXPORT BU_EXTERN(void nmg_pl_fu,
05094 (FILE *fp,
05095 const struct faceuse *fu,
05096 long *b,
05097 int red,
05098 int green,
05099 int blue));
05100 RT_EXPORT BU_EXTERN(void nmg_pl_s,
05101 (FILE *fp,
05102 const struct shell *s));
05103 RT_EXPORT BU_EXTERN(void nmg_pl_r,
05104 (FILE *fp,
05105 const struct nmgregion *r));
05106 RT_EXPORT BU_EXTERN(void nmg_pl_m,
05107 (FILE *fp,
05108 const struct model *m));
05109 RT_EXPORT BU_EXTERN(void nmg_vlblock_v,
05110 (struct bn_vlblock *vbp,
05111 const struct vertex *v,
05112 long *tab));
05113 RT_EXPORT BU_EXTERN(void nmg_vlblock_e,
05114 (struct bn_vlblock *vbp,
05115 const struct edge *e,
05116 long *tab,
05117 int red,
05118 int green,
05119 int blue,
05120 int fancy));
05121 RT_EXPORT BU_EXTERN(void nmg_vlblock_eu,
05122 (struct bn_vlblock *vbp,
05123 const struct edgeuse *eu,
05124 long *tab,
05125 int red,
05126 int green,
05127 int blue,
05128 int fancy,
05129 int loopnum));
05130 RT_EXPORT BU_EXTERN(void nmg_vlblock_euleft,
05131 (struct bu_list *vh,
05132 const struct edgeuse *eu,
05133 const point_t center,
05134 const mat_t mat,
05135 const vect_t xvec,
05136 const vect_t yvec,
05137 double len,
05138 const struct bn_tol *tol));
05139 RT_EXPORT BU_EXTERN(void nmg_vlblock_around_eu,
05140 (struct bn_vlblock *vbp,
05141 const struct edgeuse *arg_eu,
05142 long *tab,
05143 int fancy,
05144 const struct bn_tol *tol));
05145 RT_EXPORT BU_EXTERN(void nmg_vlblock_lu,
05146 (struct bn_vlblock *vbp,
05147 const struct loopuse *lu,
05148 long *tab,
05149 int red,
05150 int green,
05151 int blue,
05152 int fancy,
05153 int loopnum));
05154 RT_EXPORT BU_EXTERN(void nmg_vlblock_fu,
05155 (struct bn_vlblock *vbp,
05156 const struct faceuse *fu,
05157 long *tab, int fancy));
05158 RT_EXPORT BU_EXTERN(void nmg_vlblock_s,
05159 (struct bn_vlblock *vbp,
05160 const struct shell *s,
05161 int fancy));
05162 RT_EXPORT BU_EXTERN(void nmg_vlblock_r,
05163 (struct bn_vlblock *vbp,
05164 const struct nmgregion *r,
05165 int fancy));
05166 RT_EXPORT BU_EXTERN(void nmg_vlblock_m,
05167 (struct bn_vlblock *vbp,
05168 const struct model *m,
05169 int fancy));
05170
05171 RT_EXPORT BU_EXTERN(void nmg_pl_edges_in_2_shells,
05172 (struct bn_vlblock *vbp,
05173 long *b,
05174 const struct edgeuse *eu,
05175 int fancy,
05176 const struct bn_tol *tol));
05177 RT_EXPORT BU_EXTERN(void nmg_pl_isect,
05178 (const char *filename,
05179 const struct shell *s,
05180 const struct bn_tol *tol));
05181 RT_EXPORT BU_EXTERN(void nmg_pl_comb_fu,
05182 (int num1,
05183 int num2,
05184 const struct faceuse *fu1));
05185 RT_EXPORT BU_EXTERN(void nmg_pl_2fu,
05186 (const char *str,
05187 int num,
05188 const struct faceuse *fu1,
05189 const struct faceuse *fu2,
05190 int show_mates));
05191
05192 RT_EXPORT BU_EXTERN(void nmg_show_broken_classifier_stuff,
05193 (long *p,
05194 long *classlist[4],
05195 int all_new,
05196 int fancy,
05197 const char *a_string));
05198 RT_EXPORT BU_EXTERN(void nmg_face_plot,
05199 (const struct faceuse *fu));
05200 RT_EXPORT BU_EXTERN(void nmg_2face_plot,
05201 (const struct faceuse *fu1,
05202 const struct faceuse *fu2));
05203 RT_EXPORT BU_EXTERN(void nmg_face_lu_plot,
05204 (const struct loopuse *lu,
05205 const struct vertexuse *vu1,
05206 const struct vertexuse *vu2));
05207 RT_EXPORT BU_EXTERN(void nmg_plot_lu_ray,
05208 (const struct loopuse *lu,
05209 const struct vertexuse *vu1,
05210 const struct vertexuse *vu2,
05211 const vect_t left));
05212 RT_EXPORT BU_EXTERN(void nmg_plot_ray_face,
05213 (const char *fname,
05214 point_t pt,
05215 const vect_t dir,
05216 const struct faceuse *fu));
05217 RT_EXPORT BU_EXTERN(void nmg_plot_lu_around_eu,
05218 (const char *prefix,
05219 const struct edgeuse *eu,
05220 const struct bn_tol *tol));
05221 RT_EXPORT BU_EXTERN(int nmg_snurb_to_vlist,
05222 (struct bu_list *vhead,
05223 const struct face_g_snurb *fg,
05224 int n_interior));
05225 RT_EXPORT BU_EXTERN(void nmg_cnurb_to_vlist,
05226 (struct bu_list *vhead,
05227 const struct edgeuse *eu,
05228 int n_interior,
05229 int cmd));
05230 RT_EXPORT extern void (*nmg_plot_anim_upcall)();
05231 RT_EXPORT extern void (*nmg_vlblock_anim_upcall)();
05232 RT_EXPORT extern void (*nmg_mged_debug_display_hack)();
05233 RT_EXPORT extern double nmg_eue_dist;
05234
05235
05236 RT_EXPORT BU_EXTERN(void rt_nurb_clean_cnurb,
05237 (struct edge_g_cnurb * crv));
05238
05239
05240 RT_EXPORT BU_EXTERN(int rt_nurb_knot_index,
05241 (const struct knot_vector *kv,
05242 fastf_t k_value,
05243 int order));
05244
05245
05246 RT_EXPORT BU_EXTERN(int nmg_uv_in_lu,
05247 (const fastf_t u,
05248 const fastf_t v,
05249 const struct loopuse *lu));
05250
05251
05252
05253 RT_EXPORT BU_EXTERN(int nmg_mesh_two_faces,
05254 (struct faceuse *fu1,
05255 struct faceuse *fu2,
05256 const struct bn_tol *tol));
05257
05258 RT_EXPORT BU_EXTERN(void nmg_radial_join_eu,
05259 (struct edgeuse *eu1,
05260 struct edgeuse *eu2,
05261 const struct bn_tol *tol));
05262 RT_EXPORT BU_EXTERN(void nmg_mesh_faces,
05263 (struct faceuse *fu1,
05264 struct faceuse *fu2,
05265 const struct bn_tol *tol));
05266 RT_EXPORT BU_EXTERN(int nmg_mesh_face_shell,
05267 (struct faceuse *fu1,
05268 struct shell *s,
05269 const struct bn_tol *tol));
05270 RT_EXPORT BU_EXTERN(int nmg_mesh_shell_shell,
05271 (struct shell *s1,
05272 struct shell *s2,
05273 const struct bn_tol *tol));
05274 RT_EXPORT BU_EXTERN(double nmg_measure_fu_angle,
05275 (const struct edgeuse *eu,
05276 const vect_t xvec,
05277 const vect_t yvec,
05278 const vect_t zvec));
05279
05280
05281 RT_EXPORT BU_EXTERN(struct nmgregion *nmg_do_bool,
05282 (struct nmgregion *s1,
05283 struct nmgregion *s2,
05284 const int oper, const struct bn_tol *tol));
05285 RT_EXPORT BU_EXTERN(void nmg_shell_coplanar_face_merge,
05286 (struct shell *s,
05287 const struct bn_tol *tol,
05288 const int simplify));
05289 RT_EXPORT BU_EXTERN(int nmg_two_region_vertex_fuse,
05290 (struct nmgregion *r1,
05291 struct nmgregion *r2,
05292 const struct bn_tol *tol));
05293 RT_EXPORT BU_EXTERN(union tree *nmg_booltree_leaf_tess,
05294 (struct db_tree_state *tsp,
05295 struct db_full_path *pathp,
05296 struct rt_db_internal *ip,
05297 genptr_t client_data));
05298 RT_EXPORT BU_EXTERN(union tree *nmg_booltree_leaf_tnurb,
05299 (struct db_tree_state *tsp,
05300 struct db_full_path *pathp,
05301 struct rt_db_internal *ip,
05302 genptr_t client_data));
05303 RT_EXPORT BU_EXTERN(union tree *nmg_booltree_evaluate,
05304 (union tree *tp,
05305 const struct bn_tol *tol,
05306 struct resource *resp));
05307 RT_EXPORT BU_EXTERN(int nmg_boolean,
05308 (union tree *tp,
05309 struct model *m,
05310 const struct bn_tol *tol,
05311 struct resource *resp));
05312
05313
05314 RT_EXPORT BU_EXTERN(void nmg_class_shells,
05315 (struct shell *sA,
05316 struct shell *sB,
05317 long *classlist[4],
05318 const struct bn_tol *tol));
05319
05320
05321
05322 RT_EXPORT BU_EXTERN(int nmg_ck_vu_ptbl,
05323 (struct bu_ptbl *p,
05324 struct faceuse *fu));
05325 RT_EXPORT BU_EXTERN(double nmg_vu_angle_measure,
05326 (struct vertexuse *vu,
05327 vect_t x_dir,
05328 vect_t y_dir,
05329 int assessment,
05330 int in));
05331 #if 0
05332 RT_EXPORT BU_EXTERN(int nmg_is_v_on_rs_list,
05333 (const struct nmg_ray_state *rs,
05334 const struct vertex *v));
05335 RT_EXPORT BU_EXTERN(int nmg_assess_eu,
05336 (struct edgeuse *eu,
05337 int forw,
05338 struct nmg_ray_state *rs,
05339 int pos));
05340 RT_EXPORT BU_EXTERN(int nmg_assess_vu,
05341 (struct nmg_ray_state *rs,
05342 int pos));
05343 RT_EXPORT BU_EXTERN(void nmg_pr_vu_stuff,
05344 (const struct nmg_vu_stuff *vs));
05345 #endif
05346 RT_EXPORT BU_EXTERN(int nmg_wedge_class,
05347 (int ass,
05348 double a,
05349 double b));
05350 #if 0
05351 RT_EXPORT BU_EXTERN(int nmg_face_coincident_vu_sort,
05352 (struct nmg_ray_state *rs,
05353 int start,
05354 int end));
05355 #endif
05356 RT_EXPORT BU_EXTERN(void nmg_sanitize_fu,
05357 (struct faceuse *fu));
05358 #if 0
05359 RT_EXPORT BU_EXTERN(void nmg_face_rs_init,
05360 (struct nmg_ray_state *rs,
05361 struct bu_ptbl *b,
05362 struct faceuse *fu1,
05363 struct faceuse *fu2,
05364 point_t pt,
05365 vect_t dir,
05366 struct edge_g_lseg *eg,
05367 const struct bn_tol *tol));
05368 RT_EXPORT BU_EXTERN(void nmg_edge_geom_isect_line,
05369 (struct edgeuse *eu,
05370 struct nmg_ray_state *rs,
05371 const char *reason));
05372 #endif
05373 RT_EXPORT BU_EXTERN(void nmg_unlist_v,
05374 (struct bu_ptbl *b,
05375 fastf_t *mag,
05376 struct vertex *v));
05377 #if 0
05378 RT_EXPORT BU_EXTERN(int mg_onon_fix,
05379 (struct nmg_ray_state *rs,
05380 struct bu_ptbl *b,
05381 struct bu_ptbl *ob,
05382 fastf_t *mag,
05383 fastf_t *omag));
05384 #endif
05385 RT_EXPORT BU_EXTERN(struct edge_g_lseg *nmg_face_cutjoin,
05386 (struct bu_ptbl *b1,
05387 struct bu_ptbl *b2,
05388 fastf_t *mag1,
05389 fastf_t *mag2,
05390 struct faceuse *fu1,
05391 struct faceuse *fu2,
05392 point_t pt,
05393 vect_t dir,
05394 struct edge_g_lseg *eg,
05395 const struct bn_tol *tol));
05396 RT_EXPORT BU_EXTERN(void nmg_fcut_face_2d,
05397 (struct bu_ptbl *vu_list,
05398 fastf_t *mag,
05399 struct faceuse *fu1,
05400 struct faceuse *fu2,
05401 struct bn_tol *tol));
05402 RT_EXPORT BU_EXTERN(int nmg_insert_vu_if_on_edge,
05403 (struct vertexuse *vu1,
05404 struct vertexuse *vu2,
05405 struct edgeuse *new_eu,
05406 struct bn_tol *tol));
05407
05408
05409 #define nmg_mev(_v, _u) nmg_me((_v), (struct vertex *)NULL, (_u))
05410
05411
05412 RT_EXPORT BU_EXTERN(void nmg_ck_lu_orientation,
05413 (struct loopuse *lu,
05414 const struct bn_tol *tolp));
05415 RT_EXPORT BU_EXTERN(const char *nmg_class_name,
05416 (int class_no));
05417 RT_EXPORT BU_EXTERN(void nmg_evaluate_boolean,
05418 (struct shell *sA,
05419 struct shell *sB,
05420 int op,
05421 long *classlist[8],
05422 const struct bn_tol *tol));
05423 #if 0
05424
05425
05426
05427
05428 #endif
05429
05430
05431
05432 RT_EXPORT BU_EXTERN(void nmg_rt_print_hitlist,
05433 (struct hitmiss *hl));
05434
05435 RT_EXPORT BU_EXTERN(void nmg_rt_print_hitmiss,
05436 (struct hitmiss *a_hit));
05437
05438 RT_EXPORT BU_EXTERN(int nmg_class_ray_vs_shell,
05439 (struct xray *rp,
05440 const struct shell *s,
05441 const int in_or_out_only,
05442 const struct bn_tol *tol));
05443
05444 RT_EXPORT BU_EXTERN(void nmg_isect_ray_model,
05445 (struct ray_data *rd));
05446
05447
05448 #if 0
05449
05450 RT_EXPORT BU_EXTERN(int nmg_ray_isect_segs,
05451 (struct soltab *stp,
05452 struct xray *rp,
05453 struct application *ap,
05454 struct seg *seghead,
05455 struct nmg_specific *nmg_spec));
05456 #endif
05457
05458
05459 RT_EXPORT BU_EXTERN(void nmg_vvg,
05460 (const struct vertex_g *vg));
05461 RT_EXPORT BU_EXTERN(void nmg_vvertex,
05462 (const struct vertex *v,
05463 const struct vertexuse *vup));
05464 RT_EXPORT BU_EXTERN(void nmg_vvua,
05465 (const long *vua));
05466 RT_EXPORT BU_EXTERN(void nmg_vvu,
05467 (const struct vertexuse *vu,
05468 const long *up_magic_p));
05469 RT_EXPORT BU_EXTERN(void nmg_veg,
05470 (const long *eg));
05471 RT_EXPORT BU_EXTERN(void nmg_vedge,
05472 (const struct edge *e,
05473 const struct edgeuse *eup));
05474 RT_EXPORT BU_EXTERN(void nmg_veu,
05475 (const struct bu_list *hp,
05476 const long *up_magic_p));
05477 RT_EXPORT BU_EXTERN(void nmg_vlg,
05478 (const struct loop_g *lg));
05479 RT_EXPORT BU_EXTERN(void nmg_vloop,
05480 (const struct loop *l,
05481 const struct loopuse *lup));
05482 RT_EXPORT BU_EXTERN(void nmg_vlu,
05483 (const struct bu_list *hp,
05484 const long *up));
05485 RT_EXPORT BU_EXTERN(void nmg_vfg,
05486 (const struct face_g_plane *fg));
05487 RT_EXPORT BU_EXTERN(void nmg_vface,
05488 (const struct face *f,
05489 const struct faceuse *fup));
05490 RT_EXPORT BU_EXTERN(void nmg_vfu,
05491 (const struct bu_list *hp,
05492 const struct shell *s));
05493 RT_EXPORT BU_EXTERN(void nmg_vshell,
05494 (const struct bu_list *hp,
05495 const struct nmgregion *r));
05496 RT_EXPORT BU_EXTERN(void nmg_vregion,
05497 (const struct bu_list *hp,
05498 const struct model *m));
05499 RT_EXPORT BU_EXTERN(void nmg_vmodel,
05500 (const struct model *m));
05501
05502
05503 RT_EXPORT BU_EXTERN(void nmg_ck_e,
05504 (const struct edgeuse *eu,
05505 const struct edge *e,
05506 const char *str));
05507 RT_EXPORT BU_EXTERN(void nmg_ck_vu,
05508 (const long *parent,
05509 const struct vertexuse *vu,
05510 const char *str));
05511 RT_EXPORT BU_EXTERN(void nmg_ck_eu,
05512 (const long *parent,
05513 const struct edgeuse *eu,
05514 const char *str));
05515 RT_EXPORT BU_EXTERN(void nmg_ck_lg,
05516 (const struct loop *l,
05517 const struct loop_g *lg,
05518 const char *str));
05519 RT_EXPORT BU_EXTERN(void nmg_ck_l,
05520 (const struct loopuse *lu,
05521 const struct loop *l,
05522 const char *str));
05523 RT_EXPORT BU_EXTERN(void nmg_ck_lu,
05524 (const long *parent,
05525 const struct loopuse *lu,
05526 const char *str));
05527 RT_EXPORT BU_EXTERN(void nmg_ck_fg,
05528 (const struct face *f,
05529 const struct face_g_plane *fg,
05530 const char *str));
05531 RT_EXPORT BU_EXTERN(void nmg_ck_f,
05532 (const struct faceuse *fu,
05533 const struct face *f,
05534 const char *str));
05535 RT_EXPORT BU_EXTERN(void nmg_ck_fu,
05536 (const struct shell *s,
05537 const struct faceuse *fu,
05538 const char *str));
05539 RT_EXPORT BU_EXTERN(int nmg_ck_eg_verts,
05540 (const struct edge_g_lseg *eg,
05541 const struct bn_tol *tol));
05542 RT_EXPORT BU_EXTERN(int nmg_ck_geometry,
05543 (const struct model *m,
05544 const struct bn_tol *tol));
05545 RT_EXPORT BU_EXTERN(int nmg_ck_face_worthless_edges,
05546 (const struct faceuse *fu));
05547 RT_EXPORT BU_EXTERN(void nmg_ck_lueu,
05548 (const struct loopuse *lu, const char *s));
05549 RT_EXPORT BU_EXTERN(int nmg_check_radial,
05550 (const struct edgeuse *eu, const struct bn_tol *tol));
05551 RT_EXPORT BU_EXTERN(int nmg_eu_2s_orient_bad,
05552 (const struct edgeuse *eu,
05553 const struct shell *s1,
05554 const struct shell *s2,
05555 const struct bn_tol *tol));
05556 RT_EXPORT BU_EXTERN(int nmg_ck_closed_surf,
05557 (const struct shell *s,
05558 const struct bn_tol *tol));
05559 RT_EXPORT BU_EXTERN(int nmg_ck_closed_region,
05560 (const struct nmgregion *r,
05561 const struct bn_tol *tol));
05562 RT_EXPORT BU_EXTERN(void nmg_ck_v_in_2fus,
05563 (const struct vertex *vp,
05564 const struct faceuse *fu1,
05565 const struct faceuse *fu2,
05566 const struct bn_tol *tol));
05567 RT_EXPORT BU_EXTERN(void nmg_ck_vs_in_region,
05568 (const struct nmgregion *r,
05569 const struct bn_tol *tol));
05570
05571
05572
05573 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_make_dualvu,
05574 (struct vertex *v,
05575 struct faceuse *fu,
05576 const struct bn_tol *tol));
05577 RT_EXPORT BU_EXTERN(struct vertexuse *nmg_enlist_vu,
05578 (struct nmg_inter_struct *is,
05579 const struct vertexuse *vu,
05580 struct vertexuse *dualvu,
05581 fastf_t dist));
05582 RT_EXPORT BU_EXTERN(void nmg_isect2d_prep,
05583 (struct nmg_inter_struct *is,
05584 const long *assoc_use));
05585 RT_EXPORT BU_EXTERN(void nmg_isect2d_cleanup,
05586 (struct nmg_inter_struct *is));
05587 RT_EXPORT BU_EXTERN(void nmg_isect2d_final_cleanup,
05588 ());
05589 RT_EXPORT BU_EXTERN(void nmg_isect_vert2p_face2p,
05590 (struct nmg_inter_struct *is,
05591 struct vertexuse *vu1,
05592 struct faceuse *fu2));
05593 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_break_eu_on_v,
05594 (struct edgeuse *eu1,
05595 struct vertex *v2,
05596 struct faceuse *fu,
05597 struct nmg_inter_struct *is));
05598 RT_EXPORT BU_EXTERN(void nmg_break_eg_on_v,
05599 (const struct edge_g_lseg *eg,
05600 struct vertex *v,
05601 const struct bn_tol *tol));
05602 RT_EXPORT BU_EXTERN(int nmg_isect_2colinear_edge2p,
05603 (struct edgeuse *eu1,
05604 struct edgeuse *eu2,
05605 struct faceuse *fu,
05606 struct nmg_inter_struct *is,
05607 struct bu_ptbl *l1,
05608 struct bu_ptbl *l2));
05609 RT_EXPORT BU_EXTERN(int nmg_isect_edge2p_edge2p,
05610 (struct nmg_inter_struct *is,
05611 struct edgeuse *eu1,
05612 struct edgeuse *eu2,
05613 struct faceuse *fu1,
05614 struct faceuse *fu2));
05615 RT_EXPORT BU_EXTERN(int nmg_isect_construct_nice_ray,
05616 (struct nmg_inter_struct *is,
05617 struct faceuse *fu2));
05618 RT_EXPORT BU_EXTERN(void nmg_enlist_one_vu,
05619 (struct nmg_inter_struct *is,
05620 const struct vertexuse *vu,
05621 fastf_t dist));
05622 RT_EXPORT BU_EXTERN(int nmg_isect_line2_edge2p,
05623 (struct nmg_inter_struct *is,
05624 struct bu_ptbl *list,
05625 struct edgeuse *eu1,
05626 struct faceuse *fu1,
05627 struct faceuse *fu2));
05628 RT_EXPORT BU_EXTERN(void nmg_isect_line2_vertex2,
05629 (struct nmg_inter_struct *is,
05630 struct vertexuse *vu1,
05631 struct faceuse *fu1));
05632 RT_EXPORT BU_EXTERN(int nmg_isect_two_ptbls,
05633 (struct nmg_inter_struct *is,
05634 const struct bu_ptbl *t1,
05635 const struct bu_ptbl *t2));
05636 RT_EXPORT BU_EXTERN(struct edge_g_lseg *nmg_find_eg_on_line,
05637 (const long *magic_p,
05638 const point_t pt,
05639 const vect_t dir,
05640 const struct bn_tol *tol));
05641 RT_EXPORT BU_EXTERN(int nmg_k0eu,
05642 (struct vertex *v));
05643 RT_EXPORT BU_EXTERN(struct vertex *nmg_repair_v_near_v,
05644 (struct vertex *hit_v,
05645 struct vertex *v,
05646 const struct edge_g_lseg *eg1,
05647 const struct edge_g_lseg *eg2,
05648 int bomb,
05649 const struct bn_tol *tol));
05650 RT_EXPORT BU_EXTERN(struct vertex *nmg_search_v_eg,
05651 (const struct edgeuse *eu,
05652 int second,
05653 const struct edge_g_lseg *eg1,
05654 const struct edge_g_lseg *eg2,
05655 struct vertex *hit_v,
05656 const struct bn_tol *tol));
05657 RT_EXPORT BU_EXTERN(struct vertex *nmg_common_v_2eg,
05658 (struct edge_g_lseg *eg1,
05659 struct edge_g_lseg *eg2,
05660 const struct bn_tol *tol));
05661 RT_EXPORT BU_EXTERN(int nmg_is_vertex_on_inter,
05662 (struct vertex *v,
05663 struct faceuse *fu1,
05664 struct faceuse *fu2,
05665 struct nmg_inter_struct *is));
05666 RT_EXPORT BU_EXTERN(void nmg_isect_eu_verts,
05667 (struct edgeuse *eu,
05668 struct vertex_g *vg1,
05669 struct vertex_g *vg2,
05670 struct bu_ptbl *verts,
05671 struct bu_ptbl *inters,
05672 const struct bn_tol *tol));
05673 RT_EXPORT BU_EXTERN(void nmg_isect_eu_eu,
05674 (struct edgeuse *eu1,
05675 struct vertex_g *vg1a,
05676 struct vertex_g *vg1b,
05677 vect_t dir1,
05678 struct edgeuse *eu2,
05679 struct bu_ptbl *verts,
05680 struct bu_ptbl *inters,
05681 const struct bn_tol *tol));
05682 RT_EXPORT BU_EXTERN(void nmg_isect_eu_fu,
05683 (struct nmg_inter_struct *is,
05684 struct bu_ptbl *verts,
05685 struct edgeuse *eu,
05686 struct faceuse *fu));
05687 RT_EXPORT BU_EXTERN(void nmg_isect_fu_jra,
05688 (struct nmg_inter_struct *is,
05689 struct faceuse *fu1,
05690 struct faceuse *fu2,
05691 struct bu_ptbl *eu1_list,
05692 struct bu_ptbl *eu2_list));
05693 RT_EXPORT BU_EXTERN(void nmg_isect_line2_face2pNEW,
05694 (struct nmg_inter_struct *is,
05695 struct faceuse *fu1, struct faceuse *fu2,
05696 struct bu_ptbl *eu1_list,
05697 struct bu_ptbl *eu2_list));
05698 RT_EXPORT BU_EXTERN(int nmg_is_eu_on_line3,
05699 (const struct edgeuse *eu,
05700 const point_t pt,
05701 const vect_t dir,
05702 const struct bn_tol *tol));
05703 RT_EXPORT BU_EXTERN(struct edge_g_lseg *nmg_find_eg_between_2fg,
05704 (const struct faceuse *ofu1,
05705 const struct faceuse *fu2,
05706 const struct bn_tol *tol));
05707 RT_EXPORT BU_EXTERN(struct edgeuse *nmg_does_fu_use_eg,
05708 (const struct faceuse *fu1,
05709 const long *eg));
05710 RT_EXPORT BU_EXTERN(int rt_line_on_plane,
05711 (const point_t pt,
05712 const vect_t dir,
05713 const plane_t plane,
05714 const struct bn_tol *tol));
05715 RT_EXPORT BU_EXTERN(void nmg_cut_lu_into_coplanar_and_non,
05716 (struct loopuse *lu,
05717 plane_t pl,
05718 struct nmg_inter_struct *is));
05719 RT_EXPORT BU_EXTERN(void nmg_check_radial_angles,
05720 (char *str,
05721 struct shell *s,
05722 const struct bn_tol *tol));
05723 RT_EXPORT BU_EXTERN(int nmg_faces_can_be_intersected,
05724 (struct nmg_inter_struct *bs,
05725 const struct faceuse *fu1,
05726 const struct faceuse *fu2,
05727 const struct bn_tol *tol));
05728 RT_EXPORT BU_EXTERN(void nmg_isect_two_generic_faces,
05729 (struct faceuse *fu1,
05730 struct faceuse *fu2,
05731 const struct bn_tol *tol));
05732 RT_EXPORT BU_EXTERN(void nmg_crackshells,
05733 (struct shell *s1,
05734 struct shell *s2,
05735 const struct bn_tol *tol));
05736 RT_EXPORT BU_EXTERN(int nmg_fu_touchingloops,
05737 (const struct faceuse *fu));
05738
05739
05740
05741 RT_EXPORT BU_EXTERN(int nmg_index_of_struct,
05742 (const long *p));
05743 RT_EXPORT BU_EXTERN(void nmg_m_set_high_bit,
05744 (struct model *m));
05745 RT_EXPORT BU_EXTERN(void nmg_m_reindex,
05746 (struct model *m, long newindex));
05747 RT_EXPORT BU_EXTERN(void nmg_vls_struct_counts,
05748 (struct bu_vls *str,
05749 const struct nmg_struct_counts *ctr));
05750 RT_EXPORT BU_EXTERN(void nmg_pr_struct_counts,
05751 (const struct nmg_struct_counts *ctr,
05752 const char *str));
05753 RT_EXPORT BU_EXTERN(long **nmg_m_struct_count,
05754 (struct nmg_struct_counts *ctr,
05755 const struct model *m));
05756 RT_EXPORT BU_EXTERN(void nmg_struct_counts,
05757 (const struct model *m,
05758 const char *str));
05759 RT_EXPORT BU_EXTERN(void nmg_merge_models,
05760 (struct model *m1,
05761 struct model *m2));
05762 RT_EXPORT BU_EXTERN(long nmg_find_max_index,
05763 (const struct model *m));
05764
05765
05766
05767
05768 RT_EXPORT BU_EXTERN(void rt_dspline_matrix,
05769 (mat_t m,const char *type,
05770 const double tension,
05771 const double bias));
05772 RT_EXPORT BU_EXTERN(double rt_dspline4,
05773 (mat_t m,
05774 double a,
05775 double b,
05776 double c,
05777 double d,
05778 double alpha));
05779 RT_EXPORT BU_EXTERN(void rt_dspline4v,
05780 (double *pt,
05781 const mat_t m,
05782 const double *a,
05783 const double *b,
05784 const double *c,
05785 const double *d,
05786 const int depth,
05787 const double alpha));
05788 RT_EXPORT BU_EXTERN(void rt_dspline_n,
05789 (double *r,
05790 const mat_t m,
05791 const double *knots,
05792 const int n,
05793 const int depth,
05794 const double alpha));
05795
05796
05797 RT_EXPORT BU_EXTERN(int rt_nurb_bezier,
05798 (struct bu_list *bezier_hd,
05799 const struct face_g_snurb *orig_surf,
05800 struct resource *res));
05801 RT_EXPORT BU_EXTERN(int rt_bez_check,
05802 (const struct face_g_snurb * srf));
05803 RT_EXPORT BU_EXTERN(int nurb_crv_is_bezier,
05804 (const struct edge_g_cnurb *crv));
05805 RT_EXPORT BU_EXTERN(void nurb_c_to_bezier,
05806 (struct bu_list *clist,
05807 struct edge_g_cnurb *crv));
05808
05809
05810 RT_EXPORT BU_EXTERN(struct face_g_snurb *rt_nurb_scopy,
05811 (const struct face_g_snurb * srf,
05812 struct resource *res));
05813 RT_EXPORT BU_EXTERN(struct edge_g_cnurb *rt_nurb_crv_copy,
05814 (const struct edge_g_cnurb * crv));
05815
05816
05817 RT_EXPORT BU_EXTERN(int nmg_is_common_bigloop,
05818 (const struct face *f1,
05819 const struct face *f2));
05820 RT_EXPORT BU_EXTERN(void nmg_region_v_unique,
05821 (struct nmgregion *r1,
05822 const struct bn_tol *tol));
05823 RT_EXPORT BU_EXTERN(int nmg_ptbl_vfuse,
05824 (struct bu_ptbl *t,
05825 const struct bn_tol *tol));
05826 RT_EXPORT BU_EXTERN(int nmg_region_both_vfuse,
05827 (struct bu_ptbl *t1,
05828 struct bu_ptbl *t2,
05829 const struct bn_tol *tol));
05830
05831 RT_EXPORT BU_EXTERN(int nmg_model_vertex_fuse,
05832 (struct model *m,
05833 const struct bn_tol *tol));
05834 RT_EXPORT BU_EXTERN(int nmg_cnurb_is_linear,
05835 (const struct edge_g_cnurb *cnrb));
05836 RT_EXPORT BU_EXTERN(int nmg_snurb_is_planar,
05837 (const struct face_g_snurb *srf,
05838 const struct bn_tol *tol));
05839 RT_EXPORT BU_EXTERN(void nmg_eval_linear_trim_curve,
05840 (const struct face_g_snurb *snrb,
05841 const fastf_t uvw[3],
05842 point_t xyz));
05843 RT_EXPORT BU_EXTERN(void nmg_eval_trim_curve,
05844 (const struct edge_g_cnurb *cnrb,
05845 const struct face_g_snurb *snrb,
05846 const fastf_t t, point_t xyz));
05847
05848 RT_EXPORT BU_EXTERN(void nmg_eval_trim_to_tol,
05849 (const struct edge_g_cnurb *cnrb,
05850 const struct face_g_snurb *snrb,
05851 const fastf_t t0,
05852 const fastf_t t1,
05853 struct bu_list *head,
05854 const struct bn_tol *tol));
05855
05856 RT_EXPORT BU_EXTERN(void nmg_eval_linear_trim_to_tol,
05857 (const struct edge_g_cnurb *cnrb,
05858 const struct face_g_snurb *snrb,
05859 const fastf_t uvw1[3],
05860 const fastf_t uvw2[3],
05861 struct bu_list *head,
05862 const struct bn_tol *tol));
05863 RT_EXPORT BU_EXTERN(int nmg_cnurb_lseg_coincident,
05864 (const struct edgeuse *eu1,
05865 const struct edge_g_cnurb *cnrb,
05866 const struct face_g_snurb *snrb,
05867 const point_t pt1,
05868 const point_t pt2,
05869 const struct bn_tol *tol));
05870 RT_EXPORT BU_EXTERN(int nmg_cnurb_is_on_crv,
05871 (const struct edgeuse *eu,
05872 const struct edge_g_cnurb *cnrb,
05873 const struct face_g_snurb *snrb,
05874 const struct bu_list *head,
05875 const struct bn_tol *tol));
05876 RT_EXPORT BU_EXTERN(int nmg_model_edge_fuse,
05877 (struct model *m,
05878 const struct bn_tol *tol));
05879 RT_EXPORT BU_EXTERN(int nmg_model_edge_g_fuse,
05880 (struct model *m,
05881 const struct bn_tol *tol));
05882 RT_EXPORT BU_EXTERN(int nmg_ck_fu_verts,
05883 (struct faceuse *fu1,
05884 struct face *f2,
05885 const struct bn_tol *tol));
05886 RT_EXPORT BU_EXTERN(int nmg_ck_fg_verts,
05887 (struct faceuse *fu1,
05888 struct face *f2,
05889 const struct bn_tol *tol));
05890 RT_EXPORT BU_EXTERN(int nmg_two_face_fuse,
05891 (struct face *f1,
05892 struct face *f2,
05893 const struct bn_tol *tol));
05894 RT_EXPORT BU_EXTERN(int nmg_model_face_fuse,
05895 (struct model *m,
05896 const struct bn_tol *tol));
05897 RT_EXPORT BU_EXTERN(int nmg_break_all_es_on_v,
05898 (long *magic_p,
05899 struct vertex *v,
05900 const struct bn_tol *tol));
05901 RT_EXPORT BU_EXTERN(int nmg_model_break_e_on_v,
05902 (struct model *m,
05903 const struct bn_tol *tol));
05904 RT_EXPORT BU_EXTERN(int nmg_model_fuse,
05905 (struct model *m,
05906 const struct bn_tol *tol));
05907
05908
05909 RT_EXPORT BU_EXTERN(void nmg_radial_sorted_list_insert,
05910 (struct bu_list *hd,
05911 struct nmg_radial *rad));
05912 RT_EXPORT BU_EXTERN(void nmg_radial_verify_pointers,
05913 (const struct bu_list *hd,
05914 const struct bn_tol *tol));
05915 RT_EXPORT BU_EXTERN(void nmg_radial_verify_monotone,
05916 (const struct bu_list *hd,
05917 const struct bn_tol *tol));
05918 RT_EXPORT BU_EXTERN(void nmg_insure_radial_list_is_increasing,
05919 (struct bu_list *hd,
05920 fastf_t amin, fastf_t amax));
05921 RT_EXPORT BU_EXTERN(void nmg_radial_build_list,
05922 (struct bu_list *hd,
05923 struct bu_ptbl *shell_tbl,
05924 int existing,
05925 struct edgeuse *eu,
05926 const vect_t xvec,
05927 const vect_t yvec,
05928 const vect_t zvec,
05929 const struct bn_tol *tol));
05930 RT_EXPORT BU_EXTERN(void nmg_radial_merge_lists,
05931 (struct bu_list *dest,
05932 struct bu_list *src,
05933 const struct bn_tol *tol));
05934 RT_EXPORT BU_EXTERN(int nmg_is_crack_outie,
05935 (const struct edgeuse *eu,
05936 const struct bn_tol *tol));
05937 RT_EXPORT BU_EXTERN(struct nmg_radial *nmg_find_radial_eu,
05938 (const struct bu_list *hd,
05939 const struct edgeuse *eu));
05940 RT_EXPORT BU_EXTERN(const struct edgeuse *nmg_find_next_use_of_2e_in_lu,
05941 (const struct edgeuse *eu,
05942 const struct edge *e1,
05943 const struct edge *e2));
05944 RT_EXPORT BU_EXTERN(void nmg_radial_mark_cracks,
05945 (struct bu_list *hd,
05946 const struct edge *e1,
05947 const struct edge *e2,
05948 const struct bn_tol *tol));
05949 RT_EXPORT BU_EXTERN(struct nmg_radial *nmg_radial_find_an_original,
05950 (const struct bu_list *hd,
05951 const struct shell *s,
05952 const struct bn_tol *tol));
05953 RT_EXPORT BU_EXTERN(int nmg_radial_mark_flips,
05954 (struct bu_list *hd,
05955 const struct shell *s,
05956 const struct bn_tol *tol));
05957 RT_EXPORT BU_EXTERN(int nmg_radial_check_parity,
05958 (const struct bu_list *hd,
05959 const struct bu_ptbl *shells,
05960 const struct bn_tol *tol));
05961 RT_EXPORT BU_EXTERN(void nmg_radial_implement_decisions,
05962 (struct bu_list *hd,
05963 const struct bn_tol *tol,
05964 struct edgeuse *eu1,
05965 vect_t xvec,
05966 vect_t yvec,
05967 vect_t zvec));
05968 RT_EXPORT BU_EXTERN(void nmg_pr_radial,
05969 (const char *title,
05970 const struct nmg_radial *rad));
05971 RT_EXPORT BU_EXTERN(void nmg_pr_radial_list,
05972 (const struct bu_list *hd,
05973 const struct bn_tol *tol));
05974 RT_EXPORT BU_EXTERN(void nmg_do_radial_flips,
05975 (struct bu_list *hd));
05976 RT_EXPORT BU_EXTERN(void nmg_do_radial_join,
05977 (struct bu_list *hd,
05978 struct edgeuse *eu1ref,
05979 vect_t xvec, vect_t yvec, vect_t zvec,
05980 const struct bn_tol *tol));
05981 RT_EXPORT BU_EXTERN(void nmg_radial_join_eu_NEW,
05982 (struct edgeuse *eu1,
05983 struct edgeuse *eu2,
05984 const struct bn_tol *tol));
05985 RT_EXPORT BU_EXTERN(void nmg_radial_exchange_marked,
05986 (struct bu_list *hd,
05987 const struct bn_tol *tol));
05988 RT_EXPORT BU_EXTERN(void nmg_s_radial_harmonize,
05989 (struct shell *s,
05990 const struct bn_tol *tol));
05991 RT_EXPORT BU_EXTERN(int nmg_eu_radial_check,
05992 (const struct edgeuse *eu,
05993 const struct shell *s,
05994 const struct bn_tol *tol));
05995 RT_EXPORT BU_EXTERN(void nmg_s_radial_check,
05996 (struct shell *s,
05997 const struct bn_tol *tol));
05998 RT_EXPORT BU_EXTERN(void nmg_r_radial_check,
05999 (const struct nmgregion *r,
06000 const struct bn_tol *tol));
06001
06002
06003 RT_EXPORT BU_EXTERN(struct edge_g_lseg *nmg_pick_best_edge_g,
06004 (struct edgeuse *eu1,
06005 struct edgeuse *eu2,
06006 const struct bn_tol *tol));
06007
06008
06009 RT_EXPORT BU_EXTERN(void nmg_visit_vertex,
06010 (struct vertex *v,
06011 const struct nmg_visit_handlers *htab,
06012 genptr_t state));
06013 RT_EXPORT BU_EXTERN(void nmg_visit_vertexuse,
06014 (struct vertexuse *vu,
06015 const struct nmg_visit_handlers *htab,
06016 genptr_t state));
06017 RT_EXPORT BU_EXTERN(void nmg_visit_edge,
06018 (struct edge *e,
06019 const struct nmg_visit_handlers *htab,
06020 genptr_t state));
06021 RT_EXPORT BU_EXTERN(void nmg_visit_edgeuse,
06022 (struct edgeuse *eu,
06023 const struct nmg_visit_handlers *htab,
06024 genptr_t state));
06025 RT_EXPORT BU_EXTERN(void nmg_visit_loop,
06026 (struct loop *l,
06027 const struct nmg_visit_handlers *htab,
06028 genptr_t state));
06029 RT_EXPORT BU_EXTERN(void nmg_visit_loopuse,
06030 (struct loopuse *lu,
06031 const struct nmg_visit_handlers *htab,
06032 genptr_t state));
06033 RT_EXPORT BU_EXTERN(void nmg_visit_face,
06034 (struct face *f,
06035 const struct nmg_visit_handlers *htab,
06036 genptr_t state));
06037 RT_EXPORT BU_EXTERN(void nmg_visit_faceuse,
06038 (struct faceuse *fu,
06039 const struct nmg_visit_handlers *htab,
06040 genptr_t state));
06041 RT_EXPORT BU_EXTERN(void nmg_visit_shell,
06042 (struct shell *s,
06043 const struct nmg_visit_handlers *htab,
06044 genptr_t state));
06045 RT_EXPORT BU_EXTERN(void nmg_visit_region,
06046 (struct nmgregion *r,
06047 const struct nmg_visit_handlers *htab,
06048 genptr_t state));
06049 RT_EXPORT BU_EXTERN(void nmg_visit_model,
06050 (struct model *model,
06051 const struct nmg_visit_handlers *htab,
06052 genptr_t state));
06053 RT_EXPORT BU_EXTERN(void nmg_visit,
06054 (const long *magicp,
06055 const struct nmg_visit_handlers *htab,
06056 genptr_t state));
06057
06058
06059 RT_EXPORT BU_EXTERN(int db5_type_tag_from_major,
06060 (char **tag,
06061 const int major));
06062
06063 RT_EXPORT BU_EXTERN(int db5_type_descrip_from_major,
06064 (char **descrip,
06065 const int major));
06066
06067 RT_EXPORT BU_EXTERN(int db5_type_tag_from_codes,
06068 (char **tag,
06069 const int major,
06070 const int minor));
06071
06072 RT_EXPORT BU_EXTERN(int db5_type_descrip_from_codes,
06073 (char **descrip,
06074 const int major,
06075 const int minor));
06076
06077 RT_EXPORT BU_EXTERN(int db5_type_codes_from_tag,
06078 (int *major,
06079 int *minor,
06080 const char *tag));
06081
06082 RT_EXPORT BU_EXTERN(int db5_type_codes_from_descrip,
06083 (int *major,
06084 int *minor,
06085 const char *descrip));
06086
06087 RT_EXPORT BU_EXTERN(size_t db5_type_sizeof_h_binu,
06088 (const int minor));
06089
06090 RT_EXPORT BU_EXTERN(size_t db5_type_sizeof_n_binu,
06091 (const int minor));
06092
06093 #endif
06094
06095
06096 RT_EXPORT BU_EXTERN(int wdb_create_cmd,
06097 (Tcl_Interp *interp,
06098 struct rt_wdb *wdbp,
06099 const char *oname));
06100 RT_EXPORT BU_EXTERN(void wdb_deleteProc,
06101 (ClientData clientData));
06102 RT_EXPORT BU_EXTERN(int wdb_get_tcl,
06103 (ClientData clientData,
06104 Tcl_Interp *interp,
06105 int argc, char **argv));
06106 RT_EXPORT BU_EXTERN(int dgo_cmd,
06107 (ClientData clientData,
06108 Tcl_Interp *interp,
06109 int argc,
06110 char **argv));
06111 RT_EXPORT BU_EXTERN(int wdb_init_obj,
06112 (Tcl_Interp *interp,
06113 struct rt_wdb *wdbp,
06114 const char *oname));
06115 RT_EXPORT BU_EXTERN(struct db_i *wdb_prep_dbip,
06116 (Tcl_Interp *interp,
06117 const char *filename));
06118 RT_EXPORT BU_EXTERN(int wdb_bot_face_sort_cmd,
06119 (struct rt_wdb *wdbp,
06120 Tcl_Interp *interp,
06121 int argc, char **argv));
06122 RT_EXPORT BU_EXTERN(int wdb_bot_decimate_cmd,
06123 (struct rt_wdb *wdbp,
06124 Tcl_Interp *interp,
06125 int argc,
06126 char **argv));
06127 RT_EXPORT BU_EXTERN(int wdb_close_cmd,
06128 (struct rt_wdb *wdbp,
06129 Tcl_Interp *interp,
06130 int argc,
06131 char **argv));
06132 RT_EXPORT BU_EXTERN(int wdb_reopen_cmd,
06133 (struct rt_wdb *wdbp,
06134 Tcl_Interp *interp,
06135 int argc,
06136 char **argv));
06137 RT_EXPORT BU_EXTERN(int wdb_match_cmd,
06138 (struct rt_wdb *wdbp,
06139 Tcl_Interp *interp,
06140 int argc,
06141 char **argv));
06142 RT_EXPORT BU_EXTERN(int wdb_get_cmd,
06143 (struct rt_wdb *wdbp,
06144 Tcl_Interp *interp,
06145 int argc,
06146 char **argv));
06147 RT_EXPORT BU_EXTERN(int wdb_put_cmd,
06148 (struct rt_wdb *wdbp,
06149 Tcl_Interp *interp,
06150 int argc,
06151 char **argv));
06152 RT_EXPORT BU_EXTERN(int wdb_adjust_cmd,
06153 (struct rt_wdb *wdbp,
06154 Tcl_Interp *interp,
06155 int argc,
06156 char **argv));
06157 RT_EXPORT BU_EXTERN(int wdb_form_cmd,
06158 (struct rt_wdb *wdbp,
06159 Tcl_Interp *interp,
06160 int argc,
06161 char **argv));
06162 RT_EXPORT BU_EXTERN(int wdb_tops_cmd,
06163 (struct rt_wdb *wdbp,
06164 Tcl_Interp *interp,
06165 int argc,
06166 char **argv));
06167 RT_EXPORT BU_EXTERN(int wdb_rt_gettrees_cmd,
06168 (struct rt_wdb *wdbp,
06169 Tcl_Interp *interp,
06170 int argc,
06171 char **argv));
06172 RT_EXPORT BU_EXTERN(int wdb_dump_cmd,
06173 (struct rt_wdb *wdbp,
06174 Tcl_Interp *interp,
06175 int argc,
06176 char **argv));
06177 RT_EXPORT BU_EXTERN(int wdb_dbip_cmd,
06178 (struct rt_wdb *wdbp,
06179 Tcl_Interp *interp,
06180 int argc,
06181 char **argv));
06182 RT_EXPORT BU_EXTERN(int wdb_ls_cmd,
06183 (struct rt_wdb *wdbp,
06184 Tcl_Interp *interp,
06185 int argc,
06186 char **argv));
06187 RT_EXPORT BU_EXTERN(int wdb_list_cmd,
06188 (struct rt_wdb *wdbp,
06189 Tcl_Interp *interp,
06190 int argc,
06191 char **argv));
06192 RT_EXPORT BU_EXTERN(int wdb_lt_cmd,
06193 (struct rt_wdb *wdbp,
06194 Tcl_Interp *interp,
06195 int argc,
06196 char **argv));
06197 RT_EXPORT BU_EXTERN(int wdb_pathlist_cmd,
06198 (struct rt_wdb *wdbp,
06199 Tcl_Interp *interp,
06200 int argc,
06201 char **argv));
06202 RT_EXPORT BU_EXTERN(int wdb_pathsum_cmd,
06203 (struct rt_wdb *wdbp,
06204 Tcl_Interp *interp,
06205 int argc,
06206 char **argv));
06207 RT_EXPORT BU_EXTERN(int wdb_expand_cmd,
06208 (struct rt_wdb *wdbp,
06209 Tcl_Interp *interp,
06210 int argc,
06211 char **argv));
06212 RT_EXPORT BU_EXTERN(int wdb_kill_cmd,
06213 (struct rt_wdb *wdbp,
06214 Tcl_Interp *interp,
06215 int argc,
06216 char **argv));
06217 RT_EXPORT BU_EXTERN(int wdb_killall_cmd,
06218 (struct rt_wdb *wdbp,
06219 Tcl_Interp *interp,
06220 int argc,
06221 char **argv));
06222 RT_EXPORT BU_EXTERN(int wdb_killtree_cmd,
06223 (struct rt_wdb *wdbp,
06224 Tcl_Interp *interp,
06225 int argc,
06226 char **argv));
06227 RT_EXPORT BU_EXTERN(int wdb_copy_cmd,
06228 (struct rt_wdb *wdbp,
06229 Tcl_Interp *interp,
06230 int argc,
06231 char **argv));
06232 RT_EXPORT BU_EXTERN(int wdb_move_cmd,
06233 (struct rt_wdb *wdbp,
06234 Tcl_Interp *interp,
06235 int argc,
06236 char **argv));
06237 RT_EXPORT BU_EXTERN(int wdb_move_all_cmd,
06238 (struct rt_wdb *wdbp,
06239 Tcl_Interp *interp,
06240 int argc,
06241 char **argv));
06242 RT_EXPORT BU_EXTERN(int wdb_concat_cmd,
06243 (struct rt_wdb *wdbp,
06244 Tcl_Interp *interp,
06245 int argc,
06246 char **argv));
06247 RT_EXPORT BU_EXTERN(int wdb_dup_cmd,
06248 (struct rt_wdb *wdbp,
06249 Tcl_Interp *interp,
06250 int argc,
06251 char **argv));
06252 RT_EXPORT BU_EXTERN(int wdb_group_cmd,
06253 (struct rt_wdb *wdbp,
06254 Tcl_Interp *interp,
06255 int argc,
06256 char **argv));
06257 RT_EXPORT BU_EXTERN(int wdb_remove_cmd,
06258 (struct rt_wdb *wdbp,
06259 Tcl_Interp *interp,
06260 int argc,
06261 char **argv));
06262 RT_EXPORT BU_EXTERN(int wdb_region_cmd,
06263 (struct rt_wdb *wdbp,
06264 Tcl_Interp *interp,
06265 int argc,
06266 char **argv));
06267 RT_EXPORT BU_EXTERN(int wdb_comb_cmd,
06268 (struct rt_wdb *wdbp,
06269 Tcl_Interp *interp,
06270 int argc,
06271 char **argv));
06272 RT_EXPORT BU_EXTERN(int wdb_find_cmd,
06273 (struct rt_wdb *wdbp,
06274 Tcl_Interp *interp,
06275 int argc,
06276 char **argv));
06277 RT_EXPORT BU_EXTERN(int wdb_which_cmd,
06278 (struct rt_wdb *wdbp,
06279 Tcl_Interp *interp,
06280 int argc,
06281 char **argv));
06282 RT_EXPORT BU_EXTERN(int wdb_title_cmd,
06283 (struct rt_wdb *wdbp,
06284 Tcl_Interp *interp,
06285 int argc,
06286 char **argv));
06287 RT_EXPORT BU_EXTERN(int wdb_tree_cmd,
06288 (struct rt_wdb *wdbp,
06289 Tcl_Interp *interp,
06290 int argc,
06291 char **argv));
06292 RT_EXPORT BU_EXTERN(int wdb_color_cmd,
06293 (struct rt_wdb *wdbp,
06294 Tcl_Interp *interp,
06295 int argc,
06296 char **argv));
06297 RT_EXPORT BU_EXTERN(int wdb_prcolor_cmd,
06298 (struct rt_wdb *wdbp,
06299 Tcl_Interp *interp,
06300 int argc,
06301 char **argv));
06302 RT_EXPORT BU_EXTERN(int wdb_tol_cmd,
06303 (struct rt_wdb *wdbp,
06304 Tcl_Interp *interp,
06305 int argc,
06306 char **argv));
06307 RT_EXPORT BU_EXTERN(int wdb_push_cmd,
06308 (struct rt_wdb *wdbp,
06309 Tcl_Interp *interp,
06310 int argc,
06311 char **argv));
06312 RT_EXPORT BU_EXTERN(int wdb_whatid_cmd,
06313 (struct rt_wdb *wdbp,
06314 Tcl_Interp *interp,
06315 int argc,
06316 char **argv));
06317 RT_EXPORT BU_EXTERN(int wdb_keep_cmd,
06318 (struct rt_wdb *wdbp,
06319 Tcl_Interp *interp,
06320 int argc,
06321 char **argv));
06322 RT_EXPORT BU_EXTERN(int wdb_cat_cmd,
06323 (struct rt_wdb *wdbp,
06324 Tcl_Interp *interp,
06325 int argc,
06326 char **argv));
06327 RT_EXPORT BU_EXTERN(int wdb_instance_cmd,
06328 (struct rt_wdb *wdbp,
06329 Tcl_Interp *interp,
06330 int argc,
06331 char **argv));
06332 RT_EXPORT BU_EXTERN(int wdb_observer_cmd,
06333 (struct rt_wdb *wdbp,
06334 Tcl_Interp *interp,
06335 int argc,
06336 char **argv));
06337 RT_EXPORT BU_EXTERN(int wdb_make_bb_cmd,
06338 (struct rt_wdb *wdbp,
06339 Tcl_Interp *interp,
06340 int argc,
06341 char **argv));
06342 RT_EXPORT BU_EXTERN(int wdb_make_name_cmd,
06343 (struct rt_wdb *wdbp,
06344 Tcl_Interp *interp,
06345 int argc,
06346 char **argv));
06347 RT_EXPORT BU_EXTERN(int wdb_units_cmd,
06348 (struct rt_wdb *wdbp,
06349 Tcl_Interp *interp,
06350 int argc,
06351 char **argv));
06352 RT_EXPORT BU_EXTERN(int wdb_hide_cmd,
06353 (struct rt_wdb *wdbp,
06354 Tcl_Interp *interp,
06355 int argc,
06356 char **argv));
06357 RT_EXPORT BU_EXTERN(int wdb_unhide_cmd,
06358 (struct rt_wdb *wdbp,
06359 Tcl_Interp *interp,
06360 int argc,
06361 char **argv));
06362 RT_EXPORT BU_EXTERN(int wdb_attr_cmd,
06363 (struct rt_wdb *wdbp,
06364 Tcl_Interp *interp,
06365 int argc,
06366 char **argv));
06367 RT_EXPORT BU_EXTERN(int wdb_summary_cmd,
06368 (struct rt_wdb *wdbp,
06369 Tcl_Interp *interp,
06370 int argc,
06371 char **argv));
06372 RT_EXPORT BU_EXTERN(int wdb_comb_std_cmd,
06373 (struct rt_wdb *wdbp,
06374 Tcl_Interp *interp,
06375 int argc,
06376 char **argv));
06377 RT_EXPORT BU_EXTERN(int wdb_nmg_collapse_cmd,
06378 (struct rt_wdb *wdbp,
06379 Tcl_Interp *interp,
06380 int argc,
06381 char **argv));
06382 RT_EXPORT BU_EXTERN(int wdb_nmg_simplify_cmd,
06383 (struct rt_wdb *wdbp,
06384 Tcl_Interp *interp,
06385 int argc,
06386 char **argv));
06387 RT_EXPORT BU_EXTERN(int wdb_shells_cmd,
06388 (struct rt_wdb *wdbp,
06389 Tcl_Interp *interp,
06390 int argc,
06391 char **argv));
06392 RT_EXPORT BU_EXTERN(int wdb_xpush_cmd,
06393 (struct rt_wdb *wdbp,
06394 Tcl_Interp *interp,
06395 int argc,
06396 char **argv));
06397 RT_EXPORT BU_EXTERN(int wdb_showmats_cmd,
06398 (struct rt_wdb *wdbp,
06399 Tcl_Interp *interp,
06400 int argc,
06401 char **argv));
06402 RT_EXPORT BU_EXTERN(int wdb_copyeval_cmd,
06403 (struct rt_wdb *wdbp,
06404 Tcl_Interp *interp,
06405 int argc,
06406 char **argv));
06407 RT_EXPORT BU_EXTERN(int wdb_version_cmd,
06408 (struct rt_wdb *wdbp,
06409 Tcl_Interp *interp,
06410 int argc,
06411 char **argv));
06412 RT_EXPORT BU_EXTERN(int wdb_binary_cmd,
06413 (struct rt_wdb *wdbp,
06414 Tcl_Interp *interp,
06415 int argc,
06416 char **argv));
06417 RT_EXPORT BU_EXTERN(int wdb_track_cmd,
06418 (struct rt_wdb *wdbp,
06419 Tcl_Interp *interp,
06420 int argc,
06421 char **argv));
06422 RT_EXPORT BU_EXTERN(int wdb_smooth_bot_cmd,
06423 (struct rt_wdb *wdbp,
06424 Tcl_Interp *interp,
06425 int argc,
06426 char **argv));
06427 RT_EXPORT BU_EXTERN(int wdb_importFg4Section_cmd,
06428 (struct rt_wdb *wdbp,
06429 Tcl_Interp *interp,
06430 int argc,
06431 char **argv));
06432
06433
06434 RT_EXPORT BU_EXTERN(int dgo_set_outputHandler_cmd,
06435 (struct dg_obj *dgop,
06436 Tcl_Interp *interp,
06437 int argc,
06438 char **argv));
06439 RT_EXPORT BU_EXTERN(int dgo_set_transparency_cmd,
06440 (struct dg_obj *dgop,
06441 Tcl_Interp *interp,
06442 int argc,
06443 char **argv));
06444 RT_EXPORT BU_EXTERN(int dgo_observer_cmd,
06445 (struct dg_obj *dgop,
06446 Tcl_Interp *interp,
06447 int argc,
06448 char **argv));
06449 RT_EXPORT BU_EXTERN(void dgo_deleteProc,
06450 (ClientData clientData));
06451 RT_EXPORT BU_EXTERN(void dgo_autoview,
06452 (struct dg_obj *dgop,
06453 struct view_obj *vop,
06454 Tcl_Interp *interp));
06455 RT_EXPORT BU_EXTERN(int dgo_autoview_cmd,
06456 (struct dg_obj *dgop,
06457 struct view_obj *vop,
06458 Tcl_Interp *interp,
06459 int argc, char **argv));
06460 RT_EXPORT BU_EXTERN(int dgo_blast_cmd,
06461 (struct dg_obj *dgop,
06462 Tcl_Interp *interp,
06463 int argc,
06464 char **argv));
06465 RT_EXPORT BU_EXTERN(int dgo_draw_cmd,
06466 (struct dg_obj *dgop,
06467 Tcl_Interp *interp,
06468 int argc, char **argv,
06469 int kind));
06470 RT_EXPORT BU_EXTERN(int dgo_E_cmd,
06471 (struct dg_obj *dgop,
06472 Tcl_Interp *interp,
06473 int argc,
06474 char **argv));
06475 RT_EXPORT BU_EXTERN(int dgo_erase_cmd,
06476 (struct dg_obj *dgop,
06477 Tcl_Interp *interp,
06478 int argc,
06479 char **argv));
06480 RT_EXPORT BU_EXTERN(int dgo_erase_all_cmd,
06481 (struct dg_obj *dgop,
06482 Tcl_Interp *interp,
06483 int argc,
06484 char **argv));
06485 RT_EXPORT BU_EXTERN(int dgo_get_autoview_cmd,
06486 (struct dg_obj *dgop,
06487 Tcl_Interp *interp,
06488 int argc,
06489 char **argv));
06490 RT_EXPORT BU_EXTERN(int dgo_how_cmd,
06491 (struct dg_obj *dgop,
06492 Tcl_Interp *interp,
06493 int argc,
06494 char **argv));
06495 RT_EXPORT BU_EXTERN(int dgo_illum_cmd,
06496 (struct dg_obj *dgop,
06497 Tcl_Interp *interp,
06498 int argc,
06499 char **argv));
06500 RT_EXPORT BU_EXTERN(int dgo_label_cmd,
06501 (struct dg_obj *dgop,
06502 Tcl_Interp *interp,
06503 int argc,
06504 char **argv));
06505 RT_EXPORT BU_EXTERN(struct dg_obj *dgo_open_cmd,
06506 (char *oname,
06507 struct rt_wdb *wdbp));
06508 RT_EXPORT BU_EXTERN(int dgo_overlay_cmd,
06509 (struct dg_obj *dgop,
06510 Tcl_Interp *interp,
06511 int argc,
06512 char **argv));
06513 RT_EXPORT BU_EXTERN(int dgo_report_cmd,
06514 (struct dg_obj *dgop,
06515 Tcl_Interp *interp,
06516 int argc,
06517 char **argv));
06518 RT_EXPORT BU_EXTERN(int dgo_rt_cmd,
06519 (struct dg_obj *dgop,
06520 struct view_obj *vop,
06521 Tcl_Interp *interp,
06522 int argc,
06523 char **argv));
06524 RT_EXPORT BU_EXTERN(int dgo_rtabort_cmd,
06525 (struct dg_obj *dgop,
06526 Tcl_Interp *interp,
06527 int argc,
06528 char **argv));
06529 RT_EXPORT BU_EXTERN(int dgo_rtcheck_cmd,
06530 (struct dg_obj *dgop,
06531 struct view_obj *vop,
06532 Tcl_Interp *interp,
06533 int argc, char **argv));
06534 RT_EXPORT BU_EXTERN(int dgo_vdraw_cmd,
06535 (struct dg_obj *dgop,
06536 Tcl_Interp *interp,
06537 int argc,
06538 char **argv));
06539 RT_EXPORT BU_EXTERN(int dgo_who_cmd,
06540 (struct dg_obj *dgop,
06541 Tcl_Interp *interp,
06542 int argc,
06543 char **argv));
06544 RT_EXPORT BU_EXTERN(void dgo_zap_cmd,
06545 (struct dg_obj *dgop,
06546 Tcl_Interp *interp));
06547 RT_EXPORT BU_EXTERN(int dgo_shaded_mode_cmd,
06548 (struct dg_obj *dgop,
06549 Tcl_Interp *interp,
06550 int argc,
06551 char **argv));
06552
06553 RT_EXPORT BU_EXTERN(void dgo_color_soltab,
06554 ());
06555 RT_EXPORT BU_EXTERN(void dgo_drawH_part2,
06556 ());
06557 RT_EXPORT BU_EXTERN(void dgo_eraseobjall_callback,
06558 (struct db_i *dbip,
06559 Tcl_Interp *interp,
06560 struct directory *dp,
06561 int notify));
06562 RT_EXPORT BU_EXTERN(void dgo_eraseobjpath,
06563 ());
06564 RT_EXPORT BU_EXTERN(void dgo_impending_wdb_close,
06565 ());
06566 RT_EXPORT BU_EXTERN(int dgo_invent_solid,
06567 ());
06568 RT_EXPORT BU_EXTERN(void dgo_notify,
06569 (struct dg_obj *dgop,
06570 Tcl_Interp *interp));
06571 RT_EXPORT BU_EXTERN(void dgo_notifyWdb,
06572 (struct rt_wdb *wdbp,
06573 Tcl_Interp *interp));
06574 RT_EXPORT BU_EXTERN(void dgo_zapall,
06575 ());
06576
06577
06578 RT_EXPORT BU_EXTERN(int dgo_nirt_cmd,
06579 (struct dg_obj *dgop,
06580 struct view_obj *vop,
06581 Tcl_Interp *interp,
06582 int argc,
06583 char **argv));
06584 RT_EXPORT BU_EXTERN(int dgo_vnirt_cmd,
06585 (struct dg_obj *dgop,
06586 struct view_obj *vop,
06587 Tcl_Interp *interp,
06588 int argc,
06589 char **argv));
06590
06591
06592
06593 RT_EXPORT BU_EXTERN(int dg_E_cmd,
06594 (struct dg_obj *dgop,
06595 Tcl_Interp *interp,
06596 int argc,
06597 char **argv));
06598
06599
06600 RT_EXPORT BU_EXTERN(struct view_obj *vo_open_cmd,
06601 (const char *oname));
06602 RT_EXPORT BU_EXTERN(void vo_center,
06603 (struct view_obj *vop,
06604 Tcl_Interp *interp,
06605 point_t center));
06606 RT_EXPORT BU_EXTERN(int vo_center_cmd,
06607 (struct view_obj *vop,
06608 Tcl_Interp *interp,
06609 int argc,
06610 char **argv));
06611 RT_EXPORT BU_EXTERN(void vo_size,
06612 (struct view_obj *vop,
06613 Tcl_Interp *interp,
06614 fastf_t size));
06615 RT_EXPORT BU_EXTERN(int vo_size_cmd,
06616 (struct view_obj *vop,
06617 Tcl_Interp *interp,
06618 int argc,
06619 char **argv));
06620 RT_EXPORT BU_EXTERN(int vo_invSize_cmd,
06621 (struct view_obj *vop,
06622 Tcl_Interp *interp,
06623 int argc,
06624 char **argv));
06625 RT_EXPORT BU_EXTERN(void vo_mat_aet,
06626 (struct view_obj *vop));
06627 RT_EXPORT BU_EXTERN(int vo_zoom,
06628 (struct view_obj *vop,
06629 Tcl_Interp *interp,
06630 fastf_t sf));
06631 RT_EXPORT BU_EXTERN(int vo_zoom_cmd,
06632 (struct view_obj *vop,
06633 Tcl_Interp *interp,
06634 int argc, char **argv));
06635 RT_EXPORT BU_EXTERN(int vo_orientation_cmd,
06636 (struct view_obj *vop,
06637 Tcl_Interp *interp,
06638 int argc,
06639 char **argv));
06640 RT_EXPORT BU_EXTERN(int vo_lookat_cmd,
06641 (struct view_obj *vop,
06642 Tcl_Interp *interp,
06643 int argc,
06644 char **argv));
06645 RT_EXPORT BU_EXTERN(void vo_setview,
06646 (struct view_obj *vop,
06647 Tcl_Interp *interp,
06648 vect_t rvec));
06649 RT_EXPORT BU_EXTERN(int vo_setview_cmd,
06650 (struct view_obj *vop,
06651 Tcl_Interp *interp,
06652 int argc,
06653 char **argv));
06654 RT_EXPORT BU_EXTERN(int vo_eye_cmd,
06655 (struct view_obj *vop,
06656 Tcl_Interp *interp,
06657 int argc,
06658 char **argv));
06659 RT_EXPORT BU_EXTERN(int vo_eye_pos_cmd,
06660 (struct view_obj *vop,
06661 Tcl_Interp *interp,
06662 int argc,
06663 char **argv));
06664 RT_EXPORT BU_EXTERN(int vo_pmat_cmd,
06665 (struct view_obj *vop,
06666 Tcl_Interp *interp,
06667 int argc,
06668 char **argv));
06669 RT_EXPORT BU_EXTERN(int vo_perspective_cmd,
06670 (struct view_obj *vop,
06671 Tcl_Interp *interp,
06672 int argc,
06673 char **argv));
06674 RT_EXPORT BU_EXTERN(void vo_update,
06675 (struct view_obj *vop,
06676 Tcl_Interp *interp,
06677 int oflag));
06678 RT_EXPORT BU_EXTERN(int vo_aet_cmd,
06679 (struct view_obj *vop,
06680 Tcl_Interp *interp,
06681 int argc,
06682 char **argv));
06683 RT_EXPORT BU_EXTERN(int vo_rmat_cmd,
06684 (struct view_obj *vop,
06685 Tcl_Interp *interp,
06686 int argc,
06687 char **argv));
06688 RT_EXPORT BU_EXTERN(int vo_model2view_cmd,
06689 (struct view_obj *vop,
06690 Tcl_Interp *interp,
06691 int argc,
06692 char **argv));
06693 RT_EXPORT BU_EXTERN(int vo_pmodel2view_cmd,
06694 (struct view_obj *vop,
06695 Tcl_Interp *interp,
06696 int argc,
06697 char **argv));
06698 RT_EXPORT BU_EXTERN(int vo_view2model_cmd,
06699 (struct view_obj *vop,
06700 Tcl_Interp *interp,
06701 int argc,
06702 char **argv));
06703 RT_EXPORT BU_EXTERN(int vo_pov_cmd,
06704 (struct view_obj *vop,
06705 Tcl_Interp *interp,
06706 int argc,
06707 char **argv));
06708 RT_EXPORT BU_EXTERN(int vo_units_cmd,
06709 (struct view_obj *vop,
06710 Tcl_Interp *interp,
06711 int argc,
06712 char **argv));
06713 RT_EXPORT BU_EXTERN(int vo_base2local_cmd,
06714 (struct view_obj *vop,
06715 Tcl_Interp *interp,
06716 int argc,
06717 char **argv));
06718 RT_EXPORT BU_EXTERN(int vo_local2base_cmd,
06719 (struct view_obj *vop,
06720 Tcl_Interp *interp,
06721 int argc,
06722 char **argv));
06723 RT_EXPORT BU_EXTERN(int vo_rot,
06724 (struct view_obj *vop,
06725 Tcl_Interp *interp,
06726 char coord,
06727 char origin,
06728 mat_t rmat,
06729 int (*func)()));
06730 RT_EXPORT BU_EXTERN(int vo_rot_cmd,
06731 (struct view_obj *vop,
06732 Tcl_Interp *interp,
06733 int argc, char **argv,
06734 int (*func)()));
06735 RT_EXPORT BU_EXTERN(int vo_arot_cmd,
06736 (struct view_obj *vop,
06737 Tcl_Interp *interp,
06738 int argc,
06739 char **argv,
06740 int (*func)()));
06741 RT_EXPORT BU_EXTERN(int vo_mrot_cmd,
06742 (struct view_obj *vop,
06743 Tcl_Interp *interp,
06744 int argc,
06745 char **argv,
06746 int (*func)()));
06747 RT_EXPORT BU_EXTERN(int vo_tra,
06748 (struct view_obj *vop,
06749 Tcl_Interp *interp,
06750 char coord,
06751 vect_t tvec,
06752 int (*func)()));
06753 RT_EXPORT BU_EXTERN(int vo_tra_cmd,
06754 (struct view_obj *vop,
06755 Tcl_Interp *interp,
06756 int argc, char **argv,
06757 int (*func)()));
06758 RT_EXPORT BU_EXTERN(int vo_slew,
06759 (struct view_obj *vop,
06760 Tcl_Interp *interp,
06761 vect_t svec));
06762 RT_EXPORT BU_EXTERN(int vo_slew_cmd,
06763 (struct view_obj *vop,
06764 Tcl_Interp *interp,
06765 int argc, char **argv));
06766 RT_EXPORT BU_EXTERN(int vo_observer_cmd,
06767 (struct view_obj *vop,
06768 Tcl_Interp *interp,
06769 int argc,
06770 char **argv));
06771 RT_EXPORT BU_EXTERN(int vo_coord_cmd,
06772 (struct view_obj *vop,
06773 Tcl_Interp *interp,
06774 int argc,
06775 char **argv));
06776 RT_EXPORT BU_EXTERN(int vo_rotate_about_cmd,
06777 (struct view_obj *vop,
06778 Tcl_Interp *interp,
06779 int argc,
06780 char **argv));
06781 RT_EXPORT BU_EXTERN(int vo_keypoint_cmd,
06782 (struct view_obj *vop,
06783 Tcl_Interp *interp,
06784 int argc,
06785 char **argv));
06786 RT_EXPORT BU_EXTERN(int vo_vrot_cmd,
06787 (struct view_obj *vop,
06788 Tcl_Interp *interp,
06789 int argc,
06790 char **argv));
06791 RT_EXPORT BU_EXTERN(int vo_sca,
06792 (struct view_obj *vop,
06793 Tcl_Interp *interp,
06794 fastf_t sf,
06795 int (*func)()));
06796 RT_EXPORT BU_EXTERN(int vo_sca_cmd,
06797 (struct view_obj *vop,
06798 Tcl_Interp *interp,
06799 int argc,
06800 char **argv,
06801 int (*func)()));
06802
06803
06804 RT_EXPORT BU_EXTERN(int rt_mk_binunif,
06805 (struct rt_wdb *wdbp,
06806 const char *obj_name,
06807 const char *file_name,
06808 unsigned int minor_type,
06809 long max_count));
06810
06811
06812 #ifdef _WIN32
06813
06814 RT_EXPORT BU_EXTERN(void rt_dsp_ifree,
06815 (struct rt_db_internal *ip));
06816
06817
06818 RT_EXPORT BU_EXTERN(void rt_ebm_ifree,
06819 (struct rt_db_internal *ip));
06820
06821
06822 RT_EXPORT BU_EXTERN(void rt_vol_ifree,
06823 (struct rt_db_internal *ip));
06824 #endif
06825
06826
06827 RT_EXPORT BU_EXTERN(void rt_binunif_free,
06828 (struct rt_binunif_internal *bip));
06829 RT_EXPORT BU_EXTERN(void rt_binunif_dump,
06830 (struct rt_binunif_internal *bip));
06831
06832
06833 RT_EXPORT extern fastf_t rt_cline_radius;
06834
06835
06836 RT_EXPORT extern int rt_bot_minpieces;
06837 RT_EXPORT extern int rt_bot_tri_per_piece;
06838
06839
06840
06841
06842
06843 RT_EXPORT extern const struct db_tree_state rt_initial_tree_state;
06844 RT_EXPORT extern const char *rt_vlist_cmd_descriptions[];
06845
06846
06847 RT_EXPORT extern const char rt_version[];
06848
06849 __END_DECLS
06850
06851 #endif
06852
06853
06854
06855
06856
06857
06858
06859
06860
06861
06862