BRL-CAD
Loading...
Searching...
No Matches
binunif.h
Go to the documentation of this file.
1
/* B I N U N I F . 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/binunif.h
21
*
22
*/
23
24
#ifndef RT_BINUNIF_H
25
#define RT_BINUNIF_H
26
27
#include "
common.h
"
28
#include "
vmath.h
"
29
#include "
bu/vls.h
"
30
#include "
wdb.h
"
31
#include "
rt/defines.h
"
32
#include "
rt/directory.h
"
33
#include "
rt/nongeom.h
"
34
35
__BEGIN_DECLS
36
37
/** Base DB5 BINUNIF minor type bits accepted by rt_mk_binunif(). */
38
#define RT_BINUNIF_TYPE_MASK 0x00ffu
39
40
/**
41
* The input file has network byte order. Input is assumed to have host byte
42
* order when this flag is absent.
43
*/
44
#define RT_BINUNIF_NETWORK_ORDER 0x0100u
45
46
/**
47
* Import a typed raw file as a uniform binary database object.
48
*
49
* input_type is a DB5_MINORTYPE_BINU_* value, optionally combined with
50
* RT_BINUNIF_NETWORK_ORDER. File input defaults to host byte order. A
51
* positive max_count limits the number of imported elements; zero imports the
52
* complete file. The resulting in-memory elements use host byte order and
53
* are serialized into the database in network byte order.
54
*
55
* Returns 0 on success and -1 on error.
56
*/
57
RT_EXPORT
extern
int
rt_mk_binunif
(
struct
rt_wdb
*
wdbp
,
58
const
char
*obj_name,
59
const
char
*
file_name
,
60
unsigned
int
input_type
,
61
size_t
max_count
);
62
63
64
/* defined in db5_bin.c */
65
66
/**
67
* Free the storage associated with a binunif_internal object
68
*/
69
RT_EXPORT
extern
void
rt_binunif_free
(
struct
rt_binunif_internal
*bip);
70
71
/**
72
* Diagnostic routine
73
*/
74
RT_EXPORT
extern
void
rt_binunif_dump
(
struct
rt_binunif_internal
*bip);
75
76
/**
77
* Decode binunif type into string.
78
*/
79
RT_EXPORT
extern
const
char
*
rt_binunif_typestr
(
const
struct
directory
*dp);
80
81
__END_DECLS
82
83
#endif
/* RT_BINUNIF_H */
84
85
/*
86
* Local Variables:
87
* tab-width: 8
88
* mode: C
89
* indent-tabs-mode: t
90
* c-file-style: "stroustrup"
91
* End:
92
* ex: shiftwidth=4 tabstop=8
93
*/
rt_binunif_free
void rt_binunif_free(struct rt_binunif_internal *bip)
rt_binunif_dump
void rt_binunif_dump(struct rt_binunif_internal *bip)
rt_mk_binunif
int rt_mk_binunif(struct rt_wdb *wdbp, const char *obj_name, const char *file_name, unsigned int input_type, size_t max_count)
rt_binunif_typestr
const char * rt_binunif_typestr(const struct directory *dp)
dvec
Definition
dvec.h:74
common.h
Header file for the BRL-CAD common definitions.
directory.h
nongeom.h
defines.h
directory
Definition
directory.h:62
rt_binunif_internal
Definition
nongeom.h:136
rt_wdb
Definition
wdb.h:60
vls.h
vmath.h
fundamental vector, matrix, quaternion math macros
wdb.h
include
rt
binunif.h
Generated on Tue Sep 8 2026 02:48:10 for BRL-CAD by
1.9.8