BRL-CAD
db_flip.c File Reference
#include "common.h"
#include "vmath.h"
#include "db.h"
Include dependency graph for db_flip.c:

Go to the source code of this file.

Data Structures

union  val
 
union  sval
 

Functions

short flip_short (short s)
 
fastf_t flip_dbfloat (dbfloat_t d)
 
void flip_fastf_float (fastf_t *ff, const dbfloat_t *fp, int n, int flip)
 
void rt_fastf_float (fastf_t *ff, const dbfloat_t *fp, int n, int flip)
 
void flip_mat_dbmat (fastf_t *ff, const dbfloat_t *dbp, int flip)
 
void rt_mat_dbmat (fastf_t *ff, const dbfloat_t *dbp, int flip)
 
void flip_dbmat_mat (dbfloat_t *dbp, const fastf_t *ff)
 
void rt_dbmat_mat (dbfloat_t *dbp, const fastf_t *ff)
 

Detailed Description

v4 geometry database serialization routines.

Definition in file db_flip.c.

Function Documentation

short flip_short ( short  s)

function similar to ntohs() but always flips the bytes. used for v4 compatibility.

Definition at line 47 of file db_flip.c.

References sval::c, sval::s, s, and OSL::Strings::v.

Referenced by db_scan(), rt_ars_import4(), rt_comb_import4(), and rt_nurb_import4().

fastf_t flip_dbfloat ( dbfloat_t  d)

function similar to ntohf() but always flips the types. used for v4 compatibility.

Definition at line 58 of file db_flip.c.

References val::c, val::f, and OSL::Strings::v.

Referenced by flip_fastf_float(), flip_mat_dbmat(), rt_ehy_import4(), rt_epa_import4(), rt_eto_import4(), rt_nurb_import4(), rt_rhc_import4(), rt_rpc_import4(), and rt_superell_import4().

void flip_fastf_float ( fastf_t ff,
const dbfloat_t *  fp,
int  n,
int  flip 
)

function that flips a dbfloat_t[3] vector into fastf_t[3]

Definition at line 74 of file db_flip.c.

References flip_dbfloat().

Referenced by ars_rd_curve(), rt_arb_import4(), rt_ehy_import4(), rt_ell_import4(), rt_epa_import4(), rt_eto_import4(), rt_fastf_float(), rt_grp_import4(), rt_hlf_import4(), rt_pg_import4(), rt_rhc_import4(), rt_rpc_import4(), rt_superell_import4(), rt_tgc_import4(), and rt_tor_import4().

Here is the call graph for this function:

void rt_fastf_float ( fastf_t ff,
const dbfloat_t *  fp,
int  n,
int  flip 
)

Convert TO fastf_t FROM 3xfloats (for database)

DEPRECATED.

Definition at line 100 of file db_flip.c.

References flip_fastf_float().

Here is the call graph for this function:

void flip_mat_dbmat ( fastf_t ff,
const dbfloat_t *  dbp,
int  flip 
)

function that flips a dbfloat_t[16] matrix into fastf_t[16]

Definition at line 107 of file db_flip.c.

References flip_dbfloat().

Referenced by rt_comb_import4(), and rt_mat_dbmat().

Here is the call graph for this function:

void rt_mat_dbmat ( fastf_t ff,
const dbfloat_t *  dbp,
int  flip 
)

Convert TO fastf_t matrix FROM dbfloats (for database)

DEPRECATED.

Definition at line 159 of file db_flip.c.

References flip_mat_dbmat().

Here is the call graph for this function:

void flip_dbmat_mat ( dbfloat_t *  dbp,
const fastf_t ff 
)

function that flips a fastf_t[16] matrix into dbfloat_t[16]

Definition at line 166 of file db_flip.c.

Referenced by rt_comb_export4(), and rt_dbmat_mat().

void rt_dbmat_mat ( dbfloat_t *  dbp,
const fastf_t ff 
)

Convert FROM fastf_t matrix TO dbfloats (for updating database)

DEPRECATED.

Definition at line 196 of file db_flip.c.

References flip_dbmat_mat().

Here is the call graph for this function: