BRL-CAD
view_sets.h
Go to the documentation of this file.
1/* V I E W _ S E T S . 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_util
21 *
22 * In applications with multiple views, those views typically share common
23 * scene objects and memory. To manage this sharing, we define view sets.
24 */
25/** @{ */
26/** @file bv/view_sets.h */
27
28#ifndef BV_VIEW_SETS_H
29#define BV_VIEW_SETS_H
30
31#include "common.h"
32#include "bv/defines.h"
33
34__BEGIN_DECLS
35
36/**
37 * Initialize an empty view set
38 */
39BV_EXPORT void
41
42/**
43 * Free view set
44 */
45BV_EXPORT void
47
48/**
49 * Add view v to set s, handling shared memory assignments.
50 */
51BV_EXPORT void
52bv_set_add_view(struct bview_set *s, struct bview *v);
53
54/**
55 * Remove view v from set s
56 */
57BV_EXPORT void
58bv_set_rm_view(struct bview_set *s, struct bview *v);
59
60/**
61 * Return a bu_ptbl holding pointers to all views in set s
62 */
63BV_EXPORT struct bu_ptbl *
65
66/**
67 * Return a pointer to the view with name vname, if it is present in s. If not
68 * found, returns NULL
69 */
70BV_EXPORT struct bview *
71bv_set_find_view(struct bview_set *s, const char *vname);
72
73
74// Expose free_scene_obj for older codes - do not use in new coding
75BV_EXPORT struct bv_scene_obj *
77
78
79__END_DECLS
80
81/** @} */
82
83#endif /* BV_VIEW_SETS_H */
84
85/*
86 * Local Variables:
87 * mode: C
88 * tab-width: 8
89 * indent-tabs-mode: t
90 * c-file-style: "stroustrup"
91 * End:
92 * ex: shiftwidth=4 tabstop=8
93 */
Header file for the BRL-CAD common definitions.
void bv_set_free(struct bview_set *s)
void bv_set_add_view(struct bview_set *s, struct bview *v)
struct bu_ptbl * bv_set_views(struct bview_set *s)
void bv_set_rm_view(struct bview_set *s, struct bview *v)
void bv_set_init(struct bview_set *s)
struct bview * bv_set_find_view(struct bview_set *s, const char *vname)
struct bv_scene_obj * bv_set_fsos(struct bview_set *s)
Definition: ptbl.h:53
Definition: defines.h:476