BRL-CAD
view.h
Go to the documentation of this file.
1 /* V I E W . H
2  * BRL-CAD
3  *
4  * Copyright (c) 1993-2024 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 libdm */
21 /** @{ */
22 /** @file dm/view.h
23  *
24  * dm routines related to view management (migrated from libtclcad.) These may
25  * ultimately take a different form or move elsewhere - the immediate idea here
26  * is to extract the key logic from libtclcad for use in non-Tcl environments.
27  *
28  */
29 
30 #include "common.h"
31 
32 #include "vmath.h"
33 
34 #include "bu/hash.h"
35 #include "bu/vls.h"
36 #include "bv/defines.h"
37 #include "dm/defines.h"
38 
39 #ifndef DM_VIEW_H
40 #define DM_VIEW_H
41 
42 __BEGIN_DECLS
43 
45  int edit_mode;
46  double dx;
47  double dy;
49 };
50 
51 struct dm_view_data {
55  int dlist_on;
57 };
58 
59 DM_EXPORT extern void dm_draw_faceplate(struct bview *v);
60 
61 /* As a temporary measure, require client codes to specifically ask to enable
62  * the bits that require librt in the headers if they're not going to be
63  * calling them. Not ideal, but pulling in rt also pulls in openNURBS, which
64  * can have significant implications. */
65 #ifdef DM_WITH_RT
66 /* TODO - needed for dm_draw_labels, which cracks the database
67  * objects to generate label info. Need to think about how to
68  * better handle this... - ideally should be a callback of some
69  * sort on a bv scene object... */
70 #include "rt/wdb.h"
71 
72 DM_EXPORT extern void dm_draw_viewobjs(struct rt_wdb *wdbp, struct bview *v, struct dm_view_data *d);
73 
74 /* Stripped down form of dm_draw_viewobjs that does just what's needed for the new setup */
75 DM_EXPORT extern void dm_draw_objs(struct bview *v, void (*dm_draw_custom)(struct bview *, void *), void *u_data);
76 #endif /* DM_NO_RT */
77 
78 __END_DECLS
79 
80 #endif /* DM_VIEW_H */
81 
82 /** @} */
83 /*
84  * Local Variables:
85  * mode: C
86  * tab-width: 8
87  * indent-tabs-mode: t
88  * c-file-style: "stroustrup"
89  * End:
90  * ex: shiftwidth=4 tabstop=8
91  */
Header file for the BRL-CAD common definitions.
struct bu_hash_tbl bu_hash_tbl
Definition: hash.h:48
void dm_draw_faceplate(struct bview *v)
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
Definition: vmath.h:370
Definition: vls.h:53
Definition: defines.h:489
mat_t edit_mat
Definition: view.h:48
struct bu_hash_tbl * edited_paths
Definition: view.h:52
int refresh_on
Definition: view.h:56
int prim_label_list_size
Definition: view.h:54
int dlist_on
Definition: view.h:55
struct bu_vls * prim_label_list
Definition: view.h:53
Definition: wdb.h:62
fundamental vector, matrix, quaternion math macros