BRL-CAD
Loading...
Searching...
No Matches
geom.h
Go to the documentation of this file.
1/* G E O M . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2004-2025 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 "brep.h"
48#include "brep/defines.h"
49
50
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
283 int nsrf; /**< @brief number of surfaces */
284 struct face_g_snurb **srfs; /**< @brief The surfaces themselves */
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 */
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 * TODO - similar questions here as for extrude
324 */
325#define RT_EBM_NAME_LEN 256
329 /* NOTE: xdim/ydim cannot be size_t until rel8 as they are
330 * written out to disk via bu_vls_struct_print() as 32-bit ints.
331 */
332 uint32_t xdim; /**< @brief X dimension (w cells) */
333 uint32_t ydim; /**< @brief Y dimension (n cells) */
334 fastf_t tallness; /**< @brief Z dimension (mm) */
335 mat_t mat; /**< @brief convert local coords to model space */
336 unsigned char *buf; /**< @brief actual data */
337 struct bu_mapped_file *mp; /**< @brief mapped file for data */
338 struct rt_db_internal *bip; /**< @brief db object for data */
339#define RT_EBM_SRC_FILE 'f'
340#define RT_EBM_SRC_OBJ 'o'
341 char datasrc; /**< @brief which type of data source */
343#define RT_EBM_CK_MAGIC(_p) BU_CKMAG(_p, RT_EBM_INTERNAL_MAGIC, "rt_ebm_internal")
344/** @} */
345
346/** @addtogroup rt_vol */
347/** @{ */
348/*
349 * ID_VOL
350 *
351 * TODO - similar questions here as for extrude
352 */
353#define RT_VOL_NAME_LEN 128
354struct rt_vol_internal {
357 /* NOTE: [xyz]dim/lo/hi cannot be size_t until rel8 as they are
358 * written out to disk via bu_vls_struct_print() as 32-bit ints.
359 */
360 uint32_t xdim; /**< @brief X dimension */
361 uint32_t ydim; /**< @brief Y dimension */
362 uint32_t zdim; /**< @brief Z dimension */
363 uint32_t lo; /**< @brief Low threshold */
364 uint32_t hi; /**< @brief High threshold */
365 vect_t cellsize; /**< @brief ideal coords: size of each cell */
366 mat_t mat; /**< @brief convert local coords to model space */
367 struct rt_db_internal *bip; /* @brief db object for data*/
368#define RT_VOL_SRC_FILE 'f'
369#define RT_VOL_SRC_OBJ 'o'
370 char datasrc;/**< @brief which type of data source */
371 /* REMAINING ELEMENTS PROVIDED BY IMPORT, UNUSED BY EXPORT */
372 unsigned char *map;
373};
374#define RT_VOL_CK_MAGIC(_p) BU_CKMAG(_p, RT_VOL_INTERNAL_MAGIC, "rt_vol_internal")
375/** @} */
377/** @addtogroup rt_hf */
378/** @{ */
379/*
380 * ID_HF
381 */
382struct rt_hf_internal {
384 /* BEGIN USER SETTABLE VARIABLES */
385 char cfile[128]; /**< @brief name of control file (optional) */
386 char dfile[128]; /**< @brief name of data file */
387 char fmt[8]; /**< @brief CV style file format descriptor */
388 /* NOTE: w/n/shorts cannot be size_t until rel8 as they are
389 * written out to disk via bu_vls_struct_print() as 32-bit ints.
390 */
391 uint32_t w; /**< @brief # samples wide of data file. ("i", "x") */
392 uint32_t n; /**< @brief nlines of data file. ("j", "y") */
393 uint32_t shorts; /**< @brief !0 --> memory array is short, not float */
394 fastf_t file2mm; /**< @brief scale factor to cvt file units to mm */
395 vect_t v; /**< @brief origin of HT in model space */
396 vect_t x; /**< @brief model vect corresponding to "w" dir (will be unitized) */
397 vect_t y; /**< @brief model vect corresponding to "n" dir (will be unitized) */
398 fastf_t xlen; /**< @brief model len of HT rpp in "w" dir */
399 fastf_t ylen; /**< @brief model len of HT rpp in "n" dir */
400 fastf_t zscale; /**< @brief scale of data in ''up'' dir (after file2mm is applied) */
401 /* END USER SETTABLE VARIABLES, BEGIN INTERNAL STUFF */
402 struct bu_mapped_file *mp; /**< @brief actual data */
403};
404#define RT_HF_CK_MAGIC(_p) BU_CKMAG(_p, RT_HF_INTERNAL_MAGIC, "rt_hf_internal")
405/** @} */
407/** @addtogroup rt_arbn */
408/** @{ */
409/*
410 * ID_ARBN
411 */
412struct rt_arbn_internal {
414 size_t neqn;
417#define RT_ARBN_CK_MAGIC(_p) BU_CKMAG(_p, RT_ARBN_INTERNAL_MAGIC, "rt_arbn_internal")
418/** @} */
420/** @addtogroup rt_pipe */
421/** @{ */
422/*
423 * ID_PIPE
424 */
425struct rt_pipe_internal {
428 /* REMAINING ELEMENTS PROVIDED BY IMPORT, UNUSED BY EXPORT */
430};
431#define RT_PIPE_CK_MAGIC(_p) BU_CKMAG(_p, RT_PIPE_INTERNAL_MAGIC, "rt_pipe_internal")
432struct wdb_pipe_pnt {
433 struct bu_list l; /**< @brief doubly linked list support */
434 point_t pp_coord; /**< @brief "control" point for pipe solid */
435 fastf_t pp_id; /**< @brief inner diam, <=0 if solid (wire) */
436 fastf_t pp_od; /**< @brief pipe outer diam */
437 fastf_t pp_bendradius; /**< @brief bend radius to use for a bend at this point */
439/** @} */
440
441
442/** @addtogroup rt_part */
443/** @{ */
444/*
445 * ID_PARTICLE
446 */
447struct rt_part_internal {
453 /* REMAINING ELEMENTS PROVIDED BY IMPORT, UNUSED BY EXPORT */
454 int part_type; /**< @brief sphere, cylinder, cone */
455};
456#define RT_PART_CK_MAGIC(_p) BU_CKMAG(_p, RT_PART_INTERNAL_MAGIC, "rt_part_internal")
457
458#define RT_PARTICLE_TYPE_SPHERE 1
459#define RT_PARTICLE_TYPE_CYLINDER 2
460#define RT_PARTICLE_TYPE_CONE 3
461/** @} */
463/** @addtogroup rt_rpc */
464/** @{ */
465/*
466 * ID_RPC
467 */
468struct rt_rpc_internal {
470 point_t rpc_V; /**< @brief rpc vertex */
471 vect_t rpc_H; /**< @brief height vector */
472 vect_t rpc_B; /**< @brief breadth vector */
473 fastf_t rpc_r; /**< @brief scalar half-width of rectangular face */
475#define RT_RPC_CK_MAGIC(_p) BU_CKMAG(_p, RT_RPC_INTERNAL_MAGIC, "rt_rpc_internal")
476/** @} */
478/** @addtogroup rt_rhc */
479/** @{ */
480/*
481 * ID_RHC
482 */
483struct rt_rhc_internal {
485 point_t rhc_V; /**< @brief rhc vertex */
486 vect_t rhc_H; /**< @brief height vector */
487 vect_t rhc_B; /**< @brief breadth vector */
488 fastf_t rhc_r; /**< @brief scalar half-width of rectangular face */
489 fastf_t rhc_c; /**< @brief dist from hyperbola to vertex of asymptotes */
491#define RT_RHC_CK_MAGIC(_p) BU_CKMAG(_p, RT_RHC_INTERNAL_MAGIC, "rt_rhc_internal")
492/** @} */
494/** @addtogroup rt_epa */
495/** @{ */
496/*
497 * ID_EPA
498 */
499struct rt_epa_internal {
501 point_t epa_V; /**< @brief epa vertex */
502 vect_t epa_H; /**< @brief height vector */
503 vect_t epa_Au; /**< @brief unit vector along semi-major axis */
504 fastf_t epa_r1; /**< @brief scalar semi-major axis length */
505 fastf_t epa_r2; /**< @brief scalar semi-minor axis length */
507#define RT_EPA_CK_MAGIC(_p) BU_CKMAG(_p, RT_EPA_INTERNAL_MAGIC, "rt_epa_internal")
508/** @} */
510/** @addtogroup rt_ehy */
511/** @{ */
512/*
513 * ID_EHY
514 */
515struct rt_ehy_internal {
517 point_t ehy_V; /**< @brief ehy vertex */
518 vect_t ehy_H; /**< @brief height vector */
519 vect_t ehy_Au; /**< @brief unit vector along semi-major axis */
520 fastf_t ehy_r1; /**< @brief scalar semi-major axis length */
521 fastf_t ehy_r2; /**< @brief scalar semi-minor axis length */
522 fastf_t ehy_c; /**< @brief dist from hyperbola to vertex of asymptotes */
524#define RT_EHY_CK_MAGIC(_p) BU_CKMAG(_p, RT_EHY_INTERNAL_MAGIC, "rt_ehy_internal")
525/** @} */
527/** @addtogroup rt_hyp */
528/** @{ */
529/*
530 * ID_HYP
531 */
532struct rt_hyp_internal {
534 point_t hyp_Vi; /**< @brief hyp vertex */
535 vect_t hyp_Hi; /**< @brief full height vector */
536 vect_t hyp_A; /**< @brief semi-major axis */
537 fastf_t hyp_b; /**< @brief scalar semi-minor axis length */
538 fastf_t hyp_bnr;/**< @brief ratio of minimum neck width to base width */
540#define RT_HYP_CK_MAGIC(_p) BU_CKMAG(_p, RT_HYP_INTERNAL_MAGIC, "rt_hyp_internal")
541/** @} */
543/** @addtogroup rt_eto */
544/** @{ */
545/*
546 * ID_ETO
547 */
548struct rt_eto_internal {
550 point_t eto_V; /**< @brief eto vertex */
551 vect_t eto_N; /**< @brief vector normal to plane of torus */
552 vect_t eto_C; /**< @brief vector along semi-major axis of ellipse */
553 fastf_t eto_r; /**< @brief scalar radius of rotation */
554 fastf_t eto_rd; /**< @brief scalar length of semi-minor of ellipse */
556#define RT_ETO_CK_MAGIC(_p) BU_CKMAG(_p, RT_ETO_INTERNAL_MAGIC, "rt_eto_internal")
557/** @} */
559/** @addtogroup rt_dsp */
560/** @{ */
561/*
562 * ID_DSP
563 *
564 * TODO - similar questions here as for extrude
565 */
566#define DSP_NAME_LEN 128
567struct rt_dsp_internal{
569#define dsp_file dsp_name /**< @brief for backwards compatibility */
570 struct bu_vls dsp_name; /**< TODO: make this a pointer, name of data file */
572 /* NOTE: dsp_xcnt/dsp_ycnt cannot be size_t until rel8 as they are
573 * written out to disk via bu_vls_struct_print() as 32-bit ints.
574 */
575 uint32_t dsp_xcnt; /**< @brief # samples in row of data */
576 uint32_t dsp_ycnt; /**< @brief # of columns in data */
577 unsigned short dsp_smooth; /**< @brief bool: surf normal interp */
578#define DSP_CUT_DIR_ADAPT 'a'
579#define DSP_CUT_DIR_llUR 'l'
580#define DSP_CUT_DIR_ULlr 'L'
581 unsigned char dsp_cuttype; /**< @brief type of cut to make */
583 mat_t dsp_mtos; /**< @brief model to solid space */
584 /* END OF USER SETTABLE VARIABLES, BEGIN INTERNAL STUFF */
585 mat_t dsp_stom; /**< @brief solid to model space
586 * computed from dsp_mtos */
587 unsigned short *dsp_buf; /**< @brief actual data */
588 struct bu_mapped_file *dsp_mp; /**< @brief mapped file for data */
589 struct rt_db_internal *dsp_bip; /**< @brief db object for data */
590#define RT_DSP_SRC_V4_FILE '4'
591#define RT_DSP_SRC_FILE 'f'
592#define RT_DSP_SRC_OBJ 'o'
593 char dsp_datasrc; /**< @brief which type of data source */
595#define RT_DSP_CK_MAGIC(_p) BU_CKMAG(_p, RT_DSP_INTERNAL_MAGIC, "rt_dsp_internal")
596/** @} */
598
599/** @addtogroup rt_sketch */
600/** @{ */
601/*
602 * ID_SKETCH
603 */
604
605/**
606 * container for a set of sketch segments
607 */
608struct rt_curve {
609 size_t count; /**< number of segments in this curve */
610 int *reverse; /**< array of boolean flags indicating if
611 * segment should be reversed
612 */
613 void **segment; /**< array of curve segment pointers */
615
616
617/**
618 * used by the sketch, solid of extrusion and the annotation primitive
619 */
620
621struct line_seg /**< @brief line segment */
622{
624 int start, end; /**< @brief indices into sketch's array of vertices */
626
628struct carc_seg /**< @brief circular arc segment */
629{
631 int start, end; /**< @brief indices */
632 fastf_t radius; /**< @brief radius < 0.0 -> full circle with start point on
633 * circle and "end" at center */
634 int center_is_left; /**< @brief flag indicating where center of curvature is.
635 * If non-zero, then center is to left of vector
636 * from start to end */
637 int orientation; /**< @brief 0 -> ccw, !0 -> cw */
638 int center; /**< @brief index of vertex at center of arc (only used by rt_extrude_prep and rt_extrude_shot) */
639};
640
643 int k_size; /**< @brief knot vector size */
644 fastf_t * knots; /**< @brief pointer to knot vector */
645};
647struct nurb_seg /**< @brief NURB curve segment */
650 int order; /**< @brief order of NURB curve (degree - 1) */
651 int pt_type; /**< @brief type of NURB curve */
652 struct seg_knot_vector k; /**< @brief knot vector for NURB curve */
653 int c_size; /**< @brief number of control points */
654 int *ctl_points; /**< @brief array of indices for control points */
655 fastf_t *weights; /**< @brief array of weights for control points (NULL if non_rational) */
659struct bezier_seg /**< @brief Bezier curve segment */
660{
662 int degree; /**< @brief degree of curve (number of control points - 1) */
663 int *ctl_points; /**< @brief array of indices for control points */
664};
667#define SKETCH_NAME_LEN 16
669{
671 point_t V; /**< default embedding of sketch */
672 vect_t u_vec; /**< unit vector 'u' component
673 * defining the sketch plane
674 */
675 vect_t v_vec; /**< unit vector 'v' component
676 * defining the sketch plane
677 */
678 size_t vert_count; /**< number of sketch vertices */
679 point2d_t *verts; /**< array of 2D vertices that may be
680 * used as endpoints, centers, or
681 * spline control points
682 */
683 struct rt_curve curve; /**< the curves of this sketch */
684};
685#define RT_SKETCH_CK_MAGIC(_p) BU_CKMAG(_p, RT_SKETCH_INTERNAL_MAGIC, "rt_sketch_internal")
686/** @} */
688/** @addtogroup rt_submodel */
689/** @{ */
690/*
691 * ID_SUBMODEL
692 */
695 struct bu_vls file; /**< @brief .g filename, 0-len --> this database. */
696 struct bu_vls treetop; /**< @brief one treetop only */
697 int meth; /**< @brief space partitioning method */
698 /* other option flags (lazy prep, etc.)?? */
699 /* REMAINING ELEMENTS PROVIDED BY IMPORT, UNUSED BY EXPORT */
701 const struct db_i *dbip;
702};
703#define RT_SUBMODEL_CK_MAGIC(_p) BU_CKMAG(_p, RT_SUBMODEL_INTERNAL_MAGIC, "rt_submodel_internal")
704/** @} */
706/** @addtogroup rt_extrude */
707/** @{ */
708/*
709 * ID_EXTRUDE
710 *
711 * TODO - storing an rt_sketch_internal this way, from a data standpoint we would seem to be
712 * divorcing the in-memory copy of the extrude from the database's sketch object - i.e. it
713 * isn't clear whether an edit to the sketch would automatically propagate to the extrude.
714 * If not, the in-memory extrude might become invalid if the database sketch gets edited
715 * after it is defined? Need to investigate...
716 */
717
719{
721 point_t V; /**< @brief vertex, start and end point of loop to be extruded */
722 vect_t h; /**< @brief extrusion vector, may not be in (u_vec X v_vec) plane */
723 vect_t u_vec; /**< @brief vector in U parameter direction */
724 vect_t v_vec; /**< @brief vector in V parameter direction */
725 int keypoint; /**< @brief DEPRECATED (UNUSED): index of keypoint vertex */
726 char *sketch_name; /**< @brief name of sketch object that defines the curve to be extruded */
727 struct rt_sketch_internal *skt; /**< @brief pointer to referenced sketch */
731/**
732 * Note that the u_vec and v_vec are not unit vectors, their magnitude
733 * and direction are used for scaling and rotation.
734 */
735#define RT_EXTRUDE_CK_MAGIC(_p) BU_CKMAG(_p, RT_EXTRUDE_INTERNAL_MAGIC, "rt_extrude_internal")
736/** @} */
737
738/** @addtogroup rt_revolve */
739/** @{ */
741 * ID_REVOLVE
742 *
743 * TODO - same questions as extrude...
744 */
745struct rt_revolve_internal {
747 point_t v3d; /**< @brief vertex in 3d space */
748 vect_t axis3d; /**< @brief revolve axis in 3d space, y axis */
749
750 point2d_t v2d; /**< @brief vertex in 2d sketch */
751 vect2d_t axis2d; /**< @brief revolve axis in 2d sketch */
753 vect_t r; /**< @brief vector in start plane, x axis */
754 fastf_t ang; /**< @brief angle to revolve*/
755 struct bu_vls sketch_name; /**< @brief name of sketch */
756 struct rt_sketch_internal *skt; /**< @brief pointer to sketch */
758#define RT_REVOLVE_CK_MAGIC(_p) BU_CKMAG(_p, RT_REVOLVE_INTERNAL_MAGIC, "rt_revolve_internal")
759/** @} */
761/** @addtogroup rt_cline */
762/** @{ */
763/*
764 * ID_CLINE
765 *
766 * Implementation of FASTGEN CLINE element
767 */
768
770{
772 point_t v;
773 vect_t h;
775 fastf_t thickness; /**< @brief zero thickness means volume mode */
776};
777#define RT_CLINE_CK_MAGIC(_p) BU_CKMAG(_p, RT_CLINE_INTERNAL_MAGIC, "rt_cline_internal")
778/** @} */
780/** @addtogroup rt_bot */
781/** @{ */
782/*
783 * ID_BOT
784 */
785
786struct rt_bot_internal
787{
789 unsigned char mode;
790 unsigned char orientation;
791 unsigned char bot_flags; /**< @brief flags, (indicates surface
792 * normals available, for example)
793 */
795 size_t num_faces;
796 int *faces; /**< @brief array of ints for faces
797 * [num_faces*3]
798 */
799
800 size_t num_vertices;
801 fastf_t *vertices; /**< @brief array of floats for
802 * vertices [num_vertices*3]
803 */
804
805 fastf_t *thickness; /**< @brief array of plate mode
806 * thicknesses (corresponds to array
807 * of faces) NULL for modes
808 * RT_BOT_SURFACE and RT_BOT_SOLID.
809 */
810 struct bu_bitv *face_mode; /**< @brief a flag for each face
811 * indicating thickness is appended to
812 * hit point in ray direction (if bit
813 * is set), otherwise thickness is
814 * centered about hit point (NULL for
815 * modes RT_BOT_SURFACE and
816 * RT_BOT_SOLID).
817 */
818
819 size_t num_normals;
820 fastf_t *normals; /**< @brief array of unit surface
821 * normals [num_normals*3]
822 */
823
824 size_t num_face_normals; /**< @brief current size of the
825 * face_normals array below (number of
826 * faces in the array)
827 */
828 int *face_normals; /**< @brief array of indices into the
829 * "normals" array, one per face
830 * vertex [num_face_normals*3]
831 */
832
833 size_t num_uvs; /**< @brief current size of the vertex
834 * uv mappings (corresponds to number
835 * of vertices)
836 */
837 fastf_t *uvs; /**< @brief array of floats for uv
838 * texturing coordinates [num_uvs*3]
839 */
840
841 size_t num_face_uvs; /**< @brief current size of the
842 * face_uvs array below (number of
843 * faces in the array)
844 */
845 int *face_uvs; /**< @brief array of indices into the
846 * "uvs" array, one per face vertex
847 * [num_uvs*3] */
848
849 void *tie; /* FIXME: blind casting. TIE needs to move from TIE_FUNC to XGLUE before this can not suck. */
850};
852
853struct rt_bot_list {
854 struct bu_list l;
856};
857
858
859/* orientations for BOT */
860#define RT_BOT_UNORIENTED 1 /**< @brief unoriented triangles */
861#define RT_BOT_CCW 2 /**< @brief oriented counter-clockwise */
862#define RT_BOT_CW 3 /**< @brief oriented clockwise */
863
864/* modes for BOT */
865#define RT_BOT_SURFACE 1 /**< @brief triangles represent a surface (no volume) */
866#define RT_BOT_SOLID 2 /**< @brief triangles represent the boundary of a solid object */
868/**
869 * triangles represent plates. Thicknesses are specified in
870 * "thickness" array, and face mode is specified in "face_mode" bit
871 * vector. This is the FASTGEN "plate" mode. Orientation is ignored.
872 */
873#define RT_BOT_PLATE 3
874
875/**
876 * same as plate mode, but LOS is set equal to face thickness, not the
877 * thickness divided by the cosine of the obliquity angle.
878 */
879#define RT_BOT_PLATE_NOCOS 4
881/* flags for bot_flags */
882#define RT_BOT_HAS_SURFACE_NORMALS 0x01 /**< @brief Has surface normals at each face vertex */
883#define RT_BOT_USE_NORMALS 0x02 /**< @brief Use the surface normals if they exist */
884#define RT_BOT_USE_FLOATS 0x04 /**< @brief Use the single precision version of "tri_specific" during prep */
885#define RT_BOT_HAS_TEXTURE_UVS 0x08 /**< @brief Has uv texture coordinates at each face vertex */
886#define RT_BOT_HAS_UNUSED1 0x10 /**< @brief TBD */
887#define RT_BOT_HAS_UNUSED2 0x20 /**< @brief TBD */
888#define RT_BOT_HAS_UNUSED3 0x40 /**< @brief TBD */
889#define RT_BOT_HAS_UNUSED4 0x80 /**< @brief WARNING: use this flag to denote more bits in the export serialization */
891#define RT_BOT_CK_MAGIC(_p) BU_CKMAG(_p, RT_BOT_INTERNAL_MAGIC, "rt_bot_internal")
892/** @} */
895/** @addtogroup rt_pnt */
896/** @{ */
897/**
898 * ID_PNTS
899 *
900 * Points are represented to a structure that contains exactly the
901 * data that it needs for that 'type' of point. The reason this was
902 * done over using something like a union was to fully optimize memory
903 * usage so that the maximum number of points could be stored without
904 * resorting to out-of-core techniques. A union is at least the size
905 * of the largest type and would have wasted memory.
906 *
907 * By using this data-driven approach of type identification, it does
908 * result in needing to have a switching table for all supported types
909 * in order to access data. This could be avoided by storing them as
910 * multiple lists (wasting a few bytes for unused pointers) but is
911 * left as an exercise to the reader.
912 */
913
914typedef enum {
915 RT_PNT_TYPE_PNT = 0,
916 RT_PNT_TYPE_COL = 0+1,
917 RT_PNT_TYPE_SCA = 0+2,
918 RT_PNT_TYPE_NRM = 0+4,
919 RT_PNT_TYPE_COL_SCA = 0+1+2,
920 RT_PNT_TYPE_COL_NRM = 0+1+4,
932 point_t v;
933 struct bu_color c;
935struct pnt_scale {
936 struct bu_list l;
977 void *point;
978};
979#define RT_PNTS_CK_MAGIC(_p) BU_CKMAG(_p, RT_PNTS_INTERNAL_MAGIC, "rt_pnts_internal")
980/** @} */
982/** @addtogroup rt_annotation */
983/** @{ */
985 * ID_ANNO
987 * Annotations are used to provide labels in-scene when viewing
988 * geometry. Leaders connect labels to geometry objects or fixed
989 * points in space.
990 *
991 */
992
993/**
994 * container for the annotation primitive
995 */
996struct rt_ant {
997 size_t count; /**< @brief number of segments in the annotation */
998 int *reverse; /**< array of boolean flags indicating if the
999 * segment should be reversed */
1000 void **segments; /**< @brief array of annotation segment pointer */
1001};
1002
1005 * text labels used by the annotation primitive
1006 */
1007struct txt_seg {
1009 int ref_pt; /** reference point */
1010 int rel_pos; /** flag describing position relative to ref_pt */
1011 struct bu_vls label;
1012 fastf_t txt_size; /** text size */
1013 fastf_t txt_rot_angle; /** text rotation angle */
1018 * placement flags
1020#define RT_TXT_POS_BL 1
1021#define RT_TXT_POS_BC 2
1022#define RT_TXT_POS_BR 3
1023#define RT_TXT_POS_ML 4
1024#define RT_TXT_POS_MC 5
1025#define RT_TXT_POS_MR 6
1026#define RT_TXT_POS_TL 7
1027#define RT_TXT_POS_TC 8
1028#define RT_TXT_POS_TR 9
1031 * set a position flag to the corresponding placement value given
1032 * numeric settings (1=left/top, 2=middle/center, 3=right/bottom).
1036/**
1037 * internal representation of an annotation object
1038 */
1039struct rt_annot_internal
1040{
1042 point_t V; /**< @brief vertex, maps to the origin in the 2D system */
1043 size_t vert_count; /**< @brief number of vertices */
1044 point2d_t *verts; /**< @brief array of vertices that serve as control points */
1045 struct rt_ant ant; /**< @brief segments in the annotation */
1047
1049#define RT_ANNOT_CK_MAGIC(_p) BU_CKMAG(_p, RT_ANNOT_INTERNAL_MAGIC, "rt_annot_internal")
1050/** @} */
1053 * ID_DATUM
1054 *
1055 * Datums provide basic geometric reference entities such as reference
1056 * frames, planes, lines, and/or points. A datum reference frame is
1057 * generally a Cartesian coordinate system that consists of three
1058 * mutually perpendicular axes, three mutually perpendicular base
1059 * planes, and a point representing the origin.
1060 *
1061 * Planes distinguished by (!ZERO(w)) utilize 'pnt', 'dir', and 'w' to
1062 * define an unoriented plane. The plane is defined by the vector
1063 * from 'pnt' in 'dir' direction multiplied by the 'w' scalar value.
1064 *
1065 * Lines distinguished by (MAGNITUDE(dir) > 0.0 && ZERO(w)) utilize
1066 * 'pnt' and 'dir' to define a line.
1067 *
1068 * Points only use the 'pnt' field to define an unoriented point.
1069 *
1070 * Datum references are stored as a simple NULL-terminated linked list
1071 * manually accessed through the 'next' pointer.
1072 *
1073 * This characterization is derived from ASME Y14.5M
1074 *
1075 * TODO:
1076 * - edsol needs to do more than move the first datum
1077 * - tedit is untested
1078 * - wdb needs to support more than one datum
1079 * - validate the datum during prep
1080 * - add CK validation checks to all loops
1081 */
1082struct rt_datum_internal
1083{
1085
1086 point_t pnt;
1087 vect_t dir;
1088 fastf_t w;
1089
1091};
1093
1095 * validation macro to make sure an rt_datum_internal has the proper magic identifier.
1097#define RT_DATUM_CK_MAGIC(_p) BU_CKMAG(_p, RT_DATUM_INTERNAL_MAGIC, "rt_datum_internal")
1099
1100/** @addtogroup rt_hrt */
1101/** @{ */
1102struct rt_hrt_internal
1103{
1105 point_t v; /**< @brief center point */
1106 vect_t xdir; /**< @brief unit vector in x direction */
1107 vect_t ydir; /**< @brief unit vector in y direction */
1108 vect_t zdir; /**< @brief unit vector in z direction */
1109 fastf_t d; /**< @brief distance to cusps */
1111#define RT_HRT_CK_MAGIC(_p) BU_CKMAG(_p, RT_HRT_INTERNAL_MAGIC, "rt_hrt_internal")
1114/** @addtogroup rt_script */
1115/** @{ */
1118 struct bu_vls s_type;
1120#define RT_SCRIPT_CK_MAGIC(_p) BU_CKMAG(_p, RT_SCRIPT_INTERNAL_MAGIC, "rt_script_internal")
1121/** @} */
1122
1123
1126#endif /* RT_GEOM_H */
1127
1128/** @} */
1129/*
1130 * Local Variables:
1131 * mode: C
1132 * tab-width: 8
1133 * indent-tabs-mode: t
1134 * c-file-style: "stroustrup"
1135 * End:
1136 * ex: shiftwidth=4 tabstop=8
1137 */
Definition dvec.h:74
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:326
rt_pnt_type
Definition geom.h:921
@ RT_PNT_TYPE_NRM
Definition geom.h:925
@ RT_PNT_TYPE_PNT
Definition geom.h:922
@ RT_PNT_TYPE_SCA_NRM
Definition geom.h:928
@ RT_PNT_TYPE_COL
Definition geom.h:923
@ RT_PNT_TYPE_COL_SCA_NRM
Definition geom.h:929
@ RT_PNT_TYPE_COL_NRM
Definition geom.h:927
@ RT_PNT_TYPE_COL_SCA
Definition geom.h:926
@ RT_PNT_UNKNOWN
Definition geom.h:930
@ RT_PNT_TYPE_SCA
Definition geom.h:924
#define RT_VOL_NAME_LEN
Definition geom.h:355
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
Definition vmath.h:349
double fastf_t
fastest 64-bit (or larger) floating point type
Definition vmath.h:334
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
Definition vmath.h:370
fastf_t point2d_t[ELEMENTS_PER_POINT2D]
2-tuple point
Definition vmath.h:343
fastf_t plane_t[ELEMENTS_PER_PLANE]
Definition of a plane equation.
Definition vmath.h:397
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition vmath.h:355
fastf_t vect2d_t[ELEMENTS_PER_VECT2D]
2-tuple vector
Definition vmath.h:337
Bezier curve segment.
Definition geom.h:664
int * ctl_points
array of indices for control points
Definition geom.h:667
int degree
degree of curve (number of control points - 1)
Definition geom.h:666
uint32_t magic
Definition geom.h:665
Definition vls.h:53
circular arc segment
Definition geom.h:633
fastf_t radius
radius < 0.0 -> full circle with start point on circle and "end" at center
Definition geom.h:636
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:638
int start
Definition geom.h:635
int orientation
0 -> ccw, !0 -> cw
Definition geom.h:641
uint32_t magic
Definition geom.h:634
int center
index of vertex at center of arc (only used by rt_extrude_prep and rt_extrude_shot)
Definition geom.h:642
int end
indices
Definition geom.h:635
Face NURBS surface geometry.
Definition topology.h:392
line segment
Definition geom.h:626
int start
Definition geom.h:628
uint32_t magic
Definition geom.h:627
int end
indices into sketch's array of vertices
Definition geom.h:628
NURB curve segment.
Definition geom.h:652
int * ctl_points
array of indices for control points
Definition geom.h:658
uint32_t magic
Definition geom.h:653
struct seg_knot_vector k
knot vector for NURB curve
Definition geom.h:656
int c_size
number of control points
Definition geom.h:657
int order
order of NURB curve (degree - 1)
Definition geom.h:654
int pt_type
type of NURB curve
Definition geom.h:655
fastf_t * weights
array of weights for control points (NULL if non_rational)
Definition geom.h:659
struct bu_list l
Definition geom.h:959
point_t v
Definition geom.h:960
struct bu_color c
Definition geom.h:961
struct bu_list l
Definition geom.h:971
struct bu_color c
Definition geom.h:973
struct bu_list l
Definition geom.h:953
point_t v
Definition geom.h:954
struct bu_color c
Definition geom.h:955
fastf_t s
Definition geom.h:956
struct bu_list l
Definition geom.h:938
point_t v
Definition geom.h:939
struct bu_color c
Definition geom.h:940
struct bu_list l
Definition geom.h:948
point_t v
Definition geom.h:949
vect_t n
Definition geom.h:950
struct bu_list l
Definition geom.h:965
point_t v
Definition geom.h:966
fastf_t s
Definition geom.h:967
struct bu_list l
Definition geom.h:943
point_t v
Definition geom.h:944
fastf_t s
Definition geom.h:945
Definition geom.h:933
struct bu_list l
Definition geom.h:934
point_t v
Definition geom.h:935
point2d_t * verts
array of vertices that serve as control points
Definition geom.h:1051
uint32_t magic
Definition geom.h:1048
point_t V
vertex, maps to the origin in the 2D system
Definition geom.h:1049
size_t vert_count
number of vertices
Definition geom.h:1050
struct rt_ant ant
segments in the annotation
Definition geom.h:1052
size_t count
number of segments in the annotation
Definition geom.h:1004
void ** segments
array of annotation segment pointer
Definition geom.h:1007
int * reverse
Definition geom.h:1005
point_t pt[8]
Definition geom.h:193
uint32_t magic
Definition geom.h:192
plane_t * eqn
Definition geom.h:417
uint32_t magic
Definition geom.h:415
size_t neqn
Definition geom.h:416
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:797
fastf_t * normals
array of unit surface normals [num_normals*3]
Definition geom.h:826
void * tie
Definition geom.h:855
size_t num_normals
Definition geom.h:825
size_t num_face_normals
current size of the face_normals array below (number of faces in the array)
Definition geom.h:830
uint32_t magic
Definition geom.h:794
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:816
int * face_normals
array of indices into the "normals" array, one per face vertex [num_face_normals*3]
Definition geom.h:834
fastf_t * uvs
array of floats for uv texturing coordinates [num_uvs*3]
Definition geom.h:843
unsigned char mode
Definition geom.h:795
unsigned char orientation
Definition geom.h:796
int * faces
array of ints for faces [num_faces*3]
Definition geom.h:802
size_t num_face_uvs
current size of the face_uvs array below (number of faces in the array)
Definition geom.h:847
size_t num_faces
Definition geom.h:801
fastf_t * thickness
array of plate mode thicknesses (corresponds to array of faces) NULL for modes RT_BOT_SURFACE and RT_...
Definition geom.h:811
size_t num_uvs
current size of the vertex uv mappings (corresponds to number of vertices)
Definition geom.h:839
int * face_uvs
array of indices into the "uvs" array, one per face vertex [num_uvs*3]
Definition geom.h:851
fastf_t * vertices
array of floats for vertices [num_vertices*3]
Definition geom.h:807
size_t num_vertices
Definition geom.h:806
struct bu_list l
Definition geom.h:861
struct rt_bot_internal * bot
Definition geom.h:862
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:780
uint32_t magic
Definition geom.h:777
fastf_t thickness
zero thickness means volume mode
Definition geom.h:781
point_t v
Definition geom.h:778
size_t count
Definition geom.h:613
int * reverse
Definition geom.h:614
void ** segment
Definition geom.h:617
uint32_t magic
Definition geom.h:1092
struct rt_datum_internal * next
Definition geom.h:1098
point_t pnt
Definition geom.h:1094
unsigned short * dsp_buf
actual data
Definition geom.h:591
struct rt_db_internal * dsp_bip
db object for data
Definition geom.h:593
char dsp_datasrc
which type of data source
Definition geom.h:597
uint32_t magic
Definition geom.h:571
struct bu_vls dsp_name
Definition geom.h:573
unsigned char dsp_cuttype
type of cut to make
Definition geom.h:585
mat_t dsp_stom
solid to model space computed from dsp_mtos
Definition geom.h:589
uint32_t dsp_xcnt
# samples in row of data
Definition geom.h:579
mat_t dsp_mtos
model to solid space
Definition geom.h:587
unsigned short dsp_smooth
bool: surf normal interp
Definition geom.h:581
uint32_t dsp_ycnt
# of columns in data
Definition geom.h:580
struct bu_mapped_file * dsp_mp
mapped file for data
Definition geom.h:592
char name[RT_EBM_NAME_LEN]
Definition geom.h:329
struct bu_mapped_file * mp
mapped file for data
Definition geom.h:338
uint32_t xdim
X dimension (w cells)
Definition geom.h:333
uint32_t magic
Definition geom.h:328
uint32_t ydim
Y dimension (n cells)
Definition geom.h:334
char datasrc
which type of data source
Definition geom.h:342
fastf_t tallness
Z dimension (mm)
Definition geom.h:335
mat_t mat
convert local coords to model space
Definition geom.h:336
unsigned char * buf
actual data
Definition geom.h:337
struct rt_db_internal * bip
db object for data
Definition geom.h:339
vect_t ehy_Au
unit vector along semi-major axis
Definition geom.h:521
fastf_t ehy_r1
scalar semi-major axis length
Definition geom.h:522
fastf_t ehy_r2
scalar semi-minor axis length
Definition geom.h:523
vect_t ehy_H
height vector
Definition geom.h:520
point_t ehy_V
ehy vertex
Definition geom.h:519
fastf_t ehy_c
dist from hyperbola to vertex of asymptotes
Definition geom.h:524
uint32_t ehy_magic
Definition geom.h:518
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:505
uint32_t epa_magic
Definition geom.h:502
fastf_t epa_r2
scalar semi-minor axis length
Definition geom.h:507
vect_t epa_H
height vector
Definition geom.h:504
point_t epa_V
epa vertex
Definition geom.h:503
fastf_t epa_r1
scalar semi-major axis length
Definition geom.h:506
vect_t eto_N
vector normal to plane of torus
Definition geom.h:553
uint32_t eto_magic
Definition geom.h:551
fastf_t eto_rd
scalar length of semi-minor of ellipse
Definition geom.h:556
point_t eto_V
eto vertex
Definition geom.h:552
vect_t eto_C
vector along semi-major axis of ellipse
Definition geom.h:554
fastf_t eto_r
scalar radius of rotation
Definition geom.h:555
vect_t u_vec
vector in U parameter direction
Definition geom.h:728
struct rt_sketch_internal * skt
pointer to referenced sketch
Definition geom.h:732
uint32_t magic
Definition geom.h:725
char * sketch_name
name of sketch object that defines the curve to be extruded
Definition geom.h:731
vect_t h
extrusion vector, may not be in (u_vec X v_vec) plane
Definition geom.h:727
point_t V
vertex, start and end point of loop to be extruded
Definition geom.h:726
int keypoint
DEPRECATED (UNUSED): index of keypoint vertex.
Definition geom.h:730
vect_t v_vec
vector in V parameter direction
Definition geom.h:729
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:401
char cfile[128]
name of control file (optional)
Definition geom.h:387
char dfile[128]
name of data file
Definition geom.h:388
fastf_t xlen
model len of HT rpp in "w" dir
Definition geom.h:400
uint32_t n
nlines of data file. ("j", "y")
Definition geom.h:394
struct bu_mapped_file * mp
actual data
Definition geom.h:404
uint32_t magic
Definition geom.h:385
char fmt[8]
CV style file format descriptor.
Definition geom.h:389
vect_t v
origin of HT in model space
Definition geom.h:397
fastf_t file2mm
scale factor to cvt file units to mm
Definition geom.h:396
uint32_t w
# samples wide of data file. ("i", "x")
Definition geom.h:393
fastf_t zscale
scale of data in ''up'' dir (after file2mm is applied)
Definition geom.h:402
vect_t x
model vect corresponding to "w" dir (will be unitized)
Definition geom.h:398
uint32_t shorts
!0 --> memory array is short, not float
Definition geom.h:395
vect_t y
model vect corresponding to "n" dir (will be unitized)
Definition geom.h:399
vect_t ydir
unit vector in y direction
Definition geom.h:1115
fastf_t d
distance to cusps
Definition geom.h:1117
uint32_t hrt_magic
Definition geom.h:1112
vect_t xdir
unit vector in x direction
Definition geom.h:1114
point_t v
center point
Definition geom.h:1113
vect_t zdir
unit vector in z direction
Definition geom.h:1116
point_t hyp_Vi
hyp vertex
Definition geom.h:536
fastf_t hyp_bnr
ratio of minimum neck width to base width
Definition geom.h:540
vect_t hyp_A
semi-major axis
Definition geom.h:538
uint32_t hyp_magic
Definition geom.h:535
vect_t hyp_Hi
full height vector
Definition geom.h:537
fastf_t hyp_b
scalar semi-minor axis length
Definition geom.h:539
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:453
point_t part_V
Definition geom.h:451
int part_type
sphere, cylinder, cone
Definition geom.h:456
vect_t part_H
Definition geom.h:452
uint32_t part_magic
Definition geom.h:450
fastf_t part_hrad
Definition geom.h:454
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:429
uint32_t pipe_magic
Definition geom.h:428
void * point
Definition geom.h:984
uint32_t magic
Definition geom.h:980
unsigned long count
Definition geom.h:983
double scale
Definition geom.h:981
rt_pnt_type type
Definition geom.h:982
point2d_t v2d
vertex in 2d sketch
Definition geom.h:756
struct bu_vls sketch_name
name of sketch
Definition geom.h:761
struct rt_sketch_internal * skt
pointer to sketch
Definition geom.h:762
fastf_t ang
angle to revolve
Definition geom.h:760
uint32_t magic
Definition geom.h:752
vect_t r
vector in start plane, x axis
Definition geom.h:759
vect2d_t axis2d
revolve axis in 2d sketch
Definition geom.h:757
vect_t axis3d
revolve axis in 3d space, y axis
Definition geom.h:754
point_t v3d
vertex in 3d space
Definition geom.h:753
point_t rhc_V
rhc vertex
Definition geom.h:487
uint32_t rhc_magic
Definition geom.h:486
vect_t rhc_B
breadth vector
Definition geom.h:489
vect_t rhc_H
height vector
Definition geom.h:488
fastf_t rhc_c
dist from hyperbola to vertex of asymptotes
Definition geom.h:491
fastf_t rhc_r
scalar half-width of rectangular face
Definition geom.h:490
uint32_t rpc_magic
Definition geom.h:471
vect_t rpc_B
breadth vector
Definition geom.h:474
vect_t rpc_H
height vector
Definition geom.h:473
fastf_t rpc_r
scalar half-width of rectangular face
Definition geom.h:475
point_t rpc_V
rpc vertex
Definition geom.h:472
struct bu_vls s_type
Definition geom.h:1126
uint32_t script_magic
Definition geom.h:1125
point2d_t * verts
Definition geom.h:683
uint32_t magic
Definition geom.h:674
size_t vert_count
Definition geom.h:682
struct rt_curve curve
Definition geom.h:687
uint32_t magic
Definition geom.h:698
struct bu_vls file
.g filename, 0-len --> this database.
Definition geom.h:699
int meth
space partitioning method
Definition geom.h:701
struct bu_vls treetop
one treetop only
Definition geom.h:700
const struct db_i * dbip
Definition geom.h:705
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:364
vect_t cellsize
ideal coords: size of each cell
Definition geom.h:367
unsigned char * map
Definition geom.h:374
uint32_t xdim
X dimension.
Definition geom.h:362
uint32_t magic
Definition geom.h:357
uint32_t ydim
Y dimension.
Definition geom.h:363
char datasrc
which type of data source
Definition geom.h:372
char name[RT_VOL_NAME_LEN]
Definition geom.h:358
uint32_t hi
High threshold.
Definition geom.h:366
mat_t mat
convert local coords to model space
Definition geom.h:368
uint32_t lo
Low threshold.
Definition geom.h:365
struct rt_db_internal * bip
Definition geom.h:369
fastf_t * knots
pointer to knot vector
Definition geom.h:648
int k_size
knot vector size
Definition geom.h:647
fastf_t txt_size
Definition geom.h:1019
fastf_t txt_rot_angle
Definition geom.h:1020
struct bu_vls label
Definition geom.h:1018
uint32_t magic
Definition geom.h:1015
int rel_pos
Definition geom.h:1017
int ref_pt
Definition geom.h:1016
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:439
point_t pp_coord
"control" point for pipe solid
Definition geom.h:436
fastf_t pp_id
inner diam, <=0 if solid (wire)
Definition geom.h:437
struct bu_list l
doubly linked list support
Definition geom.h:435
fastf_t pp_od
pipe outer diam
Definition geom.h:438
fundamental vector, matrix, quaternion math macros