BRL-CAD
misc.h
Go to the documentation of this file.
1/* M I S C . 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/misc.h
21 *
22 * Catch all for functions that don't have a clear sub-header yet.
23 */
24
25#ifndef RT_MISC_H
26#define RT_MISC_H
27
28#include "common.h"
29#include "vmath.h"
30#include "rt/defines.h"
31#include "rt/resource.h"
32
33__BEGIN_DECLS
34
35RT_EXPORT extern int rt_find_paths(struct db_i *dbip,
36 struct directory *start,
37 struct directory *end,
38 struct bu_ptbl *paths,
39 struct resource *resp);
40
41RT_EXPORT extern struct bu_bitv *rt_get_solidbitv(size_t nbits,
42 struct resource *resp);
43
44/* table.c */
45RT_EXPORT extern int rt_id_solid(struct bu_external *ep);
46
47/**
48 * Used by MGED for labeling vertices of a solid.
49 *
50 * TODO - eventually this should fade into a general annotation
51 * framework
52 */
54 char str[8];
56};
57
58/**
59 * reduce an object into some form of simpler representation
60 */
61RT_EXPORT extern void rt_reduce_obj(struct rt_db_internal *dest, const struct rt_db_internal *ip, fastf_t reduction_level, unsigned flags);
62
63#define RT_REDUCE_OBJ_PRESERVE_VOLUME 0x1
64
65/**
66 * reduce the database hierarchy
67 */
68RT_EXPORT extern void rt_reduce_db(struct db_i *db, size_t num_preserved_attributes, const char * const * preserved_attributes, const struct bu_ptbl *preserved_combs_dirs);
69
70/* below are librt table implementation detail */
71
72RT_EXPORT extern int rt_generic_xform(struct rt_db_internal *op,
73 const mat_t mat,
74 struct rt_db_internal *ip,
75 int avail,
76 struct db_i *dbip);
77RT_EXPORT extern void rt_generic_make(const struct rt_functab *ftp, struct rt_db_internal *intern);
78
79
80__END_DECLS
81
82#endif /* RT_MISC_H */
83
84/*
85 * Local Variables:
86 * tab-width: 8
87 * mode: C
88 * indent-tabs-mode: t
89 * c-file-style: "stroustrup"
90 * End:
91 * ex: shiftwidth=4 tabstop=8
92 */
Header file for the BRL-CAD common definitions.
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 point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition: vmath.h:351
void rt_reduce_obj(struct rt_db_internal *dest, const struct rt_db_internal *ip, fastf_t reduction_level, unsigned flags)
void rt_reduce_db(struct db_i *db, size_t num_preserved_attributes, const char *const *preserved_attributes, const struct bu_ptbl *preserved_combs_dirs)
int rt_generic_xform(struct rt_db_internal *op, const mat_t mat, struct rt_db_internal *ip, int avail, struct db_i *dbip)
void rt_generic_make(const struct rt_functab *ftp, struct rt_db_internal *intern)
struct bu_bitv * rt_get_solidbitv(size_t nbits, struct resource *resp)
int rt_find_paths(struct db_i *dbip, struct directory *start, struct directory *end, struct bu_ptbl *paths, struct resource *resp)
int rt_id_solid(struct bu_external *ep)
Definition: bitv.h:108
size_t nbits
Definition: bitv.h:110
Definition: ptbl.h:53
point_t pt
Definition: misc.h:55
char str[8]
Definition: misc.h:54
fundamental vector, matrix, quaternion math macros