BRL-CAD
defines.h
Go to the documentation of this file.
1/* B V I E W . H
2 * BRL-CAD
3 *
4 * Copyright (c) 1993-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 bv_defines
21 *
22 * This header is intended to be independent of any one BRL-CAD library and is
23 * specifically intended to allow the easy definition of common display list
24 * types between otherwise independent libraries (libdm and libged, for
25 * example).
26 *
27 *
28 * NEXT STEPS: get a selection set for the view organized, add commands that
29 * allow the view2 command to create(view) and select (view or solid) objects,
30 * and figure out how to allow per-object xy handling callbacks. (The latter
31 * will probably in the end be how we implement primitive editing as well...)
32 *
33 * Test case will be the polygon circle - create and resize. May want to
34 * switch the container being used from a raw array to a bu_ptbl... eventually
35 * would probably be better to have polygons be first class view scene
36 * objects...
37 *
38 */
39#ifndef BV_DEFINES_H
40#define BV_DEFINES_H
41
42#include "common.h"
43#include "vmath.h"
44#include "bu/list.h"
45#include "bu/vls.h"
46#include "bu/ptbl.h"
47
48/** @{ */
49/** @file bv.h */
50
51#ifndef BV_EXPORT
52# if defined(BV_DLL_EXPORTS) && defined(BV_DLL_IMPORTS)
53# error "Only BV_DLL_EXPORTS or BV_DLL_IMPORTS can be defined, not both."
54# elif defined(BV_DLL_EXPORTS)
55# define BV_EXPORT COMPILER_DLLEXPORT
56# elif defined(BV_DLL_IMPORTS)
57# define BV_EXPORT COMPILER_DLLIMPORT
58# else
59# define BV_EXPORT
60# endif
61#endif
62
63#include "bg/polygon_types.h"
64#include "bv/tcl_data.h"
65#include "bv/faceplate.h"
66
67__BEGIN_DECLS
68
69#define BV_MINVIEWSIZE 0.0001
70#define BV_MINVIEWSCALE 0.00005
71
72#ifndef UP
73# define UP 0
74#endif
75#ifndef DOWN
76# define DOWN 1
77#endif
78
79#define BV_ANCHOR_AUTO 0
80#define BV_ANCHOR_BOTTOM_LEFT 1
81#define BV_ANCHOR_BOTTOM_CENTER 2
82#define BV_ANCHOR_BOTTOM_RIGHT 3
83#define BV_ANCHOR_MIDDLE_LEFT 4
84#define BV_ANCHOR_MIDDLE_CENTER 5
85#define BV_ANCHOR_MIDDLE_RIGHT 6
86#define BV_ANCHOR_TOP_LEFT 7
87#define BV_ANCHOR_TOP_CENTER 8
88#define BV_ANCHOR_TOP_RIGHT 9
89struct bv_label {
90 int size;
91 struct bu_vls label;
92 point_t p; // 3D base of label text
93 int line_flag; // If 1, draw a line from label anchor to target
95 int anchor; // Either closest candidate to target (AUTO), or fixed
96 int arrow; // If 1, use an arrow indicating direction from label to target
97};
98
99
100/* Note - this container holds information both for data axes and for
101 * the more elaborate visuals associated with the Archer style model axes.
102 * The latter is a superset of the former, so there should be no need for
103 * a separate data type. */
104struct bv_axes {
105 int draw;
106 point_t axes_pos; /* in model coordinates */
107 fastf_t axes_size; /* in view coordinates for HUD drawing-mode axes */
108 int line_width; /* in pixels */
110
111 /* The following are (currently) only used when drawing
112 * the faceplace HUD axes */
118 int tick_length; /* in pixels */
119 int tick_major_length; /* in pixels */
125};
126
127// Many settings have defaults at the view level, and may be overridden for
128// individual scene objects.
129//
130// TODO - once this settles down, it will probably warrant a bu_structparse
131// for value setting
133
134 int s_dmode; /**< @brief draw mode: 0 - wireframe
135 * 1 - shaded bots and polysolids only (booleans NOT evaluated)
136 * 2 - shaded (booleans NOT evaluated)
137 * 3 - shaded (booleans evaluated)
138 * 4 - hidden line
139 */
140 fastf_t transparency; /**< @brief holds a transparency value in the range [0.0, 1.0] - 1 is opaque */
141
143 unsigned char color[3]; /**< @brief color to draw as */
144
145 int s_line_width; /**< @brief current line width */
146 fastf_t s_arrow_tip_length; /**< @brief arrow tip length */
147 fastf_t s_arrow_tip_width; /**< @brief arrow tip width */
148 int draw_solid_lines_only; /**< @brief do not use dashed lines for subtraction solids */
149 int draw_non_subtract_only; /**< @brief do not visualize subtraction solids */
150};
151#define BV_OBJ_SETTINGS_INIT {0, 1.0, 0, {255, 0, 0}, 1, 0.0, 0.0, 0, 0}
152
153
154/* Note that it is possible for a view object to be view-only (not
155 * corresponding directly to the wireframe of a database shape) but also based
156 * off of database data. Evaluated shaded objects would be an example, as
157 * would NIRT solid shotline visualizations or overlap visualizations. The
158 * categorizations for the various types of bv_scene_obj objects would be:
159 *
160 * solid wireframe/triangles (obj.s): BV_DBOBJ_BASED
161 * rtcheck overlap visual: BV_DBOBJ_BASED & BV_VIEWONLY
162 * polygon/line/label: BV_VIEWONLY
163 *
164 * The distinction between objects (lines, labels, etc.) defined as
165 * bv_scene_obj VIEW ONLY objects and the faceplate elements is objects
166 * defined as bv_scene_obj objects DO exist in the 3D scene, and will move
167 * as 3D elements when the view is manipulated (although label text is drawn
168 * parallel to the view plane.) Faceplate elements exist ONLY in the HUD and
169 * are not managed as bv_scene_obj objects - they will not move with view
170 * manipulation.
171 */
172#define BV_DBOBJ_BASED 0x01
173#define BV_VIEWONLY 0x02
174#define BV_LINES 0x04
175#define BV_LABELS 0x08
176#define BV_AXES 0x10
177#define BV_POLYGONS 0x20
178#define BV_MESH_LOD 0x40
179#define BV_CSG_LOD 0x80
180
181struct bview;
182
183#define BV_DB_OBJS 0x01
184#define BV_VIEW_OBJS 0x02
185#define BV_LOCAL_OBJS 0x04
186
187struct bv_scene_obj_internal;
188
190 struct bu_list l;
191
192 /* Internal implementation storage */
193 struct bv_scene_obj_internal *i;
194
195 /* View object name and type id */
196 unsigned long long s_type_flags;
197 struct bu_vls s_name; /**< @brief object name (may not be unique, used for activities like path lookup) */
198 void *s_path; /**< @brief alternative (app specific) encoding of s_name */
199 struct bu_vls s_uuid; /**< @brief object name (unique, may be less immediately clear to user) */
200 mat_t s_mat; /**< @brief mat to use for internal lookup and mesh LoD drawing */
201
202 /* Associated bv. Note that scene objects are not assigned uniquely to
203 * one view. This value may be changed by the application in a multi-view
204 * scenario as an object is edited from multiple different views, to supply
205 * the necessary view context for editing. If the object needs to retain
206 * knowledge of its original/creation view, it should save that info
207 * internally in its s_i_data container. */
208 struct bview *s_v;
209
210 /* Knowledge of how to create/update s_vlist and the other 3D geometry data, as well as
211 * manage any custom data specific to this object */
212 void *s_i_data; /**< @brief custom view data (bv_line_seg, bv_label, bv_polyon, etc) */
213 int (*s_update_callback)(struct bv_scene_obj *, struct bview *, int); /**< @brief custom update/generator for s_vlist */
214 void (*s_free_callback)(struct bv_scene_obj *); /**< @brief free any info stored in s_i_data, s_path and draw_data */
215
216 /* 3D vector list geometry data */
217 struct bu_list s_vlist; /**< @brief Pointer to unclipped vector list */
218 size_t s_vlen; /**< @brief Number of actual cmd[] entries in vlist */
219
220 /* Display lists accelerate drawing when we can use them */
221 unsigned int s_dlist; /**< @brief display list index */
222 int s_dlist_mode; /**< @brief drawing mode in which display list was generated (if it doesn't match s_os.s_dmode, dlist is out of date.) */
223 int s_dlist_stale; /**< @brief set by client codes when dlist is out of date - dm must update. */
224 void (*s_dlist_free_callback)(struct bv_scene_obj *); /**< @brief free any dlist specific data */
225
226 /* 3D geometry metadata */
227 fastf_t s_size; /**< @brief Distance across solid, in model space */
228 fastf_t s_csize; /**< @brief Dist across clipped solid (model space) */
229 vect_t s_center; /**< @brief Center point of solid, in model space */
230 int s_displayobj; /**< @brief Vector list contains vertices in display context flag */
233
234 /* Display properties */
235 char s_flag; /**< @brief UP = object visible, DOWN = obj invis */
236 char s_iflag; /**< @brief UP = illuminated, DOWN = regular */
237 unsigned char s_color[3]; /**< @brief color to draw as */
238 int s_soldash; /**< @brief solid/dashed line flag: 0 = solid, 1 = dashed*/
239 int s_arrow; /**< @brief arrow flag for view object drawing routines */
240 int s_changed; /**< @brief changed flag - set by s_update_callback if a change occurred */
242
243 /* Adaptive plotting info.
244 *
245 * The adaptive wireframe flag is set if the wireframe was created while
246 * adaptive mode is on - this is to allow reversion to non-adaptive
247 * wireframes if the mode is switched off without the view scale changing.
248 *
249 * NOTE: We store the following NOT for controlling the drawing, but so we
250 * can determine if the vlist is current with respect to the parent view
251 * settings. These values SHOULD NOT be directly manipulated by any user
252 * facing commands (such as view obj). */
258
259 /* Scene object settings which also (potentially) have global defaults but
260 * may be overridden locally */
263
264 /* Settings that may be less necessary... */
266
267 /* Child objects of this object */
269
270 /* Parent object of this object */
271 struct bv_scene_ob *parent;
272
273 /* Object level pointers to parent containers. These are stored so
274 * that the object itself knows everything needed for data manipulation
275 * and it is unnecessary to explicitly pass other parameters. */
276
277 /* Reusable vlists */
279
280 /* Container for reusing bv_scene_obj allocations */
282
283 /* View container containing this object */
284 struct bu_ptbl *otbl;
285
286 /* For more specialized routines not using vlists, we may need
287 * additional drawing data associated with a scene object */
289
290 /* User data to associate with this view object */
291 void *s_u_data;
292};
293
294
295
296/* bv_scene_groups (one level above scene objects, conceptually equivalent
297 * to display_list) are used to capture the intent of drawing commands. For
298 * example, in the scenario where a draw command is used to visualize a comb
299 * with sub-combs a and b:
300 *
301 * ged> draw comb
302 *
303 * The drawing code will check the proposed group against existing groups,
304 * adding and removing accordingly. It will then walk the hierarchy and create
305 * bv_scene_obj instances for all solids below comb/a and comb/b as children
306 * of the scene group. Note that since we specified "comb" as the drawn
307 * object, if comb/b is removed from comb and comb/c is added, we would expect
308 * comb's displayed view to be updated to reflect its current structure. If,
309 * however, we instead did the original visualization with the commands:
310 *
311 * ged> draw comb/a
312 * ged> draw comb/b
313 *
314 * The same solids would be drawn, but conceptually the comb itself is not
315 * drawn - the two instances are. If comb/b is removed and comb/c added, we
316 * would not expect comb/c to be drawn since we never drew either that instance
317 * or its parent comb.
318 *
319 * However, if comb/a and comb/b are drawn and then comb is drawn, the new comb
320 * scene group will replace both the comb/a and comb/b groups since they are now
321 * part of a higher level object being drawn. If comb is drawn and comb/a is
322 * subsequently drawn, it will be a no-op since "comb" is already covering that
323 * case.
324 *
325 * The rule with bv_scene_group instances is their children must specify a
326 * fully realized entity - if the s_name is "/comb/a" then everything below
327 * /comb/a is drawn. If /comb/a/obj1.s is erased, new bv_scene_group
328 * entities will be needed to reflect the partial nature of /comb/a in the
329 * visualization. That requirement also propagates back up the tree. If a has
330 * obj1.s and obj2.s below it, and /comb/a/obj1.s is erased, an original
331 * "/comb" scene group will be replaced by new scene groups: /comb/a/obj2.s and
332 * /comb/b. Note that if /comb/a/obj1.s is subsequently drawn in isolation,
333 * the scene groups will not collapse back to a single comb group - the user
334 * will not at that point have explicitly issued instructions to draw comb as a
335 * whole, even though all the individual elements have been drawn. A "view
336 * simplify" command should probably be added to support collapsing to the
337 * simplest available option automatically in that situation.
338 *
339 * Note that the above rule is for explicit erasure from the drawn scene group
340 * - if the structure of /comb/a is changed the drawn object is still "comb"
341 * and the solid children of the existing group are updated to reflect the
342 * current state of comb, rather than introducing new scene groups.
343 *
344 * Much like point_t and vect_t, the distinction between a group and an
345 * individual object is largely semantic rather than a question of different
346 * data storage. A group just uses the bv_scene_obj container to store
347 * group-wide default settings, and g.children holds the individual
348 * bv_scene_obj entries corresponding to the solids. A bv_scene_obj
349 * should always map to a solid - a group may specify a solid but more
350 * typically will reference the root of a CSG tree and have solids below it.
351 * We define them to have different types only to help keep straight in the
352 * code what is a conceptually a group and what is an individual scene object.
353 */
354#define bv_scene_group bv_scene_obj
355
356
357/* The primary "working" data for mesh Level-of-Detail (LoD) drawing is stored
358 * in a bv_mesh_lod container.
359 *
360 * Most LoD information is deliberately hidden in the internal, but the key
361 * data needed for drawing routines and view setup are exposed. Although this
362 * data structure is primarily managed in libbg, the public data in this struct
363 * is needed at many levels of the software stack, including libbv. */
365
366 // The set of triangle faces to be used when drawing
367 int fcnt;
368 const int *faces;
369
370 // The vertices used by the faces array
371 int pcnt;
372 const point_t *points; // If using snapped points, that's this array. Else, points == points_orig.
375
376 // Optional: per-face-vertex normals (one normal per triangle vertex - NOT
377 // one normal per vertex. I.e., a given point from points_orig may have
378 // multiple normals associated with it in different faces.)
380
381 // Bounding box of the original full-detail data
384
385 // The scene object using this LoD structure
387
388 // Pointer to the higher level LoD context associated with this LoD data
389 void *c;
390
391 // Pointer to internal LoD implementation information specific to this object
392 void *i;
393};
394
395
396/* We encapsulate non-camera settings into a container mainly to allow for
397 * easier re-use of the same settings between different views - if a common
398 * setting set is maintained between different views, this container allows
399 * us to just point to the common set from all views using it. */
407
408 // Adaptive plotting related settings - these are used when the wireframe
409 // generated by primitives is based on the view information.
417
418 // Faceplate elements fall into two general categories: those which are
419 // interactively adjusted (in a geometric sense) and those which are not.
420 // The non-interactive are generally just enabled or disabled:
427 int gv_fps; // Display Frames-Per-Second metric
429
430 // Framebuffer visualization is possible if there is an attached dm and
431 // that dm has an associated framebuffer. If those conditions are met,
432 // this variable is used to control how the fb is visualized.
433 int gv_fb_mode; // 0 = off, 1 = overlay, 2 = underlay
434
435 // More complex are the faceplate view elements not corresponding to
436 // geometry objects but editable by the user. These aren't managed as
437 // gv_view_objs (they are HUD visuals and thus not part of the scene) so
438 // they have some unique requirements.
441
442
443 // Not yet implemented - mechanism for defining a set of selected view
444 // objects
446};
447
448/* A view needs to know what objects are active within it, but this is a
449 * function not just of adding and removing objects via commands like
450 * "draw" and "erase" but also what settings are active. Shared objects
451 * are common to multiple views, but if adaptive plotting is enabled the
452 * scene objects cannot also be common - the representations of the objects
453 * may be different in each view, even though the object list is shared.
454 */
456
457 // Container for db object groups unique to this view (typical use case is
458 // adaptive plotting, where geometry wireframes may differ from view to
459 // view and thus need unique vlists.)
461 // Container for storing bv_scene_obj elements unique to this view.
463
464 // Available bv_vlist entities to recycle before allocating new for local
465 // view objects. This is used only if the app doesn't supply a vlfree -
466 // normally the app should do so, so memory from one view can be reused for
467 // other views.
469
470 /* Container for reusing bv_scene_obj allocations */
472};
473
474struct bview_set;
475
476struct bview {
477 uint32_t magic; /**< @brief magic number */
479
480 /* Size info */
482 fastf_t gv_a_scale; /**< @brief absolute scale */
484 fastf_t gv_size; /**< @brief 2.0 * scale */
485 fastf_t gv_isize; /**< @brief 1.0 / size */
490
491 /* Information about current "window" into view. This view may not be
492 * displayed (that's up to the display managers) and it is up to the
493 * calling code to set gv_width and gv_height to the current correct values
494 * for such a display, if it is associated with this view. These
495 * definitions are needed in bview to support "view aware" algorithms that
496 * require information defining an active pixel "window" into the view. */
499 point2d_t gv_wmin; // view space bbox minimum of gv_width/gv_height window
500 point2d_t gv_wmax; // view space bbox maximum of gv_width/gv_height window
501
502 /* Camera info */
503 fastf_t gv_perspective; /**< @brief perspective angle */
505 vect_t gv_eye_pos; /**< @brief eye position */
507 char gv_coord; /**< @brief coordinate system */
508 char gv_rotate_about; /**< @brief indicates what point rotations are about */
514 mat_t gv_pmat; /**< @brief perspective matrix */
515
516 /* Keyboard/mouse info */
521 char gv_key;
522 unsigned long gv_mod_flags;
525
526 /* Settings */
527 struct bview_settings *gv_s; /**< @brief shared settings supplied by user */
528 struct bview_settings gv_ls; /**< @brief locally maintained settings specific to view (used if gv_s is null) */
529
530 /* If a view is marked as independent, its local containers are used even
531 * if pointers to shared tables are set. This allows for fully independent
532 * views with the same GED instance, at the cost of increased memory usage
533 * if multiple views draw the same objects. */
535
536 /* Set containing this view. Also holds pointers to resources shared
537 * across multiple views */
539
540 /* Scene objects active in a view. Managing these is a relatively complex
541 * topic and depends on whether a view is shared, independent or adaptive.
542 * Shared objects are common across views to make more efficient use of
543 * system memory. */
545
546 /* We sometimes need to define the volume in space that is "active" for the
547 * view. For an orthogonal camera this is the oriented bounding box
548 * extruded to contain active scene objects visible in the view The app
549 * must set the gv_bounds_update callback to bg_view_bound so a bv_update
550 * call can update these values.*/
555 void (*gv_bounds_update)(struct bview *);
556
557 /* "Backed out" point, lookat direction, scene radius. Used for geometric
558 * view based interrogation. */
561 double radius;
562
563
564 /*
565 * gv_data_vZ is an internal parameter used by commands creating and
566 * manipulating data objects. Geometrically, it is a magnitude in the
567 * direction of the Z vector of the view plane. Functionally, what it
568 * allows the code to do is define a 2D plane embedded in in 3D space that
569 * is offset from but parallel to the view plane - in an orthogonal view
570 * this corresponds to objects drawn in that plane being "above" or "below"
571 * objects defined within the view plane itself.
572 *
573 * Visually, objects drawn in this fashion in orthogonal views will be
574 * indistinguishable regardless of their vZ offset - it is only when the
575 * view is rotated that the user will be able to see the "above" and
576 * "below" effect of creating view objects with differing vZ values.
577 *
578 * Users will generally not want to set gv_data_vZ directly, as it is a view
579 * space value and may not behave intuitively. Commands are defined to
580 * calculate vZ values based on model spaces inputs, and these should be
581 * used to generate the value supplied to gv_data_vZ.
582 */
584
585
586 // libtclcad data
588
589 /* Callback, external data */
590 void (*gv_callback)(struct bview *, void *); /**< @brief called in ged_view_update with gvp and gv_clientData */
591 void *gv_clientData; /**< @brief passed to gv_callback */
593 void *dmp; /* Display manager pointer, if one is associated with this view */
594 void *u_data; /* Caller data associated with this view */
595};
596
597// Because bview instances frequently share objects in applications, they are
598// not always fully independent - we define a container and some basic
599// operations to manage this.
600struct bview_set_internal;
601struct bview_set {
602 struct bview_set_internal *i;
604};
605
606__END_DECLS
607
608#endif /* BV_DEFINES_H */
609
610/** @} */
611/*
612 * Local Variables:
613 * mode: C
614 * tab-width: 8
615 * indent-tabs-mode: t
616 * c-file-style: "stroustrup"
617 * End:
618 * ex: shiftwidth=4 tabstop=8
619 */
Header file for the BRL-CAD common definitions.
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 point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition: vmath.h:351
Definition: list.h:131
Definition: ptbl.h:53
Definition: vls.h:53
int tick_major_color[3]
Definition: defines.h:124
int draw
Definition: defines.h:105
int pos_only
Definition: defines.h:113
int tick_color[3]
Definition: defines.h:123
int ticks_per_major
Definition: defines.h:121
point_t axes_pos
Definition: defines.h:106
int line_width
Definition: defines.h:108
int tick_enabled
Definition: defines.h:117
int tick_major_length
Definition: defines.h:119
fastf_t tick_interval
Definition: defines.h:120
int tick_threshold
Definition: defines.h:122
int axes_color[3]
Definition: defines.h:109
int tick_length
Definition: defines.h:118
int label_color[3]
Definition: defines.h:115
int label_flag
Definition: defines.h:114
fastf_t axes_size
Definition: defines.h:107
int triple_color
Definition: defines.h:116
int anchor
Definition: defines.h:95
int size
Definition: defines.h:90
struct bu_vls label
Definition: defines.h:91
point_t p
Definition: defines.h:92
int line_flag
Definition: defines.h:93
int arrow
Definition: defines.h:96
point_t target
Definition: defines.h:94
struct bv_scene_obj * s
Definition: defines.h:386
const point_t * points
Definition: defines.h:372
void * i
Definition: defines.h:392
const vect_t * normals
Definition: defines.h:379
const point_t * points_orig
Definition: defines.h:374
const int * faces
Definition: defines.h:368
point_t bmax
Definition: defines.h:383
int pcnt
Definition: defines.h:371
void * c
Definition: defines.h:389
point_t bmin
Definition: defines.h:382
int porig_cnt
Definition: defines.h:373
int fcnt
Definition: defines.h:367
int draw_non_subtract_only
do not visualize subtraction solids
Definition: defines.h:149
int s_dmode
draw mode: 0 - wireframe 1 - shaded bots and polysolids only (booleans NOT evaluated) 2 - shaded (boo...
Definition: defines.h:134
int s_line_width
current line width
Definition: defines.h:145
fastf_t s_arrow_tip_length
arrow tip length
Definition: defines.h:146
unsigned char color[3]
color to draw as
Definition: defines.h:143
int draw_solid_lines_only
do not use dashed lines for subtraction solids
Definition: defines.h:148
int color_override
Definition: defines.h:142
fastf_t s_arrow_tip_width
arrow tip width
Definition: defines.h:147
fastf_t transparency
holds a transparency value in the range [0.0, 1.0] - 1 is opaque
Definition: defines.h:140
void * draw_data
Definition: defines.h:288
size_t bot_threshold
Definition: defines.h:255
struct bv_scene_obj * free_scene_obj
Definition: defines.h:281
struct bu_ptbl * otbl
Definition: defines.h:284
void * s_path
alternative (app specific) encoding of s_name
Definition: defines.h:198
struct bu_vls s_uuid
object name (unique, may be less immediately clear to user)
Definition: defines.h:199
vect_t s_center
Center point of solid, in model space.
Definition: defines.h:229
char s_iflag
UP = illuminated, DOWN = regular.
Definition: defines.h:236
unsigned char s_color[3]
color to draw as
Definition: defines.h:237
fastf_t view_scale
Definition: defines.h:254
void * s_i_data
custom view data (bv_line_seg, bv_label, bv_polyon, etc)
Definition: defines.h:212
void(* s_free_callback)(struct bv_scene_obj *)
free any info stored in s_i_data, s_path and draw_data
Definition: defines.h:214
fastf_t curve_scale
Definition: defines.h:256
fastf_t s_csize
Dist across clipped solid (model space)
Definition: defines.h:228
mat_t s_mat
mat to use for internal lookup and mesh LoD drawing
Definition: defines.h:200
struct bu_ptbl children
Definition: defines.h:268
fastf_t point_scale
Definition: defines.h:257
char s_flag
UP = object visible, DOWN = obj invis.
Definition: defines.h:235
fastf_t s_size
Distance across solid, in model space.
Definition: defines.h:227
unsigned long long s_type_flags
Definition: defines.h:196
size_t s_vlen
Number of actual cmd[] entries in vlist.
Definition: defines.h:218
point_t bmax
Definition: defines.h:232
void(* s_dlist_free_callback)(struct bv_scene_obj *)
free any dlist specific data
Definition: defines.h:224
struct bv_obj_settings s_local_os
Definition: defines.h:262
point_t bmin
Definition: defines.h:231
int s_dlist_mode
drawing mode in which display list was generated (if it doesn't match s_os.s_dmode,...
Definition: defines.h:222
struct bu_list s_vlist
Pointer to unclipped vector list.
Definition: defines.h:217
int s_dlist_stale
set by client codes when dlist is out of date - dm must update.
Definition: defines.h:223
int current
Definition: defines.h:241
struct bu_list l
Definition: defines.h:190
struct bv_scene_obj_internal * i
Definition: defines.h:193
int(* s_update_callback)(struct bv_scene_obj *, struct bview *, int)
custom update/generator for s_vlist
Definition: defines.h:213
int adaptive_wireframe
Definition: defines.h:253
int s_displayobj
Vector list contains vertices in display context flag.
Definition: defines.h:230
int s_arrow
arrow flag for view object drawing routines
Definition: defines.h:239
int s_changed
changed flag - set by s_update_callback if a change occurred
Definition: defines.h:240
struct bview * s_v
Definition: defines.h:208
int s_soldash
solid/dashed line flag: 0 = solid, 1 = dashed
Definition: defines.h:238
unsigned int s_dlist
display list index
Definition: defines.h:221
struct bv_scene_ob * parent
Definition: defines.h:271
struct bu_vls s_name
object name (may not be unique, used for activities like path lookup)
Definition: defines.h:197
struct bu_list * vlfree
Definition: defines.h:278
void * s_u_data
Definition: defines.h:291
struct bv_scene_obj_old_settings s_old
Definition: defines.h:265
struct bv_obj_settings * s_os
Definition: defines.h:261
struct bv_scene_obj * free_scene_obj
Definition: defines.h:471
struct bu_ptbl * db_objs
Definition: defines.h:460
struct bu_ptbl * view_objs
Definition: defines.h:462
struct bu_list gv_vlfree
Definition: defines.h:468
struct bview_set_internal * i
Definition: defines.h:602
struct bview_settings settings
Definition: defines.h:603
size_t bot_threshold
Definition: defines.h:412
struct bv_other_state gv_view_scale
Definition: defines.h:426
int gv_autoview
Definition: defines.h:406
struct bv_grid_state gv_grid
Definition: defines.h:423
double gv_frametime
Definition: defines.h:428
struct bv_other_state gv_view_params
Definition: defines.h:425
fastf_t curve_scale
Definition: defines.h:413
int adaptive_plot_csg
Definition: defines.h:411
fastf_t point_scale
Definition: defines.h:414
struct bu_ptbl * gv_selected
Definition: defines.h:445
int adaptive_plot_mesh
Definition: defines.h:410
fastf_t lod_scale
Definition: defines.h:416
struct bv_obj_settings obj_s
Definition: defines.h:401
int gv_fb_mode
Definition: defines.h:433
struct bv_axes gv_model_axes
Definition: defines.h:421
int gv_cleared
Definition: defines.h:404
double gv_snap_tol_factor
Definition: defines.h:403
struct bv_axes gv_view_axes
Definition: defines.h:422
struct bv_interactive_rect_state gv_rect
Definition: defines.h:440
int redraw_on_zoom
Definition: defines.h:415
struct bv_adc_state gv_adc
Definition: defines.h:439
struct bv_other_state gv_center_dot
Definition: defines.h:424
int gv_snap_lines
Definition: defines.h:402
Definition: defines.h:476
struct bv_data_tclcad gv_tcl
Definition: defines.h:587
fastf_t gv_size
2.0 * scale
Definition: defines.h:484
int gv_height
Definition: defines.h:498
struct bview_objs gv_objs
Definition: defines.h:544
vect_t gv_aet
Definition: defines.h:504
fastf_t gv_minMouseDelta
Definition: defines.h:523
fastf_t gv_local2base
Definition: defines.h:487
struct bu_vls gv_name
Definition: defines.h:478
fastf_t gv_sscale
Definition: defines.h:489
int gv_mouse_x
Definition: defines.h:519
void * dmp
Definition: defines.h:593
double radius
Definition: defines.h:561
struct bview_settings * gv_s
shared settings supplied by user
Definition: defines.h:527
mat_t gv_rotation
Definition: defines.h:509
fastf_t gv_isize
1.0 / size
Definition: defines.h:485
uint32_t magic
magic number
Definition: defines.h:477
void(* gv_callback)(struct bview *, void *)
called in ged_view_update with gvp and gv_clientData
Definition: defines.h:590
struct bview_settings gv_ls
locally maintained settings specific to view (used if gv_s is null)
Definition: defines.h:528
fastf_t gv_perspective
perspective angle
Definition: defines.h:503
fastf_t gv_prevMouseY
Definition: defines.h:518
point2d_t gv_wmin
Definition: defines.h:499
point2d_t gv_wmax
Definition: defines.h:500
vect_t gv_lookat
Definition: defines.h:560
mat_t gv_pmat
perspective matrix
Definition: defines.h:514
mat_t gv_view2model
Definition: defines.h:513
fastf_t gv_maxMouseDelta
Definition: defines.h:524
char gv_coord
coordinate system
Definition: defines.h:507
void(* gv_bounds_update)(struct bview *)
Definition: defines.h:555
void * gv_clientData
passed to gv_callback
Definition: defines.h:591
vect_t obb_extent1
Definition: defines.h:552
struct bu_ptbl * callbacks
Definition: defines.h:592
vect_t obb_extent3
Definition: defines.h:554
fastf_t gv_base2local
Definition: defines.h:486
int gv_mouse_y
Definition: defines.h:520
point_t obb_center
Definition: defines.h:551
fastf_t gv_i_scale
Definition: defines.h:481
vect_t obb_extent2
Definition: defines.h:553
point_t gv_vc_backout
Definition: defines.h:559
fastf_t gv_scale
Definition: defines.h:483
struct bview_set * vset
Definition: defines.h:538
unsigned long gv_mod_flags
Definition: defines.h:522
mat_t gv_model2view
Definition: defines.h:511
char gv_key
Definition: defines.h:521
fastf_t gv_rscale
Definition: defines.h:488
void * u_data
Definition: defines.h:594
fastf_t gv_prevMouseX
Definition: defines.h:517
fastf_t gv_a_scale
absolute scale
Definition: defines.h:482
fastf_t gv_data_vZ
Definition: defines.h:583
int independent
Definition: defines.h:534
char gv_rotate_about
indicates what point rotations are about
Definition: defines.h:508
vect_t gv_keypoint
Definition: defines.h:506
mat_t gv_center
Definition: defines.h:510
vect_t gv_eye_pos
eye position
Definition: defines.h:505
int gv_width
Definition: defines.h:497
mat_t gv_pmodel2view
Definition: defines.h:512
fundamental vector, matrix, quaternion math macros