BRL-CAD
prep.h
Go to the documentation of this file.
1/* P R E P . 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/** @file rt/prep.h
21 *
22 */
23
24#ifndef RT_PREP_H
25#define RT_PREP_H
26
27#include "common.h"
28#include "vmath.h"
29#include "bu/ptbl.h"
30#include "rt/defines.h"
31#include "rt/tree.h"
32#include "rt/resource.h"
33#include "rt/rt_instance.h"
34
35__BEGIN_DECLS
36
37/**
38 * Structure used by the "reprep" routines
39 */
41 size_t ntopobjs; /**< @brief number of objects in the original call to gettrees */
42 char **topobjs; /**< @brief list of the above object names */
43 size_t nunprepped; /**< @brief number of objects to be unprepped and re-prepped */
44 char **unprepped; /**< @brief list of the above objects */
45 /* Above here must be filled in by application */
46 /* Below here is used by dynamic geometry routines, should be zeroed by application before use */
47 struct bu_ptbl paths; /**< @brief list of all paths from topobjs to unprepped objects */
48 struct db_tree_state **tsp; /**< @brief tree state used by tree walker in "reprep" routines */
49 struct bu_ptbl unprep_regions; /**< @brief list of region structures that will be "unprepped" */
50 size_t old_nsolids; /**< @brief rtip->nsolids before unprep */
51 size_t old_nregions; /**< @brief rtip->nregions before unprep */
52 size_t nsolids_unprepped; /**< @brief number of soltab structures eliminated by unprep */
53 size_t nregions_unprepped; /**< @brief number of region structures eliminated by unprep */
54};
55
56/* prep.c */
57RT_EXPORT extern int rt_unprep(struct rt_i *rtip,
58 struct rt_reprep_obj_list *objs,
59 struct resource *resp);
60RT_EXPORT extern int rt_reprep(struct rt_i *rtip,
61 struct rt_reprep_obj_list *objs,
62 struct resource *resp);
63RT_EXPORT extern int re_prep_solids(struct rt_i *rtip,
64 int num_solids,
65 char **solid_names,
66 struct resource *resp);
67
68
69__END_DECLS
70
71#endif /* RT_PREP_H */
72
73/*
74 * Local Variables:
75 * tab-width: 8
76 * mode: C
77 * indent-tabs-mode: t
78 * c-file-style: "stroustrup"
79 * End:
80 * ex: shiftwidth=4 tabstop=8
81 */
Header file for the BRL-CAD common definitions.
int rt_reprep(struct rt_i *rtip, struct rt_reprep_obj_list *objs, struct resource *resp)
int rt_unprep(struct rt_i *rtip, struct rt_reprep_obj_list *objs, struct resource *resp)
int re_prep_solids(struct rt_i *rtip, int num_solids, char **solid_names, struct resource *resp)
Definition: ptbl.h:53
size_t nregions_unprepped
number of region structures eliminated by unprep
Definition: prep.h:53
struct bu_ptbl unprep_regions
list of region structures that will be "unprepped"
Definition: prep.h:49
size_t nunprepped
number of objects to be unprepped and re-prepped
Definition: prep.h:43
char ** unprepped
list of the above objects
Definition: prep.h:44
size_t old_nregions
rtip->nregions before unprep
Definition: prep.h:51
size_t old_nsolids
rtip->nsolids before unprep
Definition: prep.h:50
struct bu_ptbl paths
list of all paths from topobjs to unprepped objects
Definition: prep.h:47
size_t ntopobjs
number of objects in the original call to gettrees
Definition: prep.h:41
size_t nsolids_unprepped
number of soltab structures eliminated by unprep
Definition: prep.h:52
struct db_tree_state ** tsp
tree state used by tree walker in "reprep" routines
Definition: prep.h:48
char ** topobjs
list of the above object names
Definition: prep.h:42
fundamental vector, matrix, quaternion math macros