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 #ifndef SEEN_RTGEOM_H
00058 #define SEEN_RTGEOM_H seen
00059
00060 #include "common.h"
00061
00062 __BEGIN_DECLS
00063
00064 #undef r_a
00065
00066 #define NAMELEN 16
00067
00068
00069
00070
00071 struct rt_tor_internal {
00072 long magic;
00073 point_t v;
00074 vect_t h;
00075 fastf_t r_h;
00076 fastf_t r_a;
00077
00078 vect_t a;
00079 vect_t b;
00080 fastf_t r_b;
00081 };
00082 #define RT_TOR_INTERNAL_MAGIC 0x9bffed87
00083 #define RT_TOR_CK_MAGIC(_p) BU_CKMAG(_p,RT_TOR_INTERNAL_MAGIC,"rt_tor_internal")
00084
00085
00086
00087
00088 struct rt_tgc_internal {
00089 long magic;
00090 vect_t v;
00091 vect_t h;
00092 vect_t a;
00093 vect_t b;
00094 vect_t c;
00095 vect_t d;
00096 };
00097 #define RT_TGC_INTERNAL_MAGIC 0xaabbdd87
00098 #define RT_TGC_CK_MAGIC(_p) BU_CKMAG(_p,RT_TGC_INTERNAL_MAGIC,"rt_tgc_internal")
00099
00100
00101
00102
00103 struct rt_ell_internal {
00104 long magic;
00105 point_t v;
00106 vect_t a;
00107 vect_t b;
00108 vect_t c;
00109 };
00110 #define RT_ELL_INTERNAL_MAGIC 0x93bb23ff
00111 #define RT_ELL_CK_MAGIC(_p) BU_CKMAG(_p,RT_ELL_INTERNAL_MAGIC,"rt_ell_internal")
00112
00113
00114
00115
00116 struct rt_superell_internal {
00117 long magic;
00118 point_t v;
00119 vect_t a;
00120 vect_t b;
00121 vect_t c;
00122 double n;
00123 double e;
00124 };
00125 #define RT_SUPERELL_INTERNAL_MAGIC 0xff93bb23
00126 #define RT_SUPERELL_CK_MAGIC(_p) BU_CKMAG(_p,RT_SUPERELL_INTERNAL_MAGIC,"rt_superell_internal")
00127
00128
00129
00130
00131 struct rt_metaball_internal {
00132 long magic;
00133 int method;
00134 fastf_t threshold;
00135 struct bu_list metaball_ctrl_head;
00136 };
00137 #define RT_METABALL_INTERNAL_MAGIC 0x62616c6c
00138 #define RT_METABALL_CK_MAGIC(_p) BU_CKMAG(_p,RT_METABALL_INTERNAL_MAGIC,"rt_metaball_internal")
00139
00140
00141
00142
00143
00144
00145
00146 struct rt_arb_internal {
00147 long magic;
00148 point_t pt[8];
00149 };
00150 #define RT_ARB_INTERNAL_MAGIC 0x9befd010
00151 #define RT_ARB_CK_MAGIC(_p) BU_CKMAG(_p,RT_ARB_INTERNAL_MAGIC,"rt_arb_internal")
00152
00153
00154
00155
00156 struct rt_ars_internal {
00157 long magic;
00158 int ncurves;
00159 int pts_per_curve;
00160 fastf_t **curves;
00161 };
00162 #define RT_ARS_INTERNAL_MAGIC 0x77ddbbe3
00163 #define RT_ARS_CK_MAGIC(_p) BU_CKMAG(_p,RT_ARS_INTERNAL_MAGIC,"rt_ars_internal")
00164
00165
00166
00167
00168 struct rt_half_internal {
00169 long magic;
00170 plane_t eqn;
00171 };
00172 #define RT_HALF_INTERNAL_MAGIC 0xaa87bbdd
00173 #define RT_HALF_CK_MAGIC(_p) BU_CKMAG(_p,RT_HALF_INTERNAL_MAGIC,"rt_half_internal")
00174
00175
00176
00177
00178 struct rt_grip_internal {
00179 long magic;
00180 point_t center;
00181
00182 vect_t normal;
00183 fastf_t mag;
00184 };
00185 #define RT_GRIP_INTERNAL_MAGIC 0x31196205
00186 #define RT_GRIP_CK_MAGIC(_p) BU_CKMAG(_p,RT_GRIP_INTERNAL_MAGIC,"rt_grip_internal")
00187
00188
00189
00190
00191 struct rt_pg_internal {
00192 long magic;
00193 int npoly;
00194 struct rt_pg_face_internal {
00195 int npts;
00196 fastf_t *verts;
00197 fastf_t *norms;
00198 } *poly;
00199
00200 int max_npts;
00201 };
00202 #define RT_PG_INTERNAL_MAGIC 0x9bfed887
00203 #define RT_PG_CK_MAGIC(_p) BU_CKMAG(_p,RT_PG_INTERNAL_MAGIC,"rt_pg_internal")
00204
00205
00206 #ifdef NMG_H
00207 #ifndef SEEN_RT_NURB_INTERNAL
00208 #define SEEN_RT_NURB_INTERNAL
00209 struct rt_nurb_internal {
00210 long magic;
00211 int nsrf;
00212 struct face_g_snurb **srfs;
00213 };
00214 #endif
00215
00216 #define RT_NURB_INTERNAL_MAGIC 0x002b2bdd
00217 #define RT_NURB_CK_MAGIC( _p) BU_CKMAG(_p,RT_NURB_INTERNAL_MAGIC,"rt_nurb_internal");
00218 #endif
00219 #define RT_NURB_GET_CONTROL_POINT(_s,_u,_v) ((_s)->ctl_points[ \
00220 ((_v)*(_s)->s_size[0]+(_u))*RT_NURB_EXTRACT_COORDS((_s)->pt_type)])
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234 #define RT_EBM_NAME_LEN 256
00235 struct rt_ebm_internal {
00236 long magic;
00237 char file[RT_EBM_NAME_LEN];
00238 int xdim;
00239 int ydim;
00240 fastf_t tallness;
00241 mat_t mat;
00242
00243 struct bu_mapped_file *mp;
00244 };
00245 #define RT_EBM_INTERNAL_MAGIC 0xf901b231
00246 #define RT_EBM_CK_MAGIC(_p) BU_CKMAG(_p,RT_EBM_INTERNAL_MAGIC,"rt_ebm_internal")
00247
00248
00249
00250
00251 #define RT_VOL_NAME_LEN 128
00252 struct rt_vol_internal {
00253 long magic;
00254 char file[RT_VOL_NAME_LEN];
00255 int xdim;
00256 int ydim;
00257 int zdim;
00258 int lo;
00259 int hi;
00260 vect_t cellsize;
00261 mat_t mat;
00262
00263 unsigned char *map;
00264 };
00265 #define RT_VOL_INTERNAL_MAGIC 0x987ba1d0
00266 #define RT_VOL_CK_MAGIC(_p) BU_CKMAG(_p,RT_VOL_INTERNAL_MAGIC,"rt_vol_internal")
00267
00268
00269
00270
00271 struct rt_hf_internal {
00272 long magic;
00273
00274 char cfile[128];
00275 char dfile[128];
00276 char fmt[8];
00277 int w;
00278 int n;
00279 int shorts;
00280 fastf_t file2mm;
00281 vect_t v;
00282 vect_t x;
00283 vect_t y;
00284 fastf_t xlen;
00285 fastf_t ylen;
00286 fastf_t zscale;
00287
00288 struct bu_mapped_file *mp;
00289 };
00290 #define RT_HF_INTERNAL_MAGIC 0x4846494d
00291 #define RT_HF_CK_MAGIC(_p) BU_CKMAG(_p,RT_HF_INTERNAL_MAGIC,"rt_hf_internal")
00292
00293
00294
00295
00296 struct rt_arbn_internal {
00297 long magic;
00298 int neqn;
00299 plane_t *eqn;
00300 };
00301 #define RT_ARBN_INTERNAL_MAGIC 0x18236461
00302 #define RT_ARBN_CK_MAGIC(_p) BU_CKMAG(_p,RT_ARBN_INTERNAL_MAGIC,"rt_arbn_internal")
00303
00304
00305
00306
00307 struct rt_pipe_internal {
00308 long pipe_magic;
00309 struct bu_list pipe_segs_head;
00310
00311 int pipe_count;
00312 };
00313 #define RT_PIPE_INTERNAL_MAGIC 0x7dd7bb3e
00314 #define RT_PIPE_CK_MAGIC(_p) BU_CKMAG(_p,RT_PIPE_INTERNAL_MAGIC,"rt_pipe_internal")
00315
00316
00317
00318
00319 struct rt_part_internal {
00320 long part_magic;
00321 point_t part_V;
00322 vect_t part_H;
00323 fastf_t part_vrad;
00324 fastf_t part_hrad;
00325
00326 int part_type;
00327 };
00328 #define RT_PART_INTERNAL_MAGIC 0xaaccee87
00329 #define RT_PART_CK_MAGIC(_p) BU_CKMAG(_p,RT_PART_INTERNAL_MAGIC,"rt_part_internal")
00330
00331 #define RT_PARTICLE_TYPE_SPHERE 1
00332 #define RT_PARTICLE_TYPE_CYLINDER 2
00333 #define RT_PARTICLE_TYPE_CONE 3
00334
00335
00336
00337
00338 struct rt_rpc_internal {
00339 long rpc_magic;
00340 point_t rpc_V;
00341 vect_t rpc_H;
00342 vect_t rpc_B;
00343 fastf_t rpc_r;
00344 };
00345 #define RT_RPC_INTERNAL_MAGIC 0xaaccee88
00346 #define RT_RPC_CK_MAGIC(_p) BU_CKMAG(_p,RT_RPC_INTERNAL_MAGIC,"rt_rpc_internal")
00347
00348
00349
00350
00351 struct rt_rhc_internal {
00352 long rhc_magic;
00353 point_t rhc_V;
00354 vect_t rhc_H;
00355 vect_t rhc_B;
00356 fastf_t rhc_r;
00357 fastf_t rhc_c;
00358 };
00359 #define RT_RHC_INTERNAL_MAGIC 0xaaccee89
00360 #define RT_RHC_CK_MAGIC(_p) BU_CKMAG(_p,RT_RHC_INTERNAL_MAGIC,"rt_rhc_internal")
00361
00362
00363
00364
00365 struct rt_epa_internal {
00366 long epa_magic;
00367 point_t epa_V;
00368 vect_t epa_H;
00369 vect_t epa_Au;
00370 fastf_t epa_r1;
00371 fastf_t epa_r2;
00372 };
00373 #define RT_EPA_INTERNAL_MAGIC 0xaaccee90
00374 #define RT_EPA_CK_MAGIC(_p) BU_CKMAG(_p,RT_EPA_INTERNAL_MAGIC,"rt_epa_internal")
00375
00376
00377
00378
00379 struct rt_ehy_internal {
00380 long ehy_magic;
00381 point_t ehy_V;
00382 vect_t ehy_H;
00383 vect_t ehy_Au;
00384 fastf_t ehy_r1;
00385 fastf_t ehy_r2;
00386 fastf_t ehy_c;
00387 };
00388 #define RT_EHY_INTERNAL_MAGIC 0xaaccee91
00389 #define RT_EHY_CK_MAGIC(_p) BU_CKMAG(_p,RT_EHY_INTERNAL_MAGIC,"rt_ehy_internal")
00390
00391
00392
00393
00394 struct rt_eto_internal {
00395 long eto_magic;
00396 point_t eto_V;
00397 vect_t eto_N;
00398 vect_t eto_C;
00399 fastf_t eto_r;
00400 fastf_t eto_rd;
00401 };
00402 #define RT_ETO_INTERNAL_MAGIC 0xaaccee92
00403 #define RT_ETO_CK_MAGIC(_p) BU_CKMAG(_p,RT_ETO_INTERNAL_MAGIC,"rt_eto_internal")
00404
00405
00406
00407
00408 #define DSP_NAME_LEN 128
00409 struct rt_dsp_internal{
00410 long magic;
00411 #define dsp_file dsp_name
00412 struct bu_vls dsp_name;
00413 unsigned int dsp_xcnt;
00414 unsigned int dsp_ycnt;
00415 unsigned short dsp_smooth;
00416 #define DSP_CUT_DIR_ADAPT 'a'
00417 #define DSP_CUT_DIR_llUR 'l'
00418 #define DSP_CUT_DIR_ULlr 'L'
00419 unsigned char dsp_cuttype;
00420
00421 mat_t dsp_mtos;
00422
00423 mat_t dsp_stom;
00424
00425 unsigned short *dsp_buf;
00426 struct bu_mapped_file *dsp_mp;
00427 struct rt_db_internal *dsp_bip;
00428 #define RT_DSP_SRC_V4_FILE '4'
00429 #define RT_DSP_SRC_FILE 'f'
00430 #define RT_DSP_SRC_OBJ 'o'
00431 char dsp_datasrc;
00432 };
00433 #define RT_DSP_INTERNAL_MAGIC 0xde6
00434 #define RT_DSP_CK_MAGIC(_p) BU_CKMAG(_p,RT_DSP_INTERNAL_MAGIC,"rt_dsp_internal")
00435
00436
00437
00438
00439
00440
00441 #define SKETCH_NAME_LEN 16
00442 struct rt_sketch_internal
00443 {
00444 long magic;
00445 point_t V;
00446 vect_t u_vec;
00447 vect_t v_vec;
00448 int vert_count;
00449 point2d_t *verts;
00450
00451
00452 struct curve {
00453 int seg_count;
00454 int *reverse;
00455 genptr_t *segments;
00456 } skt_curve;
00457 };
00458 #define RT_SKETCH_INTERNAL_MAGIC 0x736b6574
00459 #define RT_SKETCH_CK_MAGIC(_p) BU_CKMAG(_p,RT_SKETCH_INTERNAL_MAGIC,"rt_sketch_internal")
00460
00461
00462
00463
00464 struct rt_submodel_internal {
00465 long magic;
00466 struct bu_vls file;
00467 struct bu_vls treetop;
00468 int meth;
00469
00470
00471 mat_t root2leaf;
00472 const struct db_i *dbip;
00473 };
00474 #define RT_SUBMODEL_INTERNAL_MAGIC 0x7375626d
00475 #define RT_SUBMODEL_CK_MAGIC(_p) BU_CKMAG(_p,RT_SUBMODEL_INTERNAL_MAGIC,"rt_submodel_internal")
00476
00477
00478
00479
00480
00481 struct rt_extrude_internal
00482 {
00483 long magic;
00484 point_t V;
00485 vect_t h;
00486 vect_t u_vec;
00487 vect_t v_vec;
00488 int keypoint;
00489 char *sketch_name;
00490
00491 struct rt_sketch_internal *skt;
00492 };
00493
00494
00495
00496
00497 #define RT_EXTRUDE_INTERNAL_MAGIC 0x65787472
00498 #define RT_EXTRUDE_CK_MAGIC(_p) BU_CKMAG(_p,RT_EXTRUDE_INTERNAL_MAGIC,"rt_extrude_internal")
00499
00500
00501
00502
00503
00504
00505
00506 struct rt_cline_internal
00507 {
00508 long magic;
00509 point_t v;
00510 vect_t h;
00511 fastf_t radius;
00512 fastf_t thickness;
00513 };
00514 #define RT_CLINE_INTERNAL_MAGIC 0x43767378
00515 #define RT_CLINE_CK_MAGIC(_p) BU_CKMAG(_p,RT_CLINE_INTERNAL_MAGIC,"rt_cline_internal")
00516
00517
00518
00519
00520
00521 struct rt_bot_internal
00522 {
00523 long magic;
00524 unsigned char mode;
00525 unsigned char orientation;
00526 unsigned char bot_flags;
00527 int num_vertices;
00528 int num_faces;
00529 int *faces;
00530 fastf_t *vertices;
00531 fastf_t *thickness;
00532
00533
00534 struct bu_bitv *face_mode;
00535
00536
00537
00538 int num_normals;
00539 fastf_t *normals;
00540 int num_face_normals;
00541 int *face_normals;
00542 };
00543
00544
00545 #define RT_BOT_UNORIENTED 1
00546 #define RT_BOT_CCW 2
00547 #define RT_BOT_CW 3
00548
00549
00550 #define RT_BOT_SURFACE 1
00551 #define RT_BOT_SOLID 2
00552 #define RT_BOT_PLATE 3
00553
00554
00555 #define RT_BOT_PLATE_NOCOS 4
00556
00557
00558
00559 #define RT_BOT_HAS_SURFACE_NORMALS 0x1
00560 #define RT_BOT_USE_NORMALS 0x2
00561 #define RT_BOT_USE_FLOATS 0x4
00562
00563 #define RT_BOT_INTERNAL_MAGIC 0x626F7472
00564 #define RT_BOT_CK_MAGIC(_p) BU_CKMAG(_p,RT_BOT_INTERNAL_MAGIC,"rt_bot_internal")
00565
00566 __END_DECLS
00567
00568 #endif
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579