BRL-CAD
Loading...
Searching...
No Matches
binunif.h File Reference
#include "common.h"
#include "vmath.h"
#include "bu/vls.h"
#include "wdb.h"
#include "rt/defines.h"
#include "rt/directory.h"
#include "rt/nongeom.h"
Include dependency graph for binunif.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RT_BINUNIF_TYPE_MASK   0x00ffu
 
#define RT_BINUNIF_NETWORK_ORDER   0x0100u
 

Functions

int rt_mk_binunif (struct rt_wdb *wdbp, const char *obj_name, const char *file_name, unsigned int input_type, size_t max_count)
 
void rt_binunif_free (struct rt_binunif_internal *bip)
 
void rt_binunif_dump (struct rt_binunif_internal *bip)
 
const charrt_binunif_typestr (const struct directory *dp)
 

Macro Definition Documentation

◆ RT_BINUNIF_TYPE_MASK

#define RT_BINUNIF_TYPE_MASK   0x00ffu

Base DB5 BINUNIF minor type bits accepted by rt_mk_binunif().

Definition at line 38 of file binunif.h.

◆ RT_BINUNIF_NETWORK_ORDER

#define RT_BINUNIF_NETWORK_ORDER   0x0100u

The input file has network byte order. Input is assumed to have host byte order when this flag is absent.

Definition at line 44 of file binunif.h.

Function Documentation

◆ 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 
)
extern

Import a typed raw file as a uniform binary database object.

input_type is a DB5_MINORTYPE_BINU_* value, optionally combined with RT_BINUNIF_NETWORK_ORDER. File input defaults to host byte order. A positive max_count limits the number of imported elements; zero imports the complete file. The resulting in-memory elements use host byte order and are serialized into the database in network byte order.

Returns 0 on success and -1 on error.

◆ rt_binunif_free()

void rt_binunif_free ( struct rt_binunif_internal bip)
extern

Free the storage associated with a binunif_internal object

◆ rt_binunif_dump()

void rt_binunif_dump ( struct rt_binunif_internal bip)
extern

Diagnostic routine

◆ rt_binunif_typestr()

const char * rt_binunif_typestr ( const struct directory dp)
extern

Decode binunif type into string.