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-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 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
46 double dx;
47 double dy;
49};
50
57};
58
59DM_EXPORT extern void dm_draw_faceplate(struct bview *v, double base2local, double local2base);
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
72DM_EXPORT extern void dm_draw_viewobjs(struct rt_wdb *wdbp, struct bview *v, struct dm_view_data *d, double base2local, double local2base);
73
74/* Stripped down form of dm_draw_viewobjs that does just what's needed for the new setup */
75DM_EXPORT extern void dm_draw_objs(struct bview *v, double base2local, double local2base, void (*dm_draw_custom)(struct bview *, double, double, 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:47
void dm_draw_faceplate(struct bview *v, double base2local, double local2base)
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
Definition: vmath.h:366
Definition: vls.h:53
Definition: defines.h:476
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