BRL-CAD
pnts.c File Reference
#include "common.h"
#include "bnetwork.h"
#include "bu/cv.h"
#include "bn.h"
#include "raytrace.h"
#include "rtgeom.h"
#include "vmath.h"
Include dependency graph for pnts.c:

Go to the source code of this file.

Functions

int rt_ell_plot (struct bu_list *, struct rt_db_internal *, const struct rt_tess_tol *, const struct bn_tol *, const struct rt_view_info *)
 
HIDDEN unsigned char * pnts_pack_double (unsigned char *buf, unsigned char *data, unsigned int count)
 
HIDDEN unsigned char * pnts_unpack_double (unsigned char *buf, unsigned char *data, unsigned int count)
 
int rt_pnts_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_pnts_export5 (struct bu_external *external, const struct rt_db_internal *internal, double local2mm, const struct db_i *dbip)
 
int rt_pnts_import5 (struct rt_db_internal *internal, const struct bu_external *external, const fastf_t *mat, const struct db_i *dbip)
 
void rt_pnts_ifree (struct rt_db_internal *internal)
 
void rt_pnts_print (register const struct soltab *stp)
 
int rt_pnts_plot (struct bu_list *vhead, struct rt_db_internal *internal, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_pnts_describe (struct bu_vls *str, const struct rt_db_internal *intern, int verbose, double mm2local)
 

Detailed Description

Collection of points.

Definition in file pnts.c.

Function Documentation

HIDDEN unsigned char* pnts_pack_double ( unsigned char *  buf,
unsigned char *  data,
unsigned int  count 
)

Definition at line 44 of file pnts.c.

References bu_cv_htond(), and SIZEOF_NETWORK_DOUBLE.

Referenced by rt_pnts_export5().

Here is the call graph for this function:

HIDDEN unsigned char* pnts_unpack_double ( unsigned char *  buf,
unsigned char *  data,
unsigned int  count 
)

Definition at line 53 of file pnts.c.

References bu_cv_ntohd(), and SIZEOF_NETWORK_DOUBLE.

Referenced by rt_pnts_import5().

Here is the call graph for this function:

int rt_pnts_bbox ( struct rt_db_internal ip,
point_t *  min,
point_t *  max,
const struct bn_tol tol 
)

Calculate a bounding box for a set of points

Definition at line 64 of file pnts.c.

References BU_LIST_FOR, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, VSETALL, X, Y, and Z.

int rt_pnts_export5 ( struct bu_external external,
const struct rt_db_internal internal,
double  local2mm,
const struct db_i dbip 
)

Export a pnts collection from the internal structure to the database format

Definition at line 110 of file pnts.c.

References bu_calloc(), BU_CK_EXTERNAL, bu_color_to_rgb_floats(), bu_cv_htond(), BU_LIST_FOR, bu_log(), bu_realloc(), bu_external::ext_buf, bu_external::ext_nbytes, pnts_pack_double(), RT_CK_DB_INTERNAL, RT_CK_DBI, s, SIZEOF_NETWORK_DOUBLE, SIZEOF_NETWORK_LONG, SIZEOF_NETWORK_SHORT, and OSL::Strings::v.

Here is the call graph for this function:

int rt_pnts_import5 ( struct rt_db_internal internal,
const struct bu_external external,
const fastf_t mat,
const struct db_i dbip 
)

Import a pnts collection from the database format to the internal structure and apply modeling transformations.

Definition at line 354 of file pnts.c.

References bn_mat_identity, BU_ALLOC, BU_CK_EXTERNAL, bu_color_from_rgb_floats(), bu_cv_ntohd(), BU_LIST_INIT, BU_LIST_PUSH, bu_log(), bu_external::ext_buf, ID_PNTS, OBJ, pnts_unpack_double(), RT_CK_DB_INTERNAL, RT_CK_DBI, RT_PNTS_INTERNAL_MAGIC, s, SIZEOF_NETWORK_DOUBLE, SIZEOF_NETWORK_LONG, SIZEOF_NETWORK_SHORT, and OSL::Strings::v.

Here is the call graph for this function:

void rt_pnts_ifree ( struct rt_db_internal internal)

Free the storage associated with the rt_db_internal version of the collection. This uses type aliasing to iterate over the list of points as a bu_list instead of calling up a switching table for each point type.

Definition at line 663 of file pnts.c.

References bu_free(), BU_LIST_DEQUEUE, BU_LIST_WHILE, and RT_CK_DB_INTERNAL.

Here is the call graph for this function:

void rt_pnts_print ( register const struct soltab stp)

Definition at line 697 of file pnts.c.

References BU_LIST_FOR, bu_log(), and soltab::st_specific.

Here is the call graph for this function:

int rt_pnts_plot ( struct bu_list vhead,
struct rt_db_internal internal,
const struct rt_tess_tol ttol,
const struct bn_tol tol,
const struct rt_view_info info 
)

Plot pnts collection as axes or spheres.

Definition at line 755 of file pnts.c.

References BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, BU_CK_LIST_HEAD, BU_LIST_FOR, ID_ELL, rt_db_internal::idb_magic, rt_db_internal::idb_major_type, rt_db_internal::idb_ptr, RT_ADD_VLIST, RT_CK_DB_INTERNAL, RT_DB_INTERNAL_MAGIC, RT_ELL_INTERNAL_MAGIC, rt_ell_plot(), VSET, X, Y, and Z.

Here is the call graph for this function:

int rt_pnts_describe ( struct bu_vls str,
const struct rt_db_internal intern,
int  verbose,
double  mm2local 
)

Make human-readable formatted presentation of this primitive. First line describes type of solid. Additional lines are indented one tab, and give parameter values.

Definition at line 832 of file pnts.c.

References BU_LIST_FOR, bu_log(), bu_vls_strcat(), rt_db_internal::idb_ptr, X, Y, and Z.

Here is the call graph for this function: