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-2025 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
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
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 */
53struct rt_point_labels {
54 char str[8];
56};
57
58#define RT_POINT_LABELS_INIT { {'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0'}, VINIT_ZERO }
60/**
61 * reduce an object into some form of simpler representation
62 */
63RT_EXPORT extern void rt_reduce_obj(struct rt_db_internal *dest, const struct rt_db_internal *ip, fastf_t reduction_level, unsigned flags);
65#define RT_REDUCE_OBJ_PRESERVE_VOLUME 0x1
67/**
68 * reduce the database hierarchy
69 */
70RT_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);
72/* below are librt table implementation detail */
73
75 const mat_t mat,
76 struct rt_db_internal *ip,
77 int avail,
78 struct db_i *dbip);
79RT_EXPORT extern void rt_generic_make(const struct rt_functab *ftp, struct rt_db_internal *intern);
81
83
84#endif /* RT_MISC_H */
85
86/*
87 * Local Variables:
88 * tab-width: 8
89 * mode: C
90 * indent-tabs-mode: t
91 * c-file-style: "stroustrup"
92 * End:
93 * ex: shiftwidth=4 tabstop=8
94 */
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:334
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
Definition vmath.h:370
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
Definition vmath.h:355
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)
size_t nbits
Definition bitv.h:110
Definition ptbl.h:53
point_t pt
Definition misc.h:56
char str[8]
Definition misc.h:55
fundamental vector, matrix, quaternion math macros