BRL-CAD
geom.h
Go to the documentation of this file.
1/* G E O M . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2004-2023 United States Government as represented by
5 * the U.S. Army Research Laboratory.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * version 2.1 as published by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this file; see the file named COPYING for more
18 * information.
19 */
20/** @addtogroup rt_geom
21 *
22 * @brief Functions and details of the internal forms used by the LIBRT geometry
23 * routines for the different solids.
24 *
25 * These structures are what the struct rt_db_internal generic pointer
26 * idb_ptr points at, based on idb_type indicating a solid id ID_xxx,
27 * such as ID_TGC.
28 *
29 */
30/** @{ */
31/** @file rt/geom.h */
32/** @} */
33
34#ifndef RT_GEOM_H
35#define RT_GEOM_H
36
37#include "common.h"
38
39#include "bu/bitv.h"
40#include "bu/color.h"
41#include "bu/list.h"
42#include "bu/mapped_file.h"
43#include "bu/vls.h"
44#include "vmath.h"
45#include "rt/defines.h"
46
47#include "../nmg.h" /* (temporarily?) needed for knot_vector */
48#include "brep.h"
49
50
51__BEGIN_DECLS
52
53#define NAMELEN 16 /* NAMESIZE from db.h (can't call it NAMESIZE!!!!!) */
54
55/** @addtogroup rt_tor */
56/** @{ */
57/*
58 * ID_TOR
59 */
61 uint32_t magic;
62 point_t v; /**< @brief center point */
63 vect_t h; /**< @brief normal, unit length */
64 fastf_t r_h; /**< @brief radius in H direction (r2) */
65 fastf_t r_a; /**< @brief radius in A direction (r1) */
66 /* REMAINING ELEMENTS PROVIDED BY IMPORT, UNUSED BY EXPORT */
67 vect_t a; /**< @brief r_a length */
68 vect_t b; /**< @brief r_b length */
69 fastf_t r_b; /**< @brief radius in B direction (typ == r_a) */
70};
71#define RT_TOR_CK_MAGIC(_p) BU_CKMAG(_p, RT_TOR_INTERNAL_MAGIC, "rt_tor_internal")
72/** @} */
73
74/** @addtogroup rt_tgc */
75/** @{ */
76/**
77 * ID_TGC and ID_REC
78 */
80 uint32_t magic;
87};
88#define RT_TGC_CK_MAGIC(_p) BU_CKMAG(_p, RT_TGC_INTERNAL_MAGIC, "rt_tgc_internal")
89/** @} */
90
91/** @addtogroup rt_ell */
92/** @{ */
93/*
94 * ID_ELL, and ID_SPH
95 */
97 uint32_t magic;
98 point_t v; /**< @brief center point */
99 vect_t a; /**< @brief axis a radial length */
100 vect_t b; /**< @brief axis b radial length */
101 vect_t c; /**< @brief axis c radial length */
102};
103#define RT_ELL_CK_MAGIC(_p) BU_CKMAG(_p, RT_ELL_INTERNAL_MAGIC, "rt_ell_internal")
104/** @} */
105
106/** @addtogroup rt_superell */
107/** @{ */
108/*
109 * ID_SUPERELL
110 */
112 uint32_t magic;
117 double n;
118 double e;
119};
120#define RT_SUPERELL_CK_MAGIC(_p) BU_CKMAG(_p, RT_SUPERELL_INTERNAL_MAGIC, "rt_superell_internal")
121/** @} */
122
123/** @addtogroup rt_metaball */
124/** @{ */
125/**
126 * ID_METABALL
127 *
128 * The "metaball" primitive contains a method ID, threshold value, and
129 * an unordered set of control points. Each control point contains a
130 * 3d location, a "field strength", and possibly a "blobbiness" value
131 * (called "goo" in rt_metaball_add_point).
132 *
133 * There are three method ID's defined:
134 *
135 * 1. "metaball", which is the Tokyo Metaball approximation of the
136 * Blinn Blobby Surface. This method is not implemented yet.
137 *
138 * 2. "blob", the Blinn method.
139 *
140 * 3. "iso", which is a simple computation like you'd see for
141 * computing gravitational magnitude or point charge in a basic
142 * physics course. Blending function in latex notation is:
143 *
144 @code
145 \Sum_{i}\frac{f_{i}}{d^{2}}
146 @endcode
147 *
148 * The surface of the primitive exists where the summation of the
149 * points contribution is equal to the threshold, with the general
150 * fldstr/distance^2 pattern.
151 *
152 * The blobbiness value is only used in the blob method, and modifies
153 * the gusseting effect.
154 *
155 */
157 uint32_t magic;
158 /* these three defines are used with the method field */
159#define METABALL_METABALL 0
160#define METABALL_ISOPOTENTIAL 1
161#define METABALL_BLOB 2
165 fastf_t finalstep; /* for raytrace stepping. */
167};
168#define RT_METABALL_CK_MAGIC(_p) BU_CKMAG(_p, RT_METABALL_INTERNAL_MAGIC, "rt_metaball_internal")
170 struct bu_list l;
171 int type;
172 fastf_t fldstr; /**< @brief field strength */
173 fastf_t sweat; /**< @brief beta value used for metaball and blob evaluation */
176};
177#define WDB_METABALLPT_TYPE_POINT 0x0
178#define WDB_METABALLPT_TYPE_LINE 0x1
179#define WDB_METABALL_PNT_NULL ((struct wdb_metaball_pnt *)0)
180/** @} */
181
182
183/** @addtogroup rt_arb */
184/** @{ */
185/*
186 * ID_ARB8
187 *
188 * The internal (in memory) form of an ARB8 -- 8 points in space.
189 * The first 4 form the "bottom" face, the second 4 form the "top" face.
190 */
192 uint32_t magic;
194};
195#define RT_ARB_CK_MAGIC(_p) BU_CKMAG(_p, RT_ARB_INTERNAL_MAGIC, "rt_arb_internal")
196/** @} */
197
198/** @addtogroup rt_ars */
199/** @{ */
200/*
201 * ID_ARS
202 */
204 uint32_t magic;
205 size_t ncurves;
208};
209#define RT_ARS_CK_MAGIC(_p) BU_CKMAG(_p, RT_ARS_INTERNAL_MAGIC, "rt_ars_internal")
210/** @} */
211
212/** @addtogroup rt_half */
213/** @{ */
214/*
215 * ID_HALF
216 */
218 uint32_t magic;
220};
221#define RT_HALF_CK_MAGIC(_p) BU_CKMAG(_p, RT_HALF_INTERNAL_MAGIC, "rt_half_internal")
222/** @} */
223
224/** @addtogroup rt_grip */
225/** @{ */
226/*
227 * ID_GRIP
228 */
230 uint32_t magic;
232 /* Remaining elements are used for display purposes only */
235};
236#define RT_GRIP_CK_MAGIC(_p) BU_CKMAG(_p, RT_GRIP_INTERNAL_MAGIC, "rt_grip_internal")
237/** @} */
238
239/** @addtogroup rt_joint */
240/** @{ */
241/*
242 * ID_JOINT
243 */
245 uint32_t magic;
249
250 /* Remaining elements are used for display purposes only */
254};
255#define RT_JOINT_CK_MAGIC(_p) BU_CKMAG(_p, RT_JOINT_INTERNAL_MAGIC, "rt_joint_internal")
256/** @} */
257
258/** @addtogroup rt_pg */
259/** @{ */
260/**
261 * ID_POLY
262 */
264 size_t npts; /**< @brief number of points for this polygon */
265 fastf_t *verts; /**< @brief has 3*npts elements */
266 fastf_t *norms; /**< @brief has 3*npts elements */
267}; /**< @brief has npoly elements */
269 uint32_t magic;
270 size_t npoly;
271 struct rt_pg_face_internal *poly; /**< @brief has npoly elements */
272 /* REMAINING ELEMENTS PROVIDED BY IMPORT, UNUSED BY EXPORT */
273 size_t max_npts; /**< @brief maximum value of npts in poly[] */
274};
275#define RT_PG_CK_MAGIC(_p) BU_CKMAG(_p, RT_PG_INTERNAL_MAGIC, "rt_pg_internal")
276/** @} */
277
278/** @addtogroup rt_nurb */
279/** @{ */
280/* ID_BSPLINE */
282 uint32_t magic;
283 int nsrf; /**< @brief number of surfaces */
284 struct face_g_snurb **srfs; /**< @brief The surfaces themselves */
285 ON_Brep *brep;
286};
287
288
289#define RT_NURB_CK_MAGIC(_p) BU_CKMAG(_p, RT_NURB_INTERNAL_MAGIC, "rt_nurb_internal");
290#define RT_NURB_GET_CONTROL_POINT(_s, _u, _v) ((_s)->ctl_points[ \
291 ((_v)*(_s)->s_size[0]+(_u))*RT_NURB_EXTRACT_COORDS((_s)->pt_type)])
292/** @} */
293
294/** @addtogroup rt_brep */
295/** @{ */
296/* ID_BREP */
298 uint32_t magic;
299
300 ON_Brep* brep; /**< @brief An openNURBS brep object containing the solid */
301};
302
303
304#define RT_BREP_CK_MAGIC(_p) BU_CKMAG(_p, RT_BREP_INTERNAL_MAGIC, "rt_brep_internal");
305#define RT_BREP_TEST_MAGIC(_p) ((_p) && (*((uint32_t *)(_p)) == (uint32_t)(RT_BREP_INTERNAL_MAGIC)))
306
307/** @} */
308
309
310/*
311 * The internal form of the NMG is not rt_nmg_internal, but just a
312 * "struct model", from nmg.h. e.g.:
313 *
314 * if (intern.idb_type == ID_NMG)
315 * m = (struct model *)intern.idb_ptr;
316 */
317
318/** @addtogroup rt_ebm */
319/** @{ */
320/*
321 * ID_EBM
322 */
323#define RT_EBM_NAME_LEN 256
325 uint32_t magic;
327 /* NOTE: xdim/ydim cannot be size_t until rel8 as they are
328 * written out to disk via bu_vls_struct_print() as 32-bit ints.
329 */
330 uint32_t xdim; /**< @brief X dimension (w cells) */
331 uint32_t ydim; /**< @brief Y dimension (n cells) */
332 fastf_t tallness; /**< @brief Z dimension (mm) */
333 mat_t mat; /**< @brief convert local coords to model space */
334 unsigned char *buf; /**< @brief actual data */
335 struct bu_mapped_file *mp; /**< @brief mapped file for data */
336 struct rt_db_internal *bip; /**< @brief db object for data */
337#define RT_EBM_SRC_FILE 'f'
338#define RT_EBM_SRC_OBJ 'o'
339 char datasrc; /**< @brief which type of data source */
340};
341#define RT_EBM_CK_MAGIC(_p) BU_CKMAG(_p, RT_EBM_INTERNAL_MAGIC, "rt_ebm_internal")
342/** @} */
343
344/** @addtogroup rt_vol */
345/** @{ */
346/*
347 * ID_VOL
348 */
349#define RT_VOL_NAME_LEN 128
351 uint32_t magic;
353 /* NOTE: [xyz]dim/lo/hi cannot be size_t until rel8 as they are
354 * written out to disk via bu_vls_struct_print() as 32-bit ints.
355 */
356 uint32_t xdim; /**< @brief X dimension */
357 uint32_t ydim; /**< @brief Y dimension */
358 uint32_t zdim; /**< @brief Z dimension */
359 uint32_t lo; /**< @brief Low threshold */
360 uint32_t hi; /**< @brief High threshold */
361 vect_t cellsize; /**< @brief ideal coords: size of each cell */
362 mat_t mat; /**< @brief convert local coords to model space */
363 struct rt_db_internal *bip; /* @brief db object for data*/
364#define RT_VOL_SRC_FILE 'f'
365#define RT_VOL_SRC_OBJ 'o'
366 char datasrc;/**< @brief which type of data source */
367 /* REMAINING ELEMENTS PROVIDED BY IMPORT, UNUSED BY EXPORT */
368 unsigned char *map;
369};
370#define RT_VOL_CK_MAGIC(_p) BU_CKMAG(_p, RT_VOL_INTERNAL_MAGIC, "rt_vol_internal")
371/** @} */
372
373/** @addtogroup rt_hf */
374/** @{ */
375/*
376 * ID_HF
377 */
379 uint32_t magic;
380 /* BEGIN USER SETTABLE VARIABLES */
381 char cfile[128]; /**< @brief name of control file (optional) */
382 char dfile[128]; /**< @brief name of data file */
383 char fmt[8]; /**< @brief CV style file format descriptor */
384 /* NOTE: w/n/shorts cannot be size_t until rel8 as they are
385 * written out to disk via bu_vls_struct_print() as 32-bit ints.
386 */
387 uint32_t w; /**< @brief # samples wide of data file. ("i", "x") */
388 uint32_t n; /**< @brief nlines of data file. ("j", "y") */
389 uint32_t shorts; /**< @brief !0 --> memory array is short, not float */
390 fastf_t file2mm; /**< @brief scale factor to cvt file units to mm */
391 vect_t v; /**< @brief origin of HT in model space */
392 vect_t x; /**< @brief model vect corresponding to "w" dir (will be unitized) */
393 vect_t y; /**< @brief model vect corresponding to "n" dir (will be unitized) */
394 fastf_t xlen; /**< @brief model len of HT rpp in "w" dir */
395 fastf_t ylen; /**< @brief model len of HT rpp in "n" dir */
396 fastf_t zscale; /**< @brief scale of data in ''up'' dir (after file2mm is applied) */
397 /* END USER SETTABLE VARIABLES, BEGIN INTERNAL STUFF */
398 struct bu_mapped_file *mp; /**< @brief actual data */
399};
400#define RT_HF_CK_MAGIC(_p) BU_CKMAG(_p, RT_HF_INTERNAL_MAGIC, "rt_hf_internal")
401/** @} */
402
403/** @addtogroup rt_arbn */
404/** @{ */
405/*
406 * ID_ARBN
407 */
409 uint32_t magic;
410 size_t neqn;
412};
413#define RT_ARBN_CK_MAGIC(_p) BU_CKMAG(_p, RT_ARBN_INTERNAL_MAGIC, "rt_arbn_internal")
414/** @} */
415
416/** @addtogroup rt_pipe */
417/** @{ */
418/*
419 * ID_PIPE
420 */
422 uint32_t pipe_magic;
424 /* REMAINING ELEMENTS PROVIDED BY IMPORT, UNUSED BY EXPORT */
426};
427#define RT_PIPE_CK_MAGIC(_p) BU_CKMAG(_p, RT_PIPE_INTERNAL_MAGIC, "rt_pipe_internal")
429 struct bu_list l; /**< @brief doubly linked list support */
430 point_t pp_coord; /**< @brief "control" point for pipe solid */
431 fastf_t pp_id; /**< @brief inner diam, <=0 if solid (wire) */
432 fastf_t pp_od; /**< @brief pipe outer diam */
433 fastf_t pp_bendradius; /**< @brief bend radius to use for a bend at this point */
434};
435/** @} */
436
437
438/** @addtogroup rt_part */
439/** @{ */
440/*
441 * ID_PARTICLE
442 */
444 uint32_t part_magic;
449 /* REMAINING ELEMENTS PROVIDED BY IMPORT, UNUSED BY EXPORT */
450 int part_type; /**< @brief sphere, cylinder, cone */
451};
452#define RT_PART_CK_MAGIC(_p) BU_CKMAG(_p, RT_PART_INTERNAL_MAGIC, "rt_part_internal")
453
454#define RT_PARTICLE_TYPE_SPHERE 1
455#define RT_PARTICLE_TYPE_CYLINDER 2
456#define RT_PARTICLE_TYPE_CONE 3
457/** @} */
458
459/** @addtogroup rt_rpc */
460/** @{ */
461/*
462 * ID_RPC
463 */
465 uint32_t rpc_magic;
466 point_t rpc_V; /**< @brief rpc vertex */
467 vect_t rpc_H; /**< @brief height vector */
468 vect_t rpc_B; /**< @brief breadth vector */
469 fastf_t rpc_r; /**< @brief scalar half-width of rectangular face */
470};
471#define RT_RPC_CK_MAGIC(_p) BU_CKMAG(_p, RT_RPC_INTERNAL_MAGIC, "rt_rpc_internal")
472/** @} */
473
474/** @addtogroup rt_rhc */
475/** @{ */
476/*
477 * ID_RHC
478 */
480 uint32_t rhc_magic;
481 point_t rhc_V; /**< @brief rhc vertex */
482 vect_t rhc_H; /**< @brief height vector */
483 vect_t rhc_B; /**< @brief breadth vector */
484 fastf_t rhc_r; /**< @brief scalar half-width of rectangular face */
485 fastf_t rhc_c; /**< @brief dist from hyperbola to vertex of asymptotes */
486};
487#define RT_RHC_CK_MAGIC(_p) BU_CKMAG(_p, RT_RHC_INTERNAL_MAGIC, "rt_rhc_internal")
488/** @} */
489
490/** @addtogroup rt_epa */
491/** @{ */
492/*
493 * ID_EPA
494 */
496 uint32_t epa_magic;
497 point_t epa_V; /**< @brief epa vertex */
498 vect_t epa_H; /**< @brief height vector */
499 vect_t epa_Au; /**< @brief unit vector along semi-major axis */
500 fastf_t epa_r1; /**< @brief scalar semi-major axis length */
501 fastf_t epa_r2; /**< @brief scalar semi-minor axis length */
502};
503#define RT_EPA_CK_MAGIC(_p) BU_CKMAG(_p, RT_EPA_INTERNAL_MAGIC, "rt_epa_internal")
504/** @} */
505
506/** @addtogroup rt_ehy */
507/** @{ */
508/*
509 * ID_EHY
510 */
512 uint32_t ehy_magic;
513 point_t ehy_V; /**< @brief ehy vertex */
514 vect_t ehy_H; /**< @brief height vector */
515 vect_t ehy_Au; /**< @brief unit vector along semi-major axis */
516 fastf_t ehy_r1; /**< @brief scalar semi-major axis length */
517 fastf_t ehy_r2; /**< @brief scalar semi-minor axis length */
518 fastf_t ehy_c; /**< @brief dist from hyperbola to vertex of asymptotes */
519};
520#define RT_EHY_CK_MAGIC(_p) BU_CKMAG(_p, RT_EHY_INTERNAL_MAGIC, "rt_ehy_internal")
521/** @} */
522
523/** @addtogroup rt_hyp */
524/** @{ */
525/*
526 * ID_HYP
527 */
529 uint32_t hyp_magic;
530 point_t hyp_Vi; /**< @brief hyp vertex */
531 vect_t hyp_Hi; /**< @brief full height vector */
532 vect_t hyp_A; /**< @brief semi-major axis */
533 fastf_t hyp_b; /**< @brief scalar semi-minor axis length */
534 fastf_t hyp_bnr;/**< @brief ratio of minimum neck width to base width */
535};
536#define RT_HYP_CK_MAGIC(_p) BU_CKMAG(_p, RT_HYP_INTERNAL_MAGIC, "rt_hyp_internal")
537/** @} */
538
539/** @addtogroup rt_eto */
540/** @{ */
541/*
542 * ID_ETO
543 */
545 uint32_t eto_magic;
546 point_t eto_V; /**< @brief eto vertex */
547 vect_t eto_N; /**< @brief vector normal to plane of torus */
548 vect_t eto_C; /**< @brief vector along semi-major axis of ellipse */
549 fastf_t eto_r; /**< @brief scalar radius of rotation */
550 fastf_t eto_rd; /**< @brief scalar length of semi-minor of ellipse */
551};
552#define RT_ETO_CK_MAGIC(_p) BU_CKMAG(_p, RT_ETO_INTERNAL_MAGIC, "rt_eto_internal")
553/** @} */
554
555/** @addtogroup rt_dsp */
556/** @{ */
557/*
558 * ID_DSP
559 */
560#define DSP_NAME_LEN 128
562 uint32_t magic;
563#define dsp_file dsp_name /**< @brief for backwards compatibility */
564 struct bu_vls dsp_name; /**< TODO: make this a pointer, name of data file */
565
566 /* NOTE: dsp_xcnt/dsp_ycnt cannot be size_t until rel8 as they are
567 * written out to disk via bu_vls_struct_print() as 32-bit ints.
568 */
569 uint32_t dsp_xcnt; /**< @brief # samples in row of data */
570 uint32_t dsp_ycnt; /**< @brief # of columns in data */
571 unsigned short dsp_smooth; /**< @brief bool: surf normal interp */
572#define DSP_CUT_DIR_ADAPT 'a'
573#define DSP_CUT_DIR_llUR 'l'
574#define DSP_CUT_DIR_ULlr 'L'
575 unsigned char dsp_cuttype; /**< @brief type of cut to make */
576
577 mat_t dsp_mtos; /**< @brief model to solid space */
578 /* END OF USER SETTABLE VARIABLES, BEGIN INTERNAL STUFF */
579 mat_t dsp_stom; /**< @brief solid to model space
580 * computed from dsp_mtos */
581 unsigned short *dsp_buf; /**< @brief actual data */
582 struct bu_mapped_file *dsp_mp; /**< @brief mapped file for data */
583 struct rt_db_internal *dsp_bip; /**< @brief db object for data */
584#define RT_DSP_SRC_V4_FILE '4'
585#define RT_DSP_SRC_FILE 'f'
586#define RT_DSP_SRC_OBJ 'o'
587 char dsp_datasrc; /**< @brief which type of data source */
588};
589#define RT_DSP_CK_MAGIC(_p) BU_CKMAG(_p, RT_DSP_INTERNAL_MAGIC, "rt_dsp_internal")
590/** @} */
591
592
593/** @addtogroup rt_sketch */
594/** @{ */
595/*
596 * ID_SKETCH
597 */
598
599/**
600 * container for a set of sketch segments
601 */
602struct rt_curve {
603 size_t count; /**< number of segments in this curve */
604 int *reverse; /**< array of boolean flags indicating if
605 * segment should be reversed
606 */
607 void **segment; /**< array of curve segment pointers */
608};
609
610
611/**
612 * used by the sketch, solid of extrusion and the annotation primitive
613 */
614struct line_seg /**< @brief line segment */
615{
616 uint32_t magic;
617 int start, end; /**< @brief indices into sketch's array of vertices */
618};
619
620
621struct carc_seg /**< @brief circular arc segment */
622{
623 uint32_t magic;
624 int start, end; /**< @brief indices */
625 fastf_t radius; /**< @brief radius < 0.0 -> full circle with start point on
626 * circle and "end" at center */
627 int center_is_left; /**< @brief flag indicating where center of curvature is.
628 * If non-zero, then center is to left of vector
629 * from start to end */
630 int orientation; /**< @brief 0 -> ccw, !0 -> cw */
631 int center; /**< @brief index of vertex at center of arc (only used by rt_extrude_prep and rt_extrude_shot) */
632};
633
634
635struct nurb_seg /**< @brief NURB curve segment */
636{
637 uint32_t magic;
638 int order; /**< @brief order of NURB curve (degree - 1) */
639 int pt_type; /**< @brief type of NURB curve */
640 struct knot_vector k; /**< @brief knot vector for NURB curve */
641 int c_size; /**< @brief number of control points */
642 int *ctl_points; /**< @brief array of indices for control points */
643 fastf_t *weights; /**< @brief array of weights for control points (NULL if non_rational) */
644};
645
646
647struct bezier_seg /**< @brief Bezier curve segment */
648{
649 uint32_t magic;
650 int degree; /**< @brief degree of curve (number of control points - 1) */
651 int *ctl_points; /**< @brief array of indices for control points */
652};
653
654
655#define SKETCH_NAME_LEN 16
657{
658 uint32_t magic;
659 point_t V; /**< default embedding of sketch */
660 vect_t u_vec; /**< unit vector 'u' component
661 * defining the sketch plane
662 */
663 vect_t v_vec; /**< unit vector 'v' component
664 * defining the sketch plane
665 */
666 size_t vert_count; /**< number of sketch vertices */
667 point2d_t *verts; /**< array of 2D vertices that may be
668 * used as endpoints, centers, or
669 * spline control points
670 */
671 struct rt_curve curve; /**< the curves of this sketch */
672};
673#define RT_SKETCH_CK_MAGIC(_p) BU_CKMAG(_p, RT_SKETCH_INTERNAL_MAGIC, "rt_sketch_internal")
674/** @} */
675
676/** @addtogroup rt_submodel */
677/** @{ */
678/*
679 * ID_SUBMODEL
680 */
682 uint32_t magic;
683 struct bu_vls file; /**< @brief .g filename, 0-len --> this database. */
684 struct bu_vls treetop; /**< @brief one treetop only */
685 int meth; /**< @brief space partitioning method */
686 /* other option flags (lazy prep, etc.)?? */
687 /* REMAINING ELEMENTS PROVIDED BY IMPORT, UNUSED BY EXPORT */
689 const struct db_i *dbip;
690};
691#define RT_SUBMODEL_CK_MAGIC(_p) BU_CKMAG(_p, RT_SUBMODEL_INTERNAL_MAGIC, "rt_submodel_internal")
692/** @} */
693
694/** @addtogroup rt_extrude */
695/** @{ */
696/*
697 * ID_EXTRUDE
698 */
699
701{
702 uint32_t magic;
703 point_t V; /**< @brief vertex, start and end point of loop to be extruded */
704 vect_t h; /**< @brief extrusion vector, may not be in (u_vec X v_vec) plane */
705 vect_t u_vec; /**< @brief vector in U parameter direction */
706 vect_t v_vec; /**< @brief vector in V parameter direction */
707 int keypoint; /**< @brief DEPRECATED (UNUSED): index of keypoint vertex */
708 char *sketch_name; /**< @brief name of sketch object that defines the curve to be extruded */
709 struct rt_sketch_internal *skt; /**< @brief pointer to referenced sketch */
710};
711
712
713/**
714 * Note that the u_vec and v_vec are not unit vectors, their magnitude
715 * and direction are used for scaling and rotation.
716 */
717#define RT_EXTRUDE_CK_MAGIC(_p) BU_CKMAG(_p, RT_EXTRUDE_INTERNAL_MAGIC, "rt_extrude_internal")
718/** @} */
719
720/** @addtogroup rt_revolve */
721/** @{ */
722/*
723 * ID_REVOLVE
724 */
726 uint32_t magic;
727 point_t v3d; /**< @brief vertex in 3d space */
728 vect_t axis3d; /**< @brief revolve axis in 3d space, y axis */
729
730 point2d_t v2d; /**< @brief vertex in 2d sketch */
731 vect2d_t axis2d; /**< @brief revolve axis in 2d sketch */
732
733 vect_t r; /**< @brief vector in start plane, x axis */
734 fastf_t ang; /**< @brief angle to revolve*/
735 struct bu_vls sketch_name; /**< @brief name of sketch */
736 struct rt_sketch_internal *skt; /**< @brief pointer to sketch */
737};
738#define RT_REVOLVE_CK_MAGIC(_p) BU_CKMAG(_p, RT_REVOLVE_INTERNAL_MAGIC, "rt_revolve_internal")
739/** @} */
740
741/** @addtogroup rt_cline */
742/** @{ */
743/*
744 * ID_CLINE
745 *
746 * Implementation of FASTGEN CLINE element
747 */
748
750{
751 uint32_t magic;
755 fastf_t thickness; /**< @brief zero thickness means volume mode */
756};
757#define RT_CLINE_CK_MAGIC(_p) BU_CKMAG(_p, RT_CLINE_INTERNAL_MAGIC, "rt_cline_internal")
758/** @} */
759
760/** @addtogroup rt_bot */
761/** @{ */
762/*
763 * ID_BOT
764 */
765
767{
768 uint32_t magic;
769 unsigned char mode;
770 unsigned char orientation;
771 unsigned char bot_flags; /**< @brief flags, (indicates surface
772 * normals available, for example)
773 */
774
775 size_t num_faces;
776 int *faces; /**< @brief array of ints for faces
777 * [num_faces*3]
778 */
779
781 fastf_t *vertices; /**< @brief array of floats for
782 * vertices [num_vertices*3]
783 */
784
785 fastf_t *thickness; /**< @brief array of plate mode
786 * thicknesses (corresponds to array
787 * of faces) NULL for modes
788 * RT_BOT_SURFACE and RT_BOT_SOLID.
789 */
790 struct bu_bitv *face_mode; /**< @brief a flag for each face
791 * indicating thickness is appended to
792 * hit point in ray direction (if bit
793 * is set), otherwise thickness is
794 * centered about hit point (NULL for
795 * modes RT_BOT_SURFACE and
796 * RT_BOT_SOLID).
797 */
798
800 fastf_t *normals; /**< @brief array of unit surface
801 * normals [num_normals*3]
802 */
803
804 size_t num_face_normals; /**< @brief current size of the
805 * face_normals array below (number of
806 * faces in the array)
807 */
808 int *face_normals; /**< @brief array of indices into the
809 * "normals" array, one per face
810 * vertex [num_face_normals*3]
811 */
812
813 size_t num_uvs; /**< @brief current size of the vertex
814 * uv mappings (corresponds to number
815 * of vertices)
816 */
817 fastf_t *uvs; /**< @brief array of floats for uv
818 * texturing coordinates [num_uvs*3]
819 */
820
821 size_t num_face_uvs; /**< @brief current size of the
822 * face_uvs array below (number of
823 * faces in the array)
824 */
825 int *face_uvs; /**< @brief array of indices into the
826 * "uvs" array, one per face vertex
827 * [num_uvs*3] */
828
829 void *tie; /* FIXME: blind casting. TIE needs to move from TIE_FUNC to XGLUE before this can not suck. */
830};
831
832
834 struct bu_list l;
836};
837
838
839/* orientations for BOT */
840#define RT_BOT_UNORIENTED 1 /**< @brief unoriented triangles */
841#define RT_BOT_CCW 2 /**< @brief oriented counter-clockwise */
842#define RT_BOT_CW 3 /**< @brief oriented clockwise */
843
844/* modes for BOT */
845#define RT_BOT_SURFACE 1 /**< @brief triangles represent a surface (no volume) */
846#define RT_BOT_SOLID 2 /**< @brief triangles represent the boundary of a solid object */
847
848/**
849 * triangles represent plates. Thicknesses are specified in
850 * "thickness" array, and face mode is specified in "face_mode" bit
851 * vector. This is the FASTGEN "plate" mode. Orientation is ignored.
852 */
853#define RT_BOT_PLATE 3
854
855/**
856 * same as plate mode, but LOS is set equal to face thickness, not the
857 * thickness divided by the cosine of the obliquity angle.
858 */
859#define RT_BOT_PLATE_NOCOS 4
860
861/* flags for bot_flags */
862#define RT_BOT_HAS_SURFACE_NORMALS 0x01 /**< @brief Has surface normals at each face vertex */
863#define RT_BOT_USE_NORMALS 0x02 /**< @brief Use the surface normals if they exist */
864#define RT_BOT_USE_FLOATS 0x04 /**< @brief Use the single precision version of "tri_specific" during prep */
865#define RT_BOT_HAS_TEXTURE_UVS 0x08 /**< @brief Has uv texture coordinates at each face vertex */
866#define RT_BOT_HAS_UNUSED1 0x10 /**< @brief TBD */
867#define RT_BOT_HAS_UNUSED2 0x20 /**< @brief TBD */
868#define RT_BOT_HAS_UNUSED3 0x40 /**< @brief TBD */
869#define RT_BOT_HAS_UNUSED4 0x80 /**< @brief WARNING: use this flag to denote more bits in the export serialization */
870
871#define RT_BOT_CK_MAGIC(_p) BU_CKMAG(_p, RT_BOT_INTERNAL_MAGIC, "rt_bot_internal")
872/** @} */
873
874
875/** @addtogroup rt_pnt */
876/** @{ */
877/**
878 * ID_PNTS
879 *
880 * Points are represented to a structure that contains exactly the
881 * data that it needs for that 'type' of point. The reason this was
882 * done over using something like a union was to fully optimize memory
883 * usage so that the maximum number of points could be stored without
884 * resorting to out-of-core techniques. A union is at least the size
885 * of the largest type and would have wasted memory.
886 *
887 * By using this data-driven approach of type identification, it does
888 * result in needing to have a switching table for all supported types
889 * in order to access data. This could be avoided by storing them as
890 * multiple lists (wasting a few bytes for unused pointers) but is
891 * left as an exercise to the reader.
892 */
893
894typedef enum {
905
906struct pnt {
907 struct bu_list l;
909};
910struct pnt_color {
911 struct bu_list l;
913 struct bu_color c;
914};
915struct pnt_scale {
916 struct bu_list l;
919};
921 struct bu_list l;
924};
926 struct bu_list l;
928 struct bu_color c;
930};
932 struct bu_list l;
934 struct bu_color c;
936};
938 struct bu_list l;
942};
944 struct bu_list l;
946 struct bu_color c;
949};
950
951
953 uint32_t magic;
954 double scale;
956 unsigned long count;
957 void *point;
958};
959#define RT_PNTS_CK_MAGIC(_p) BU_CKMAG(_p, RT_PNTS_INTERNAL_MAGIC, "rt_pnts_internal")
960/** @} */
961
962/** @addtogroup rt_annotation */
963/** @{ */
964/*
965 * ID_ANNO
966 *
967 * Annotations are used to provide labels in-scene when viewing
968 * geometry. Leaders connect labels to geometry objects or fixed
969 * points in space.
970 *
971 */
972
973/**
974 * container for the annotation primitive
975 */
976struct rt_ant {
977 size_t count; /**< @brief number of segments in the annotation */
978 int *reverse; /**< array of boolean flags indicating if the
979 * segment should be reversed */
980 void **segments; /**< @brief array of annotation segment pointer */
981};
982
983
984/**
985 * text labels used by the annotation primitive
986 */
987struct txt_seg {
988 uint32_t magic;
989 int ref_pt; /** reference point */
990 int rel_pos; /** flag describing position relative to ref_pt */
991 struct bu_vls label;
992 fastf_t txt_size; /** text size */
993 fastf_t txt_rot_angle; /** text rotation angle */
994};
995
996
997/**
998 * placement flags
999 */
1000#define RT_TXT_POS_BL 1
1001#define RT_TXT_POS_BC 2
1002#define RT_TXT_POS_BR 3
1003#define RT_TXT_POS_ML 4
1004#define RT_TXT_POS_MC 5
1005#define RT_TXT_POS_MR 6
1006#define RT_TXT_POS_TL 7
1007#define RT_TXT_POS_TC 8
1008#define RT_TXT_POS_TR 9
1009
1010/**
1011 * set a position flag to the corresponding placement value given
1012 * numeric settings (1=left/top, 2=middle/center, 3=right/bottom).
1013 */
1014RT_EXPORT int rt_txt_pos_flag(int *pos_flag, int horizontal, int vertical);
1015
1016/**
1017 * internal representation of an annotation object
1018 */
1020{
1021 uint32_t magic;
1022 point_t V; /**< @brief vertex, maps to the origin in the 2D system */
1023 size_t vert_count; /**< @brief number of vertices */
1024 point2d_t *verts; /**< @brief array of vertices that serve as control points */
1025 struct rt_ant ant; /**< @brief segments in the annotation */
1026};
1027
1028
1029#define RT_ANNOT_CK_MAGIC(_p) BU_CKMAG(_p, RT_ANNOT_INTERNAL_MAGIC, "rt_annot_internal")
1030/** @} */
1031
1032/*
1033 * ID_DATUM
1034 *
1035 * Datums provide basic geometric reference entities such as reference
1036 * frames, planes, lines, and/or points. A datum reference frame is
1037 * generally a Cartesian coordinate system that consists of three
1038 * mutually perpendicular axes, three mutually perpendicular base
1039 * planes, and a point representing the origin.
1040 *
1041 * Planes distinguished by (!ZERO(w)) utilize 'pnt', 'dir', and 'w' to
1042 * define an unoriented plane. The plane is defined by the vector
1043 * from 'pnt' in 'dir' direction multiplied by the 'w' scalar value.
1044 *
1045 * Lines distinguished by (MAGNITUDE(dir) > 0.0 && ZERO(w)) utilize
1046 * 'pnt' and 'dir' to define a line.
1047 *
1048 * Points only use the 'pnt' field to define an unoriented point.
1049 *
1050 * Datum references are stored as a simple NULL-terminated linked list
1051 * manually accessed through the 'next' pointer.
1052 *
1053 * This characterization is derived from ASME Y14.5M
1054 *
1055 * TODO:
1056 * - edsol needs to do more than move the first datum
1057 * - tedit is untested
1058 * - wdb needs to support more than one datum
1059 * - validate the datum during prep
1060 * - add CK validation checks to all loops
1061 */
1063{
1064 uint32_t magic;
1065
1069
1071};
1072
1073
1074/**
1075 * validation macro to make sure an rt_datum_internal has the proper magic identifier.
1076 */
1077#define RT_DATUM_CK_MAGIC(_p) BU_CKMAG(_p, RT_DATUM_INTERNAL_MAGIC, "rt_datum_internal")
1078
1079
1080/** @addtogroup rt_hrt */
1081/** @{ */
1083{
1084 uint32_t hrt_magic;
1085 point_t v; /**< @brief center point */
1086 vect_t xdir; /**< @brief unit vector in x direction */
1087 vect_t ydir; /**< @brief unit vector in y direction */
1088 vect_t zdir; /**< @brief unit vector in z direction */
1089 fastf_t d; /**< @brief distance to cusps */
1090};
1091#define RT_HRT_CK_MAGIC(_p) BU_CKMAG(_p, RT_HRT_INTERNAL_MAGIC, "rt_hrt_internal")
1092
1093
1094/** @addtogroup rt_script */
1095/** @{ */
1099};
1100#define RT_SCRIPT_CK_MAGIC(_p) BU_CKMAG(_p, RT_SCRIPT_INTERNAL_MAGIC, "rt_script_internal")
1101/** @} */
1102
1103
1104__END_DECLS
1105
1106#endif /* RT_GEOM_H */
1107
1108/** @} */
1109/*
1110 * Local Variables:
1111 * mode: C
1112 * tab-width: 8
1113 * indent-tabs-mode: t
1114 * c-file-style: "stroustrup"
1115 * End:
1116 * ex: shiftwidth=4 tabstop=8
1117 */
Header file for the BRL-CAD common definitions.
int rt_txt_pos_flag(int *pos_flag, int horizontal, int vertical)
#define RT_EBM_NAME_LEN
Definition: geom.h:323
rt_pnt_type
Definition: geom.h:894
@ RT_PNT_TYPE_NRM
Definition: geom.h:898
@ RT_PNT_TYPE_PNT
Definition: geom.h:895
@ RT_PNT_TYPE_SCA_NRM
Definition: geom.h:901
@ RT_PNT_TYPE_COL
Definition: geom.h:896
@ RT_PNT_TYPE_COL_SCA_NRM
Definition: geom.h:902
@ RT_PNT_TYPE_COL_NRM
Definition: geom.h:900
@ RT_PNT_TYPE_COL_SCA
Definition: geom.h:899
@ RT_PNT_UNKNOWN
Definition: geom.h:903
@ RT_PNT_TYPE_SCA
Definition: geom.h:897
#define RT_VOL_NAME_LEN
Definition: geom.h:349
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
Definition: vmath.h:345
double fastf_t
fastest 64-bit (or larger) floating point type
Definition: vmath.h:330
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
Definition: vmath.h:366
fastf_t point2d_t[ELEMENTS_PER_POINT2D]
2-tuple point
Definition: vmath.h:339
fastf_t plane_t[ELEMENTS_PER_PLANE]
Definition of a plane equation.
Definition: vmath.h:393
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition: vmath.h:351
fastf_t vect2d_t[ELEMENTS_PER_VECT2D]
2-tuple vector
Definition: vmath.h:333
Bezier curve segment.
Definition: geom.h:648
int * ctl_points
array of indices for control points
Definition: geom.h:651
int degree
degree of curve (number of control points - 1)
Definition: geom.h:650
uint32_t magic
Definition: geom.h:649
Definition: bitv.h:108
Definition: color.h:54
Definition: list.h:131
Definition: vls.h:53
circular arc segment
Definition: geom.h:622
fastf_t radius
radius < 0.0 -> full circle with start point on circle and "end" at center
Definition: geom.h:625
int center_is_left
flag indicating where center of curvature is. If non-zero, then center is to left of vector from star...
Definition: geom.h:627
int start
Definition: geom.h:624
int orientation
0 -> ccw, !0 -> cw
Definition: geom.h:630
uint32_t magic
Definition: geom.h:623
int center
index of vertex at center of arc (only used by rt_extrude_prep and rt_extrude_shot)
Definition: geom.h:631
int end
indices
Definition: geom.h:624
Face NURBS surface geometry.
Definition: topology.h:392
Definition of a knot vector.
Definition: topology.h:355
line segment
Definition: geom.h:615
int start
Definition: geom.h:617
uint32_t magic
Definition: geom.h:616
int end
indices into sketch's array of vertices
Definition: geom.h:617
NURB curve segment.
Definition: geom.h:636
int * ctl_points
array of indices for control points
Definition: geom.h:642
uint32_t magic
Definition: geom.h:637
struct knot_vector k
knot vector for NURB curve
Definition: geom.h:640
int c_size
number of control points
Definition: geom.h:641
int order
order of NURB curve (degree - 1)
Definition: geom.h:638
int pt_type
type of NURB curve
Definition: geom.h:639
fastf_t * weights
array of weights for control points (NULL if non_rational)
Definition: geom.h:643
struct bu_list l
Definition: geom.h:932
point_t v
Definition: geom.h:933
vect_t n
Definition: geom.h:935
struct bu_color c
Definition: geom.h:934
struct bu_list l
Definition: geom.h:944
struct bu_color c
Definition: geom.h:946
struct bu_list l
Definition: geom.h:926
point_t v
Definition: geom.h:927
struct bu_color c
Definition: geom.h:928
fastf_t s
Definition: geom.h:929
struct bu_list l
Definition: geom.h:911
point_t v
Definition: geom.h:912
struct bu_color c
Definition: geom.h:913
struct bu_list l
Definition: geom.h:921
point_t v
Definition: geom.h:922
vect_t n
Definition: geom.h:923
struct bu_list l
Definition: geom.h:938
point_t v
Definition: geom.h:939
vect_t n
Definition: geom.h:941
fastf_t s
Definition: geom.h:940
struct bu_list l
Definition: geom.h:916
point_t v
Definition: geom.h:917
fastf_t s
Definition: geom.h:918
Definition: geom.h:906
struct bu_list l
Definition: geom.h:907
point_t v
Definition: geom.h:908
point2d_t * verts
array of vertices that serve as control points
Definition: geom.h:1024
uint32_t magic
Definition: geom.h:1021
point_t V
vertex, maps to the origin in the 2D system
Definition: geom.h:1022
size_t vert_count
number of vertices
Definition: geom.h:1023
struct rt_ant ant
segments in the annotation
Definition: geom.h:1025
Definition: geom.h:976
size_t count
number of segments in the annotation
Definition: geom.h:977
void ** segments
array of annotation segment pointer
Definition: geom.h:980
int * reverse
Definition: geom.h:978
point_t pt[8]
Definition: geom.h:193
uint32_t magic
Definition: geom.h:192
plane_t * eqn
Definition: geom.h:411
uint32_t magic
Definition: geom.h:409
size_t neqn
Definition: geom.h:410
fastf_t ** curves
Definition: geom.h:207
size_t pts_per_curve
Definition: geom.h:206
uint32_t magic
Definition: geom.h:204
size_t ncurves
Definition: geom.h:205
unsigned char bot_flags
flags, (indicates surface normals available, for example)
Definition: geom.h:771
fastf_t * normals
array of unit surface normals [num_normals*3]
Definition: geom.h:800
void * tie
Definition: geom.h:829
size_t num_normals
Definition: geom.h:799
size_t num_face_normals
current size of the face_normals array below (number of faces in the array)
Definition: geom.h:804
uint32_t magic
Definition: geom.h:768
struct bu_bitv * face_mode
a flag for each face indicating thickness is appended to hit point in ray direction (if bit is set),...
Definition: geom.h:790
int * face_normals
array of indices into the "normals" array, one per face vertex [num_face_normals*3]
Definition: geom.h:808
fastf_t * uvs
array of floats for uv texturing coordinates [num_uvs*3]
Definition: geom.h:817
unsigned char mode
Definition: geom.h:769
unsigned char orientation
Definition: geom.h:770
int * faces
array of ints for faces [num_faces*3]
Definition: geom.h:776
size_t num_face_uvs
current size of the face_uvs array below (number of faces in the array)
Definition: geom.h:821
size_t num_faces
Definition: geom.h:775
fastf_t * thickness
array of plate mode thicknesses (corresponds to array of faces) NULL for modes RT_BOT_SURFACE and RT_...
Definition: geom.h:785
size_t num_uvs
current size of the vertex uv mappings (corresponds to number of vertices)
Definition: geom.h:813
int * face_uvs
array of indices into the "uvs" array, one per face vertex [num_uvs*3]
Definition: geom.h:825
fastf_t * vertices
array of floats for vertices [num_vertices*3]
Definition: geom.h:781
size_t num_vertices
Definition: geom.h:780
struct bu_list l
Definition: geom.h:834
struct rt_bot_internal * bot
Definition: geom.h:835
ON_Brep * brep
An openNURBS brep object containing the solid.
Definition: geom.h:300
uint32_t magic
Definition: geom.h:298
fastf_t radius
Definition: geom.h:754
uint32_t magic
Definition: geom.h:751
vect_t h
Definition: geom.h:753
fastf_t thickness
zero thickness means volume mode
Definition: geom.h:755
point_t v
Definition: geom.h:752
Definition: geom.h:602
size_t count
Definition: geom.h:603
int * reverse
Definition: geom.h:604
void ** segment
Definition: geom.h:607
uint32_t magic
Definition: geom.h:1064
struct rt_datum_internal * next
Definition: geom.h:1070
point_t pnt
Definition: geom.h:1066
vect_t dir
Definition: geom.h:1067
fastf_t w
Definition: geom.h:1068
unsigned short * dsp_buf
actual data
Definition: geom.h:581
struct rt_db_internal * dsp_bip
db object for data
Definition: geom.h:583
char dsp_datasrc
which type of data source
Definition: geom.h:587
uint32_t magic
Definition: geom.h:562
struct bu_vls dsp_name
Definition: geom.h:564
unsigned char dsp_cuttype
type of cut to make
Definition: geom.h:575
mat_t dsp_stom
solid to model space computed from dsp_mtos
Definition: geom.h:579
uint32_t dsp_xcnt
# samples in row of data
Definition: geom.h:569
mat_t dsp_mtos
model to solid space
Definition: geom.h:577
unsigned short dsp_smooth
bool: surf normal interp
Definition: geom.h:571
uint32_t dsp_ycnt
# of columns in data
Definition: geom.h:570
struct bu_mapped_file * dsp_mp
mapped file for data
Definition: geom.h:582
char name[RT_EBM_NAME_LEN]
Definition: geom.h:326
struct bu_mapped_file * mp
mapped file for data
Definition: geom.h:335
uint32_t xdim
X dimension (w cells)
Definition: geom.h:330
uint32_t magic
Definition: geom.h:325
uint32_t ydim
Y dimension (n cells)
Definition: geom.h:331
char datasrc
which type of data source
Definition: geom.h:339
fastf_t tallness
Z dimension (mm)
Definition: geom.h:332
mat_t mat
convert local coords to model space
Definition: geom.h:333
unsigned char * buf
actual data
Definition: geom.h:334
struct rt_db_internal * bip
db object for data
Definition: geom.h:336
vect_t ehy_Au
unit vector along semi-major axis
Definition: geom.h:515
fastf_t ehy_r1
scalar semi-major axis length
Definition: geom.h:516
fastf_t ehy_r2
scalar semi-minor axis length
Definition: geom.h:517
vect_t ehy_H
height vector
Definition: geom.h:514
point_t ehy_V
ehy vertex
Definition: geom.h:513
fastf_t ehy_c
dist from hyperbola to vertex of asymptotes
Definition: geom.h:518
uint32_t ehy_magic
Definition: geom.h:512
uint32_t magic
Definition: geom.h:97
vect_t a
axis a radial length
Definition: geom.h:99
vect_t c
axis c radial length
Definition: geom.h:101
vect_t b
axis b radial length
Definition: geom.h:100
point_t v
center point
Definition: geom.h:98
vect_t epa_Au
unit vector along semi-major axis
Definition: geom.h:499
uint32_t epa_magic
Definition: geom.h:496
fastf_t epa_r2
scalar semi-minor axis length
Definition: geom.h:501
vect_t epa_H
height vector
Definition: geom.h:498
point_t epa_V
epa vertex
Definition: geom.h:497
fastf_t epa_r1
scalar semi-major axis length
Definition: geom.h:500
vect_t eto_N
vector normal to plane of torus
Definition: geom.h:547
uint32_t eto_magic
Definition: geom.h:545
fastf_t eto_rd
scalar length of semi-minor of ellipse
Definition: geom.h:550
point_t eto_V
eto vertex
Definition: geom.h:546
vect_t eto_C
vector along semi-major axis of ellipse
Definition: geom.h:548
fastf_t eto_r
scalar radius of rotation
Definition: geom.h:549
vect_t u_vec
vector in U parameter direction
Definition: geom.h:705
struct rt_sketch_internal * skt
pointer to referenced sketch
Definition: geom.h:709
uint32_t magic
Definition: geom.h:702
char * sketch_name
name of sketch object that defines the curve to be extruded
Definition: geom.h:708
vect_t h
extrusion vector, may not be in (u_vec X v_vec) plane
Definition: geom.h:704
point_t V
vertex, start and end point of loop to be extruded
Definition: geom.h:703
int keypoint
DEPRECATED (UNUSED): index of keypoint vertex.
Definition: geom.h:707
vect_t v_vec
vector in V parameter direction
Definition: geom.h:706
point_t center
Definition: geom.h:231
uint32_t magic
Definition: geom.h:230
fastf_t mag
Definition: geom.h:234
vect_t normal
Definition: geom.h:233
uint32_t magic
Definition: geom.h:218
plane_t eqn
Definition: geom.h:219
fastf_t ylen
model len of HT rpp in "n" dir
Definition: geom.h:395
char cfile[128]
name of control file (optional)
Definition: geom.h:381
char dfile[128]
name of data file
Definition: geom.h:382
fastf_t xlen
model len of HT rpp in "w" dir
Definition: geom.h:394
uint32_t n
nlines of data file. ("j", "y")
Definition: geom.h:388
struct bu_mapped_file * mp
actual data
Definition: geom.h:398
uint32_t magic
Definition: geom.h:379
char fmt[8]
CV style file format descriptor.
Definition: geom.h:383
vect_t v
origin of HT in model space
Definition: geom.h:391
fastf_t file2mm
scale factor to cvt file units to mm
Definition: geom.h:390
uint32_t w
# samples wide of data file. ("i", "x")
Definition: geom.h:387
fastf_t zscale
scale of data in ''up'' dir (after file2mm is applied)
Definition: geom.h:396
vect_t x
model vect corresponding to "w" dir (will be unitized)
Definition: geom.h:392
uint32_t shorts
!0 --> memory array is short, not float
Definition: geom.h:389
vect_t y
model vect corresponding to "n" dir (will be unitized)
Definition: geom.h:393
vect_t ydir
unit vector in y direction
Definition: geom.h:1087
fastf_t d
distance to cusps
Definition: geom.h:1089
uint32_t hrt_magic
Definition: geom.h:1084
vect_t xdir
unit vector in x direction
Definition: geom.h:1086
point_t v
center point
Definition: geom.h:1085
vect_t zdir
unit vector in z direction
Definition: geom.h:1088
point_t hyp_Vi
hyp vertex
Definition: geom.h:530
fastf_t hyp_bnr
ratio of minimum neck width to base width
Definition: geom.h:534
vect_t hyp_A
semi-major axis
Definition: geom.h:532
uint32_t hyp_magic
Definition: geom.h:529
vect_t hyp_Hi
full height vector
Definition: geom.h:531
fastf_t hyp_b
scalar semi-minor axis length
Definition: geom.h:533
vect_t vector2
Definition: geom.h:252
fastf_t value
Definition: geom.h:253
struct bu_vls reference_path_2
Definition: geom.h:248
vect_t vector1
Definition: geom.h:251
uint32_t magic
Definition: geom.h:245
point_t location
Definition: geom.h:246
struct bu_vls reference_path_1
Definition: geom.h:247
fastf_t initstep
Definition: geom.h:164
fastf_t finalstep
Definition: geom.h:165
struct bu_list metaball_ctrl_head
Definition: geom.h:166
uint32_t magic
Definition: geom.h:157
fastf_t threshold
Definition: geom.h:163
int nsrf
number of surfaces
Definition: geom.h:283
ON_Brep * brep
Definition: geom.h:285
uint32_t magic
Definition: geom.h:282
struct face_g_snurb ** srfs
The surfaces themselves.
Definition: geom.h:284
fastf_t part_vrad
Definition: geom.h:447
point_t part_V
Definition: geom.h:445
int part_type
sphere, cylinder, cone
Definition: geom.h:450
vect_t part_H
Definition: geom.h:446
uint32_t part_magic
Definition: geom.h:444
fastf_t part_hrad
Definition: geom.h:448
has npoly elements
Definition: geom.h:263
size_t npts
number of points for this polygon
Definition: geom.h:264
fastf_t * verts
has 3*npts elements
Definition: geom.h:265
fastf_t * norms
has 3*npts elements
Definition: geom.h:266
size_t max_npts
maximum value of npts in poly[]
Definition: geom.h:273
struct rt_pg_face_internal * poly
has npoly elements
Definition: geom.h:271
uint32_t magic
Definition: geom.h:269
size_t npoly
Definition: geom.h:270
struct bu_list pipe_segs_head
Definition: geom.h:423
uint32_t pipe_magic
Definition: geom.h:422
int pipe_count
Definition: geom.h:425
void * point
Definition: geom.h:957
uint32_t magic
Definition: geom.h:953
unsigned long count
Definition: geom.h:956
double scale
Definition: geom.h:954
rt_pnt_type type
Definition: geom.h:955
point2d_t v2d
vertex in 2d sketch
Definition: geom.h:730
struct bu_vls sketch_name
name of sketch
Definition: geom.h:735
struct rt_sketch_internal * skt
pointer to sketch
Definition: geom.h:736
fastf_t ang
angle to revolve
Definition: geom.h:734
uint32_t magic
Definition: geom.h:726
vect_t r
vector in start plane, x axis
Definition: geom.h:733
vect2d_t axis2d
revolve axis in 2d sketch
Definition: geom.h:731
vect_t axis3d
revolve axis in 3d space, y axis
Definition: geom.h:728
point_t v3d
vertex in 3d space
Definition: geom.h:727
point_t rhc_V
rhc vertex
Definition: geom.h:481
uint32_t rhc_magic
Definition: geom.h:480
vect_t rhc_B
breadth vector
Definition: geom.h:483
vect_t rhc_H
height vector
Definition: geom.h:482
fastf_t rhc_c
dist from hyperbola to vertex of asymptotes
Definition: geom.h:485
fastf_t rhc_r
scalar half-width of rectangular face
Definition: geom.h:484
uint32_t rpc_magic
Definition: geom.h:465
vect_t rpc_B
breadth vector
Definition: geom.h:468
vect_t rpc_H
height vector
Definition: geom.h:467
fastf_t rpc_r
scalar half-width of rectangular face
Definition: geom.h:469
point_t rpc_V
rpc vertex
Definition: geom.h:466
struct bu_vls s_type
Definition: geom.h:1098
uint32_t script_magic
Definition: geom.h:1097
point2d_t * verts
Definition: geom.h:667
vect_t u_vec
Definition: geom.h:660
uint32_t magic
Definition: geom.h:658
point_t V
Definition: geom.h:659
size_t vert_count
Definition: geom.h:666
struct rt_curve curve
Definition: geom.h:671
vect_t v_vec
Definition: geom.h:663
uint32_t magic
Definition: geom.h:682
struct bu_vls file
.g filename, 0-len --> this database.
Definition: geom.h:683
int meth
space partitioning method
Definition: geom.h:685
struct bu_vls treetop
one treetop only
Definition: geom.h:684
const struct db_i * dbip
Definition: geom.h:689
uint32_t magic
Definition: geom.h:112
uint32_t magic
Definition: geom.h:80
vect_t a
Definition: geom.h:83
vect_t c
Definition: geom.h:85
vect_t h
Definition: geom.h:82
vect_t b
Definition: geom.h:84
vect_t d
Definition: geom.h:86
point_t v
Definition: geom.h:81
uint32_t magic
Definition: geom.h:61
vect_t a
r_a length
Definition: geom.h:67
fastf_t r_b
radius in B direction (typ == r_a)
Definition: geom.h:69
vect_t h
normal, unit length
Definition: geom.h:63
vect_t b
r_b length
Definition: geom.h:68
fastf_t r_a
radius in A direction (r1)
Definition: geom.h:65
point_t v
center point
Definition: geom.h:62
fastf_t r_h
radius in H direction (r2)
Definition: geom.h:64
uint32_t zdim
Z dimension.
Definition: geom.h:358
vect_t cellsize
ideal coords: size of each cell
Definition: geom.h:361
unsigned char * map
Definition: geom.h:368
uint32_t xdim
X dimension.
Definition: geom.h:356
uint32_t magic
Definition: geom.h:351
uint32_t ydim
Y dimension.
Definition: geom.h:357
char datasrc
which type of data source
Definition: geom.h:366
char name[RT_VOL_NAME_LEN]
Definition: geom.h:352
uint32_t hi
High threshold.
Definition: geom.h:360
mat_t mat
convert local coords to model space
Definition: geom.h:362
uint32_t lo
Low threshold.
Definition: geom.h:359
struct rt_db_internal * bip
Definition: geom.h:363
Definition: geom.h:987
fastf_t txt_size
Definition: geom.h:992
fastf_t txt_rot_angle
Definition: geom.h:993
struct bu_vls label
Definition: geom.h:991
uint32_t magic
Definition: geom.h:988
int rel_pos
Definition: geom.h:990
int ref_pt
Definition: geom.h:989
point_t coord
Definition: geom.h:174
fastf_t sweat
beta value used for metaball and blob evaluation
Definition: geom.h:173
fastf_t fldstr
field strength
Definition: geom.h:172
point_t coord2
Definition: geom.h:175
struct bu_list l
Definition: geom.h:170
fastf_t pp_bendradius
bend radius to use for a bend at this point
Definition: geom.h:433
point_t pp_coord
"control" point for pipe solid
Definition: geom.h:430
fastf_t pp_id
inner diam, <=0 if solid (wire)
Definition: geom.h:431
struct bu_list l
doubly linked list support
Definition: geom.h:429
fastf_t pp_od
pipe outer diam
Definition: geom.h:432
fundamental vector, matrix, quaternion math macros