BRL-CAD
Loading...
Searching...
No Matches
misc.h
Go to the documentation of this file.
1/* M I S C . H
2 * BRL-CAD
3 *
4 * Copyright (c) 1993-2026 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 "bu/ptbl.h"
31#include "rt/defines.h"
32#include "rt/resource.h"
33
35
36/**
37 * Append every database path from @p start to @p end to an initialized
38 * @p paths table. Combination trees, including region combinations, are
39 * traversed. The caller owns the returned db_full_path objects.
40 */
41RT_EXPORT extern int rt_find_paths(struct db_i *dbip,
42 struct directory *start,
43 struct directory *end,
44 struct bu_ptbl *paths);
45
46RT_EXPORT extern struct bu_bitv *rt_get_solidbitv(size_t nbits, struct resource *resp);
47
48/* table.c */
49RT_EXPORT extern int rt_id_solid(struct bu_external *ep);
50
51/**
52 * Used by MGED for labeling vertices of a solid.
53 *
54 * TODO - eventually this should fade into a general annotation
55 * framework
56 */
57struct rt_point_labels {
58 char str[8];
60};
61
62#define RT_POINT_LABELS_INIT { {'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0'}, VINIT_ZERO }
64/**
65 * reduce an object into some form of simpler representation
66 */
67RT_EXPORT extern void rt_reduce_obj(struct rt_db_internal *dest, const struct rt_db_internal *ip, fastf_t reduction_level, unsigned flags);
69#define RT_REDUCE_OBJ_PRESERVE_VOLUME 0x1
71/**
72 * reduce the database hierarchy
73 */
74RT_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);
76/* below are librt table implementation detail */
77
79 const mat_t mat,
80 struct rt_db_internal *ip,
81 int avail,
82 struct db_i *dbip);
83RT_EXPORT extern void rt_generic_make(const struct rt_functab *ftp, struct rt_db_internal *intern);
85
87
88#endif /* RT_MISC_H */
89
90/*
91 * Local Variables:
92 * tab-width: 8
93 * mode: C
94 * indent-tabs-mode: t
95 * c-file-style: "stroustrup"
96 * End:
97 * ex: shiftwidth=4 tabstop=8
98 */
Definition dvec.h:74
Header file for the BRL-CAD common definitions.
double fastf_t
fastest 64-bit (or larger) floating point type
Definition vmath.h:333
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
Definition vmath.h:369
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition vmath.h:354
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)
int rt_id_solid(struct bu_external *ep)
Definition bitv.h:95
size_t nbits
Definition bitv.h:97
Definition ptbl.h:53
point_t pt
Definition misc.h:60
char str[8]
Definition misc.h:59
fundamental vector, matrix, quaternion math macros