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 "rt/defines.h"
31#include "rt/resource.h"
32
34
35RT_EXPORT extern int rt_find_paths(struct db_i *dbip, struct directory *start, struct directory *end);
36
37RT_EXPORT extern struct bu_bitv *rt_get_solidbitv(size_t nbits, struct resource *resp);
38
39/* table.c */
40RT_EXPORT extern int rt_id_solid(struct bu_external *ep);
41
42/**
43 * Used by MGED for labeling vertices of a solid.
44 *
45 * TODO - eventually this should fade into a general annotation
46 * framework
47 */
48struct rt_point_labels {
49 char str[8];
51};
52
53#define RT_POINT_LABELS_INIT { {'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0'}, VINIT_ZERO }
55/**
56 * reduce an object into some form of simpler representation
57 */
58RT_EXPORT extern void rt_reduce_obj(struct rt_db_internal *dest, const struct rt_db_internal *ip, fastf_t reduction_level, unsigned flags);
60#define RT_REDUCE_OBJ_PRESERVE_VOLUME 0x1
62/**
63 * reduce the database hierarchy
64 */
65RT_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);
67/* below are librt table implementation detail */
68
70 const mat_t mat,
71 struct rt_db_internal *ip,
72 int avail,
73 struct db_i *dbip);
74RT_EXPORT extern void rt_generic_make(const struct rt_functab *ftp, struct rt_db_internal *intern);
76
78
79#endif /* RT_MISC_H */
80
81/*
82 * Local Variables:
83 * tab-width: 8
84 * mode: C
85 * indent-tabs-mode: t
86 * c-file-style: "stroustrup"
87 * End:
88 * ex: shiftwidth=4 tabstop=8
89 */
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)
int rt_find_paths(struct db_i *dbip, struct directory *start, struct directory *end)
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_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:51
char str[8]
Definition misc.h:50
fundamental vector, matrix, quaternion math macros