bn.h File Reference

#include "vmath.h"

Include dependency graph for bn.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bn_tol
 Support for uniform tolerances. More...
struct  bn_complex
struct  bn_unif
struct  bn_gauss
struct  bn_poly
struct  bn_table
struct  bn_tabdata
struct  bn_vlist
struct  bn_vlblock
struct  vert_root
void bn_noise_init ()
double bn_noise_perlin (point_t pt)
void bn_noise_vec (point_t point, point_t result)
double bn_noise_fbm (point_t point, double h_val, double lacunarity, double octaves)
double bn_noise_turb (point_t point, double h_val, double lacunarity, double octaves)
double bn_noise_mf (point_t point, double h_val, double lacunarity, double octaves, double offset)
double bn_noise_ridged (point_t point, double h_val, double lacunarity, double octaves, double offset)

Defines

#define BN_H_VERSION   "@(#)$Header: /cvsroot/brlcad/brlcad/include/bn.h,v 14.19 2006/09/18 05:24:07 lbutler Exp $ (BRL)"
#define BN_AZIMUTH   0
#define BN_ELEVATION   1
#define BN_TWIST   2
#define BN_TOL_MAGIC   0x98c734bb
#define BN_CK_TOL(_p)   BU_CKMAG(_p, BN_TOL_MAGIC, "bn_tol")
#define BN_VECT_ARE_PARALLEL(_dot, _tol)   (((_dot) < 0) ? ((-(_dot))>=(_tol)->para) : ((_dot) >= (_tol)->para))
#define BN_VECT_ARE_PERP(_dot, _tol)   (((_dot) < 0) ? ((-(_dot))<=(_tol)->perp) : ((_dot) <= (_tol)->perp))
#define BN_APPROXEQUAL(_a, _b, _tol)   (fabs( (_a) - (_b) ) <= _tol->dist)
#define bn_cx_copy(ap, bp)   {*(ap) = *(bp);}
#define bn_cx_neg(cp)   { (cp)->re = -((cp)->re);(cp)->im = -((cp)->im);}
#define bn_cx_real(cp)   (cp)->re
#define bn_cx_imag(cp)   (cp)->im
#define bn_cx_add(ap, bp)   { (ap)->re += (bp)->re; (ap)->im += (bp)->im;}
#define bn_cx_ampl(cp)   hypot( (cp)->re, (cp)->im )
#define bn_cx_amplsq(cp)   ( (cp)->re * (cp)->re + (cp)->im * (cp)->im )
#define bn_cx_conj(cp)   { (cp)->im = -(cp)->im; }
#define bn_cx_cons(cp, r, i)   { (cp)->re = r; (cp)->im = i; }
#define bn_cx_phas(cp)   atan2( (cp)->im, (cp)->re )
#define bn_cx_scal(cp, s)   { (cp)->re *= (s); (cp)->im *= (s); }
#define bn_cx_sub(ap, bp)   { (ap)->re -= (bp)->re; (ap)->im -= (bp)->im;}
#define bn_cx_mul(ap, bp)
#define bn_cx_mul2(ap, bp, cp)
#define bn_mat_zero(_m)
#define bn_mat_idn(_m)
#define bn_mat_copy(_d, _s)
#define BN_UNIF_MAGIC   12481632
#define BN_GAUSS_MAGIC   512256128
#define BN_CK_UNIF(_p)   BU_CKMAG(_p, BN_UNIF_MAGIC, "bn_unif")
#define BN_CK_GAUSS(_p)   BU_CKMAG(_p, BN_GAUSS_MAGIC, "bn_gauss")
#define BN_UNIF_LONG(_p)
#define BN_UNIF_DOUBLE(_p)
#define BN_UNIF_CIRCLE(_p, _x, _y, _r)
#define BN_UNIF_SPHERE(_p, _x, _y, _z, _r)
#define BN_GAUSS_DOUBLE(_p)
#define BN_CLASSIFY_UNIMPLEMENTED   0x0000
#define BN_CLASSIFY_OVERLAPPING   0x0002
#define BN_CLASSIFY_INSIDE   0x0001
#define BN_CLASSIFY_OUTSIDE   0x0003
#define BN_MAX_POLY_DEGREE   4
#define BN_POLY_MAGIC   0x506f4c79
#define BN_CK_POLY(_p)   BU_CKMAG(_p, BN_POLY_MAGIC, "struct bn_poly")
#define BN_POLY_NULL   ((struct bn_poly *)NULL)
#define BN_RAND_TABSIZE   4096
#define BN_RAND_TABMASK   0xfff
#define BN_RANDSEED(_i, _seed)   _i = ((unsigned)_seed) % BN_RAND_TABSIZE
#define BN_RANDOM(_i)   bn_rand_table[ _i = (_i+1) % BN_RAND_TABSIZE ]
#define BN_RANDHALF(_i)   (bn_rand_table[ _i = (_i+1) % BN_RAND_TABSIZE ]-0.5)
#define BN_RANDHALF_INIT(_p)   _p = bn_rand_table
#define BN_RANDHALFTABSIZE   16535
#define bn_rand_half(_p)
#define bn_rand_init(_p, _seed)
#define bn_rand0to1(_q)   (bn_rand_half(_q)+0.5)
#define BN_SINTABSIZE   2048
#define bn_tab_sin(_a)
#define CK_POW_2(dimen)
#define BN_TABLE_MAGIC   0x53706374
#define BN_CK_TABLE(_p)   BU_CKMAG(_p, BN_TABLE_MAGIC, "bn_table")
#define BN_TABLE_NULL   ((struct bn_table *)NULL)
#define BN_GET_TABLE(_table, _nx)
#define BN_TABDATA_MAGIC   0x53736d70
#define BN_CK_TABDATA(_p)   BU_CKMAG(_p, BN_TABDATA_MAGIC, "bn_tabdata")
#define BN_TABDATA_NULL   ((struct bn_tabdata *)NULL)
#define BN_SIZEOF_TABDATA_Y(_tabdata)   sizeof(fastf_t)*((_tabdata)->ny)
#define BN_SIZEOF_TABDATA(_table)
#define BN_GET_TABDATA(_data, _table)
#define BN_VLIST_CHUNK   35
 32-bit mach => just less than 1k
#define BN_VLIST_NULL   ((struct bn_vlist *)0)
#define BN_VLIST_MAGIC   0x98237474
#define BN_CK_VLIST(_p)   BU_CKMAG((_p), BN_VLIST_MAGIC, "bn_vlist")
#define BN_CK_VLIST_TCL(_interp, _p)   BU_CKMAG_TCL(_interp,(_p), BN_VLIST_MAGIC, "bn_vlist")
#define BN_VLIST_LINE_MOVE   0
#define BN_VLIST_LINE_DRAW   1
#define BN_VLIST_POLY_START   2
 pt[] has surface normal
#define BN_VLIST_POLY_MOVE   3
 move to first poly vertex
#define BN_VLIST_POLY_DRAW   4
 subsequent poly vertex
#define BN_VLIST_POLY_END   5
 last vert (repeats 1st), draw poly
#define BN_VLIST_POLY_VERTNORM   6
 per-vertex normal, for interpoloation
#define BN_GET_VLIST(_free_hd, p)
#define BN_FREE_VLIST(_free_hd, hd)
#define BN_ADD_VLIST(_free_hd, _dest_hd, pnt, draw)
#define BN_VLBLOCK_MAGIC   0x981bd112
#define BN_CK_VLBLOCK(_p)   BU_CKMAG((_p), BN_VLBLOCK_MAGIC, "bn_vlblock")
#define TREE_TYPE_VERTS   1
#define TREE_TYPE_VERTS_AND_NORMS   2
#define VERT_BLOCK   512
 number of vertices to malloc per call when building the array
#define VERT_TREE_MAGIC   0x56455254
 "VERT"
#define BN_CK_VERT_TREE(_p)   BU_CKMAG(_p, VERT_TREE_MAGIC, "vert_tree")

Typedefs

typedef bn_complex bn_complex_t
typedef bn_poly bn_poly_t

Functions

void anim_v_permute (mat_t m)
 Pre-multiply a rotation matrix by a matrix which maps the z-axis to the negative x-axis, the y-axis to the z-axis and the x-axis to the negative y-axis.
void anim_v_unpermute (mat_t m)
 Undo the mapping done by anim_v_permute().
void anim_tran (mat_t m)
 Transpose matrix in place.
int anim_mat2zyx (const mat_t viewrot, vect_t angle)
 Convert the rotational part of a 4x4 transformation matrix to zyx form, that is to say, rotations carried out in the order z, y, and then x. The angles are stored in radians as a vector in the order x,y,z. A return value of ERROR1 means that arbitrary assumptions were necessary. ERROR2 means that the conversion failed.
int anim_mat2ypr (mat_t viewrot, vect_t angle)
 Convert the rotational part of a 4x4 transformation matrix to yaw-pitch-roll form, that is to say, +roll degrees about the x-axis, -pitch degrees about the y-axis, and +yaw degrees about the z-axis. The angles are stored in radians as a vector in the order y,p,r. A return of ERROR1 means that arbitrary assumptions were necessary. ERROR2 means that the conversion failed.
int anim_mat2quat (hvect_t quat, const mat_t viewrot)
void anim_ypr2mat (mat_t m, const vect_t a)
 Create a premultiplication rotation matrix to turn the front of an object (its x-axis) to the given yaw, pitch, and roll, which is stored in radians in the vector a.
void anim_ypr2vmat (mat_t m, const vect_t a)
 Create a post-multiplication rotation matrix ,which could be used to move the virtual camera to the given yaw, pitch, and roll, which are stored in radians in the given vector a. The following are equivalent sets of commands: ypr2vmat(matrix,a); or ypr2mat(matrix,a); v_permute(matrix); transpose(matrix;.
void anim_y_p_r2mat (mat_t m, double y, double p, double r)
 Make matrix to rotate an object to the given yaw, pitch, and roll. (Specified in radians.).
void anim_dy_p_r2mat (mat_t m, double y, double p, double r)
 Make matrix to rotate an object to the given yaw, pitch, and roll. (Specified in degrees.).
void anim_dy_p_r2vmat (mat_t m, double yaw, double pch, double rll)
 Make a view rotation matrix, given desired yaw, pitch and roll. (Note that the matrix is a permutation of the object rotation matrix).
void anim_x_y_z2mat (mat_t m, double x, double y, double z)
 Make a rotation matrix corresponding to a rotation of "x" radians about the x-axis, "y" radians about the y-axis, and then "z" radians about the z-axis.
void anim_dx_y_z2mat (mat_t m, double x, double y, double z)
 Make a rotation matrix corresponding to a rotation of "x" degrees about the x-axis, "y" degrees about the y-axis, and then "z" degrees about the z-axis.
void anim_zyx2mat (mat_t m, const vect_t a)
void anim_z_y_x2mat (mat_t m, double x, double y, double z)
 Make a rotation matrix corresponding to a rotation of "z" radians about the z-axis, "y" radians about the y-axis, and then "x" radians about the x-axis.
void anim_dz_y_x2mat (mat_t m, double x, double y, double z)
 Make a rotation matrix corresponding to a rotation of "z" degrees about the z-axis, "y" degrees about the y-axis, and then "x" degrees about the x-axis.
void anim_quat2mat (mat_t m, const hvect_t qq)
void anim_dir2mat (mat_t m, const vect_t d, const vect_t d2)
void anim_dirn2mat (mat_t m, const vect_t dx, const vect_t dn)
int anim_steer_mat (mat_t mat, vect_t point, int end)
void anim_add_trans (mat_t m, const vect_t post, const vect_t pre)
void anim_rotatez (fastf_t a, vect_t d)
void anim_mat_print (FILE *fp, const mat_t m, int s_colon)
void anim_mat_printf (FILE *fp, const mat_t m, const char *formstr, const char *linestr, const char *endstr)
void anim_view_rev (mat_t m)
int bn_decode_mat (mat_t m, const char *str)
int bn_decode_quat (hvect_t q, const char *str)
int bn_decode_vect (vect_t v, const char *str)
int bn_decode_hvect (hvect_t v, const char *str)
void bn_encode_mat (struct bu_vls *vp, const mat_t m)
void bn_encode_quat (struct bu_vls *vp, const hvect_t q)
void bn_encode_vect (struct bu_vls *vp, const vect_t v)
void bn_encode_hvect (struct bu_vls *vp, const hvect_t v)
void bn_tcl_setup ()
int Bn_Init ()
void bn_tcl_mat_print ()
void bn_cx_div (bn_complex_t *ap, const bn_complex_t *bp)
void bn_cx_sqrt (bn_complex_t *op, const bn_complex_t *ip)
void bn_mat_print (const char *title, const mat_t m)
void bn_mat_print_guts (const char *title, const mat_t m, char *buf)
double bn_atan2 (double x, double y)
 A wrapper for the system atan2(). On the Silicon Graphics, and perhaps on others, x==0 incorrectly returns infinity.
void bn_mat_mul (register mat_t o, register const mat_t a, register const mat_t b)
 Multiply matrix "a" by "b" and store the result in "o". NOTE: This is different from multiplying "b" by "a" (most of the time!) NOTE: "o" must not be the same as either of the inputs.
void bn_mat_mul2 (register const mat_t i, register mat_t o)
 A convenience wrapper for bn_mat_mul() to update a matrix in place. The arugment ordering is confusing either way.
void bn_mat_mul3 (mat_t o, const mat_t a, const mat_t b, const mat_t c)
void bn_mat_mul4 (mat_t o, const mat_t a, const mat_t b, const mat_t c, const mat_t d)
void bn_matXvec (register hvect_t ov, register const mat_t im, register const hvect_t iv)
void bn_mat_inv (register mat_t output, const mat_t input)
int bn_mat_inverse (register mat_t output, const mat_t input)
void bn_vtoh_move (register vect_t h, register const vect_t v)
void bn_htov_move (register vect_t v, register const vect_t h)
void bn_mat_trn (mat_t om, register const mat_t im)
void bn_mat_ae (register mat_t m, double azimuth, double elev)
void bn_ae_vec (fastf_t *azp, fastf_t *elp, const vect_t v)
void bn_aet_vec (fastf_t *az, fastf_t *el, fastf_t *twist, vect_t vec_ae, vect_t vec_twist, fastf_t accuracy)
void bn_mat_angles (register mat_t mat, double alpha, double beta, double ggamma)
void bn_mat_angles_rad (register mat_t mat, double alpha, double beta, double ggamma)
 This routine builds a Homogeneous rotation matrix, given alpha, beta, and gamma as angles of rotation, in radians.
void bn_eigen2x2 (fastf_t *val1, fastf_t *val2, vect_t vec1, vect_t vec2, fastf_t a, fastf_t b, fastf_t c)
void bn_vec_perp (vect_t new_vec, const vect_t old_vec)
 Given a vector, create another vector which is perpendicular to it. The output vector will have unit length only if the input vector did.
void bn_mat_fromto (mat_t m, const vect_t from, const vect_t to)
 Given two vectors, compute a rotation matrix that will transform space by the angle between the two. There are many candidate matricies.
void bn_mat_xrot (mat_t m, double sinx, double cosx)
void bn_mat_yrot (mat_t m, double siny, double cosy)
void bn_mat_zrot (mat_t m, double sinz, double cosz)
void bn_mat_lookat (mat_t rot, const vect_t dir, int yflip)
void bn_vec_ortho (register vect_t out, register const vect_t in)
 Given a vector, create another vector which is perpendicular to it, and with unit length. This algorithm taken from Gift's arvec.f; a faster algorithm may be possible.
int bn_mat_scale_about_pt (mat_t mat, const point_t pt, const double scale)
 Build a matrix to scale uniformly around a given point.
void bn_mat_xform_about_pt (mat_t mat, const mat_t xform, const point_t pt)
 Build a matrix to apply arbitary 4x4 transformation around a given point.
int bn_mat_is_equal (const mat_t a, const mat_t b, const struct bn_tol *tol)
int bn_mat_is_identity (const mat_t m)
void bn_mat_arb_rot (mat_t m, const point_t pt, const vect_t dir, const fastf_t ang)
 Construct a transformation matrix for rotation about an arbitrary axis.
matp_t bn_mat_dup (const mat_t in)
int bn_mat_ck (const char *title, const mat_t m)
fastf_t bn_mat_det3 (const mat_t m)
fastf_t bn_mat_determinant (const mat_t m)
int bn_mat_is_non_unif (const mat_t m)
bn_unifbn_unif_init (long setseed, int method)
void bn_unif_free (struct bn_unif *p)
long bn_unif_long_fill (struct bn_unif *p)
double bn_unif_double_fill (struct bn_unif *p)
bn_gaussbn_gauss_init (long setseed, int method)
void bn_gauss_free (struct bn_gauss *p)
double bn_gauss_fill (struct bn_gauss *p)
int bn_distsq_line3_line3 (fastf_t dist[3], point_t P, vect_t d, point_t Q, vect_t e, point_t pt1, point_t pt2)
int bn_dist_pt3_lseg3 (fastf_t *dist, point_t pca, const point_t a, const point_t b, const point_t p, const struct bn_tol *tol)
int bn_3pts_collinear (point_t a, point_t b, point_t c, const struct bn_tol *tol)
int bn_pt3_pt3_equal (const point_t a, const point_t b, const struct bn_tol *tol)
int bn_dist_pt2_lseg2 (fastf_t *dist_sq, fastf_t pca[2], const point_t a, const point_t b, const point_t p, const struct bn_tol *tol)
int bn_isect_lseg3_lseg3 (fastf_t *dist, const point_t p, const vect_t pdir, const point_t q, const vect_t qdir, const struct bn_tol *tol)
int bn_isect_line3_line3 (fastf_t *t, fastf_t *u, const point_t p, const vect_t d, const point_t a, const vect_t c, const struct bn_tol *tol)
int bn_2line3_colinear (const point_t p1, const vect_t d1, const point_t p2, const vect_t d2, double range, const struct bn_tol *tol)
int bn_isect_pt2_lseg2 (fastf_t *dist, const point_t a, const point_t b, const point_t p, const struct bn_tol *tol)
int bn_isect_line2_lseg2 (fastf_t *dist, const point_t p, const vect_t d, const point_t a, const vect_t c, const struct bn_tol *tol)
int bn_isect_lseg2_lseg2 (fastf_t *dist, const point_t p, const vect_t pdir, const point_t q, const vect_t qdir, const struct bn_tol *tol)
int bn_isect_line2_line2 (fastf_t *dist, const point_t p, const vect_t d, const point_t a, const vect_t c, const struct bn_tol *tol)
double bn_dist_pt3_pt3 (const point_t a, const point_t b)
int bn_3pts_distinct (const point_t a, const point_t b, const point_t c, const struct bn_tol *tol)
int bn_mk_plane_3pts (plane_t plane, const point_t a, const point_t b, const point_t c, const struct bn_tol *tol)
int bn_mkpoint_3planes (point_t pt, const plane_t a, const plane_t b, const plane_t c)
int bn_isect_line3_plane (fastf_t *dist, const point_t pt, const vect_t dir, const plane_t plane, const struct bn_tol *tol)
int bn_isect_2planes (point_t pt, vect_t dir, const plane_t a, const plane_t b, const vect_t rpp_min, const struct bn_tol *tol)
int bn_isect_2lines (fastf_t *t, fastf_t *u, const point_t p, const vect_t d, const point_t a, const vect_t c, const struct bn_tol *tol)
int bn_isect_line_lseg (fastf_t *t, const point_t p, const vect_t d, const point_t a, const point_t b, const struct bn_tol *tol)
double bn_dist_line3_pt3 (const point_t pt, const vect_t dir, const point_t a)
double bn_distsq_line3_pt3 (const point_t pt, const vect_t dir, const point_t a)
double bn_dist_line_origin (const point_t pt, const vect_t dir)
double bn_dist_line2_point2 (const point_t pt, const vect_t dir, const point_t a)
double bn_distsq_line2_point2 (const point_t pt, const vect_t dir, const point_t a)
double bn_area_of_triangle (const point_t a, const point_t b, const point_t c)
int bn_isect_pt_lseg (fastf_t *dist, const point_t a, const point_t b, const point_t p, const struct bn_tol *tol)
double bn_dist_pt_lseg (point_t pca, const point_t a, const point_t b, const point_t p, const struct bn_tol *tol)
void bn_rotate_bbox (point_t omin, point_t omax, const mat_t mat, const point_t imin, const point_t imax)
void bn_rotate_plane (plane_t oplane, const mat_t mat, const plane_t iplane)
int bn_coplanar (const plane_t a, const plane_t b, const struct bn_tol *tol)
double bn_angle_measure (vect_t vec, const vect_t x_dir, const vect_t y_dir)
double bn_dist_pt3_along_line3 (const point_t p, const vect_t d, const point_t x)
double bn_dist_pt2_along_line2 (const point_t p, const vect_t d, const point_t x)
int bn_between (double left, double mid, double right, const struct bn_tol *tol)
int bn_does_ray_isect_tri (const point_t pt, const vect_t dir, const point_t V, const point_t A, const point_t B, point_t inter)
int bn_hlf_class (const plane_t half_eqn, const vect_t min, const vect_t max, const struct bn_tol *tol)
int bn_isect_planes (point_t pt, const plane_t planes[], const int pl_count)
bn_polybn_poly_mul (struct bn_poly *product, const struct bn_poly *m1, const struct bn_poly *m2)
bn_polybn_poly_scale (struct bn_poly *eqn, double factor)
bn_polybn_poly_add (struct bn_poly *sum, const struct bn_poly *poly1, const struct bn_poly *poly2)
bn_polybn_poly_sub (struct bn_poly *diff, const struct bn_poly *poly1, const struct bn_poly *poly2)
void bn_poly_synthetic_division (struct bn_poly *quo, struct bn_poly *rem, const struct bn_poly *dvdend, const struct bn_poly *dvsor)
int bn_poly_quadratic_roots (struct bn_complex roots[], const struct bn_poly *quadrat)
int bn_poly_cubic_roots (struct bn_complex roots[], const struct bn_poly *eqn)
int bn_poly_quartic_roots (struct bn_complex roots[], const struct bn_poly *eqn)
void bn_pr_poly (const char *title, const struct bn_poly *eqn)
void bn_pr_roots (const char *title, const struct bn_complex roots[], int n)
void quat_mat2quat (hvect_t quat, const mat_t mat)
void quat_quat2mat (mat_t mat, const hvect_t quat)
double quat_distance (const hvect_t q1, const hvect_t q2)
void quat_double (hvect_t qout, const hvect_t q1, const hvect_t q2)
void quat_bisect (hvect_t qout, const hvect_t q1, const hvect_t q2)
void quat_slerp (hvect_t qout, const hvect_t q1, const hvect_t q2, double f)
void quat_sberp (hvect_t qout, const hvect_t q1, const hvect_t qa, const hvect_t qb, const hvect_t q2, double f)
void quat_make_nearest (hvect_t q1, const hvect_t q2)
void quat_print (const char *title, const hvect_t quat)
void quat_exp (hvect_t out, const hvect_t in)
void quat_log (hvect_t out, const hvect_t in)
void bn_mathtab_constant (void)
 For benchmarking purposes, make the random number table predictable. Setting to all zeros keeps dithered values at their original values.
void bn_wlt_haar_1d_double_decompose (double *tbuf, double *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_1d_double_reconstruct (double *tbuf, double *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_1d_float_decompose (float *tbuf, float *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_1d_float_reconstruct (float *tbuf, float *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_1d_char_decompose (char *tbuf, char *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_1d_char_reconstruct (char *tbuf, char *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_1d_short_decompose (short *tbuf, short *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_1d_short_reconstruct (short *tbuf, short *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_1d_int_decompose (int *tbuf, int *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_1d_int_reconstruct (int *tbuf, int *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_1d_long_decompose (long *tbuf, long *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_1d_long_reconstruct (long *tbuf, long *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_double_decompose (double *tbuf, double *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_2d_double_reconstruct (double *tbuf, double *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_float_decompose (float *tbuf, float *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_2d_float_reconstruct (float *tbuf, float *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_char_decompose (char *tbuf, char *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_2d_char_reconstruct (char *tbuf, char *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_short_decompose (short *tbuf, short *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_2d_short_reconstruct (short *tbuf, short *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_int_decompose (int *tbuf, int *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_2d_int_reconstruct (int *tbuf, int *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_long_decompose (long *tbuf, long *buf, unsigned long dimen, unsigned long depth, unsigned long limit)
void bn_wlt_haar_2d_long_reconstruct (long *tbuf, long *buf, unsigned long dimen, unsigned long depth, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_double_decompose2 (double *tbuf, double *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long limit)
void bn_wlt_haar_2d_double_reconstruct2 (double *tbuf, double *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_float_decompose2 (float *tbuf, float *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long limit)
void bn_wlt_haar_2d_float_reconstruct2 (float *tbuf, float *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_char_decompose2 (char *tbuf, char *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long limit)
void bn_wlt_haar_2d_char_reconstruct2 (char *tbuf, char *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_short_decompose2 (short *tbuf, short *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long limit)
void bn_wlt_haar_2d_short_reconstruct2 (short *tbuf, short *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_int_decompose2 (int *tbuf, int *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long limit)
void bn_wlt_haar_2d_int_reconstruct2 (int *tbuf, int *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long subimage_size, unsigned long limit)
void bn_wlt_haar_2d_long_decompose2 (long *tbuf, long *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long limit)
void bn_wlt_haar_2d_long_reconstruct2 (long *tbuf, long *buf, unsigned long dimen, unsigned long width, unsigned long height, unsigned long subimage_size, unsigned long limit)
void bn_table_free (struct bn_table *tabp)
void bn_tabdata_free (struct bn_tabdata *data)
void bn_ck_table (const struct bn_table *tabp)
bn_tablebn_table_make_uniform (int num, double first, double last)
void bn_tabdata_add (struct bn_tabdata *out, const struct bn_tabdata *in1, const struct bn_tabdata *in2)
void bn_tabdata_mul (struct bn_tabdata *out, const struct bn_tabdata *in1, const struct bn_tabdata *in2)
void bn_tabdata_mul3 (struct bn_tabdata *out, const struct bn_tabdata *in1, const struct bn_tabdata *in2, const struct bn_tabdata *in3)
void bn_tabdata_incr_mul3_scale (struct bn_tabdata *out, const struct bn_tabdata *in1, const struct bn_tabdata *in2, const struct bn_tabdata *in3, double scale)
void bn_tabdata_incr_mul2_scale (struct bn_tabdata *out, const struct bn_tabdata *in1, const struct bn_tabdata *in2, double scale)
void bn_tabdata_scale (struct bn_tabdata *out, const struct bn_tabdata *in1, double scale)
void bn_table_scale (struct bn_table *tabp, double scale)
void bn_tabdata_join1 (struct bn_tabdata *out, const struct bn_tabdata *in1, double scale, const struct bn_tabdata *in2)
void bn_tabdata_join2 (struct bn_tabdata *out, const struct bn_tabdata *in1, double scale2, const struct bn_tabdata *in2, double scale3, const struct bn_tabdata *in3)
void bn_tabdata_blend2 (struct bn_tabdata *out, double scale1, const struct bn_tabdata *in1, double scale2, const struct bn_tabdata *in2)
void bn_tabdata_blend3 (struct bn_tabdata *out, double scale1, const struct bn_tabdata *in1, double scale2, const struct bn_tabdata *in2, double scale3, const struct bn_tabdata *in3)
double bn_tabdata_area1 (const struct bn_tabdata *in)
double bn_tabdata_area2 (const struct bn_tabdata *in)
double bn_tabdata_mul_area1 (const struct bn_tabdata *in1, const struct bn_tabdata *in2)
double bn_tabdata_mul_area2 (const struct bn_tabdata *in1, const struct bn_tabdata *in2)
fastf_t bn_table_lin_interp (const struct bn_tabdata *samp, double wl)
bn_tabdatabn_tabdata_resample_max (const struct bn_table *newtable, const struct bn_tabdata *olddata)
bn_tabdatabn_tabdata_resample_avg (const struct bn_table *newtable, const struct bn_tabdata *olddata)
int bn_table_write (const char *filename, const struct bn_table *tabp)
bn_tablebn_table_read (const char *filename)
void bn_pr_table (const char *title, const struct bn_table *tabp)
void bn_pr_tabdata (const char *title, const struct bn_tabdata *data)
int bn_print_table_and_tabdata (const char *filename, const struct bn_tabdata *data)
bn_tabdatabn_read_table_and_tabdata (const char *filename)
bn_tabdatabn_tabdata_binary_read (const char *filename, int num, const struct bn_table *tabp)
bn_tabdatabn_tabdata_malloc_array (const struct bn_table *tabp, int num)
void bn_tabdata_copy (struct bn_tabdata *out, const struct bn_tabdata *in)
bn_tabdatabn_tabdata_dup (const struct bn_tabdata *in)
bn_tabdatabn_tabdata_get_constval (double val, const struct bn_table *tabp)
void bn_tabdata_constval (struct bn_tabdata *data, double val)
void bn_tabdata_to_tcl (struct bu_vls *vp, const struct bn_tabdata *data)
bn_tabdatabn_tabdata_from_array (const double *array)
void bn_tabdata_freq_shift (struct bn_tabdata *out, const struct bn_tabdata *in, double offset)
int bn_table_interval_num_samples (const struct bn_table *tabp, double low, double hi)
int bn_table_delete_sample_pts (struct bn_table *tabp, int i, int j)
bn_tablebn_table_merge2 (const struct bn_table *a, const struct bn_table *b)
bn_tabdatabn_tabdata_mk_linear_filter (const struct bn_table *spectrum, double lower_wavelen, double upper_wavelen)
void bn_vlist_3string (struct bu_list *vhead, struct bu_list *free_hd, const char *string, const point_t origin, const mat_t rot, double scale)
 Convert a string to a vlist.
void bn_vlist_2string (struct bu_list *vhead, struct bu_list *free_hd, const char *string, double x, double y, double scale, double theta)
 Convert string to vlist in 2D.
vert_rootcreate_vert_tree ()
 routine to create a vertex tree.
vert_rootcreate_vert_tree_w_norms ()
 routine to create a vertex tree.
void free_vert_tree (struct vert_root *tree_root)
 Routine to free a vertex tree and all associated dynamic memory.
int Add_vert (double x, double y, double z, struct vert_root *tree_root, fastf_t local_tol_sq)
 Routine to add a vertex to the current list of part vertices. The array is re-alloc'd if needed. Returns index into the array of vertices where this vertex is stored.
int Add_vert_and_norm (double x, double y, double z, double nx, double ny, double nz, struct vert_root *tree_root, fastf_t local_tol_sq)
 Routine to add a vertex and a normal to the current list of part vertices. The array is re-alloc'd if needed. Returns index into the array of vertices where this vertex and normal is stored.
void clean_vert_tree (struct vert_root *tree_root)
 Routine to free the binary search tree and reset the current number of vertices. The vertex array is left untouched, for re-use later.
void tp_setup ()
 Once-only setup routine Used by libplot3/symbol.c, so it can't be static.

Variables

const mat_t bn_mat_identity
const float bn_rand_table [BN_RAND_TABSIZE]
int bn_randhalftabsize
float bn_rand_halftab [BN_RANDHALFTABSIZE]
double bn_sin_scale
 SINTABSIZE / TWOPI.
const float bn_sin_table [BN_SINTABSIZE]
 table of sine values.
const double bn_pi
 pi
const double bn_twopi
 pi*2
const double bn_halfpi
 pi/2
const double bn_invpi
 1/pi
const double bn_inv2pi
 1/(pi*2)
const double bn_inv255
const double bn_degtorad
 (pi*2)/360
const double bn_radtodeg
 360/(pi*2)
const char bn_version []


Detailed Description

Header file for the BRL-CAD Numerical Computation Library, LIBBN.

The library provides a broad assortment of numerical algorithms and computational routines, including random number generation, vector math, matrix math, quaternion math, complex math, synthetic division, root finding, etc.

??Should complex.h and plane.h and polyno.h get absorbed in here?? ??absorbed/included??

Author:
Michael John Muuss

Lee A Butler

Douglas A Gwyn

Jeff Hanes

Modifications & Additions
Christopher Sean Morrison
Source -
The U. S. Army Research Laboratory
Aberdeen Proving Ground, Maryland 21005-5068 USA
Include Sequencing -
        # include "common.h"
        # include <stdio.h>
        # include <math.h>
        # include "machine.h"   /_* For fastf_t definition on this machine *_/
        # include "bu.h"
        # include "vmath.h"
        # include "bn.h"

Libraries Used -
-lm -lc
Header
/cvsroot/brlcad/brlcad/include/bn.h,v 14.19 2006/09/18 05:24:07 lbutler Exp

Definition in file bn.h.


Define Documentation

#define bn_mat_zero _m   ) 
 

Value:

{ \
        bu_log("%s:%d bn_mat_zero() is deprecated, use MAT_ZERO()\n", \
                        __FILE__, __LINE__); \
        (_m)[0] = (_m)[1] = (_m)[2] = (_m)[3] = \
        (_m)[4] = (_m)[5] = (_m)[6] = (_m)[7] = \
        (_m)[8] = (_m)[9] = (_m)[10] = (_m)[11] = \
        (_m)[12] = (_m)[13] = (_m)[14] = (_m)[15] = 0.0; }

Definition at line 368 of file bn.h.

#define bn_mat_idn _m   ) 
 

Value:

{ \
        bu_log("%s:%d bn_mat_idn() is deprecated, use MAT_IDN()\n", \
                        __FILE__, __LINE__); \
        (_m)[1] = (_m)[2] = (_m)[3] = (_m)[4] = \
        (_m)[6] = (_m)[7] = (_m)[8] = (_m)[9] = \
        (_m)[11] = (_m)[12] = (_m)[13] = (_m)[14] = 0.0; \
        (_m)[0] = (_m)[5] = (_m)[10] = (_m)[15] = 1.0; }

Definition at line 378 of file bn.h.

#define bn_mat_copy _d,
_s   ) 
 

Value:

{ \
        bu_log("%s:%d bn_mat_copy() is deprecated, use MAT_COPY()\n", \
                        __FILE__, __LINE__); \
        (_d)[0] = (_s)[0];\
        (_d)[1] = (_s)[1];\
        (_d)[2] = (_s)[2];\
        (_d)[3] = (_s)[3];\
        (_d)[4] = (_s)[4];\
        (_d)[5] = (_s)[5];\
        (_d)[6] = (_s)[6];\
        (_d)[7] = (_s)[7];\
        (_d)[8] = (_s)[8];\
        (_d)[9] = (_s)[9];\
        (_d)[10] = (_s)[10];\
        (_d)[11] = (_s)[11];\
        (_d)[12] = (_s)[12];\
        (_d)[13] = (_s)[13];\
        (_d)[14] = (_s)[14];\
        (_d)[15] = (_s)[15]; }

Definition at line 389 of file bn.h.

#define BN_CLASSIFY_UNIMPLEMENTED   0x0000
 

Definition at line 879 of file bn.h.

Referenced by bn_hlf_class().

#define BN_CLASSIFY_OVERLAPPING   0x0002
 

Definition at line 880 of file bn.h.

#define BN_CLASSIFY_INSIDE   0x0001
 

Definition at line 881 of file bn.h.

#define BN_CLASSIFY_OUTSIDE   0x0003
 

Definition at line 882 of file bn.h.

Referenced by rt_arb_class().

#define CK_POW_2 dimen   ) 
 

Value:

{ register unsigned long j; register int ok;\
        for (ok=0, j=0 ; j < sizeof(unsigned long) * 8 ; j++) { \
                if ( (1<<j) == dimen) { ok = 1;  break; } \
        } \
        if ( ! ok ) { \
                bu_log("%s:%d value %d should be power of 2 (2^%d)\n", \
                        __FILE__, __LINE__, dimen, j); \
                bu_bomb("CK_POW_2"); \
                }\
}

Definition at line 1070 of file bn.h.

#define BN_TABLE_MAGIC   0x53706374
 

Definition at line 1402 of file bn.h.

Referenced by bu_identify_magic().

#define BN_CK_TABLE _p   )     BU_CKMAG(_p, BN_TABLE_MAGIC, "bn_table")
 

Definition at line 1403 of file bn.h.

Referenced by bn_ck_table(), bn_pr_table(), bn_print_table_and_tabdata(), bn_tabdata_area2(), bn_tabdata_binary_read(), bn_tabdata_free(), bn_tabdata_get_constval(), bn_tabdata_malloc_array(), bn_tabdata_mk_linear_filter(), bn_tabdata_mul_area2(), bn_tabdata_resample_avg(), bn_tabdata_resample_max(), bn_tabdata_to_tcl(), bn_table_delete_sample_pts(), bn_table_find_x(), bn_table_free(), bn_table_interval_num_samples(), bn_table_lin_interp(), bn_table_merge2(), bn_table_scale(), bn_table_write(), rt_spect_black_body(), rt_spect_black_body_fast(), rt_spect_black_body_points(), rt_spect_make_CIE_XYZ(), and rt_spect_reflectance_rgb().

#define BN_TABLE_NULL   ((struct bn_table *)NULL)
 

Definition at line 1404 of file bn.h.

#define BN_GET_TABLE _table,
_nx   ) 
 

Value:

{ \
        if( (_nx) < 1 )  bu_bomb("RT_GET_TABLE() _nx < 1\n"); \
        _table = (struct bn_table *)bu_calloc( 1, \
                sizeof(struct bn_table) + sizeof(fastf_t)*(_nx), \
                "struct bn_table" ); \
        _table->magic = BN_TABLE_MAGIC; \
        _table->nx = (_nx);  }

Definition at line 1408 of file bn.h.

Referenced by bn_tabdata_from_array(), bn_table_make_uniform(), bn_table_merge2(), and bn_table_read().

#define BN_TABDATA_MAGIC   0x53736d70
 

Definition at line 1430 of file bn.h.

Referenced by bn_tabdata_malloc_array(), and bu_identify_magic().

#define BN_CK_TABDATA _p   )     BU_CKMAG(_p, BN_TABDATA_MAGIC, "bn_tabdata")
 

Definition at line 1431 of file bn.h.

Referenced by bn_pr_tabdata(), bn_print_table_and_tabdata(), bn_tabdata_add(), bn_tabdata_area1(), bn_tabdata_area2(), bn_tabdata_binary_read(), bn_tabdata_blend2(), bn_tabdata_blend3(), bn_tabdata_constval(), bn_tabdata_copy(), bn_tabdata_dup(), bn_tabdata_free(), bn_tabdata_freq_shift(), bn_tabdata_incr_mul2_scale(), bn_tabdata_incr_mul3_scale(), bn_tabdata_join1(), bn_tabdata_join2(), bn_tabdata_mul(), bn_tabdata_mul3(), bn_tabdata_mul_area1(), bn_tabdata_mul_area2(), bn_tabdata_resample_avg(), bn_tabdata_resample_max(), bn_tabdata_scale(), bn_tabdata_to_tcl(), bn_table_lin_interp(), rt_spect_black_body(), rt_spect_black_body_fast(), rt_spect_black_body_points(), and rt_spect_reflectance_rgb().

#define BN_TABDATA_NULL   ((struct bn_tabdata *)NULL)
 

Definition at line 1432 of file bn.h.

#define BN_SIZEOF_TABDATA_Y _tabdata   )     sizeof(fastf_t)*((_tabdata)->ny)
 

Definition at line 1434 of file bn.h.

Referenced by bn_tabdata_copy(), and bn_tabdata_dup().

#define BN_SIZEOF_TABDATA _table   ) 
 

Value:

( sizeof(struct bn_tabdata) + \
                        sizeof(fastf_t)*((_table)->nx-1))

Definition at line 1435 of file bn.h.

Referenced by bn_tabdata_binary_read(), and bn_tabdata_malloc_array().

#define BN_GET_TABDATA _data,
_table   ) 
 

Value:

{ \
        BN_CK_TABLE(_table);\
        _data = (struct bn_tabdata *)bu_calloc( 1, \
                BN_SIZEOF_TABDATA(_table), "struct bn_tabdata" ); \
        _data->magic = BN_TABDATA_MAGIC; \
        _data->ny = (_table)->nx; \
        _data->table = (_table); }

Definition at line 1439 of file bn.h.

Referenced by bn_tabdata_dup(), bn_tabdata_get_constval(), bn_tabdata_mk_linear_filter(), bn_tabdata_resample_avg(), bn_tabdata_resample_max(), and rt_spect_make_CIE_XYZ().

#define BN_VLIST_CHUNK   35
 

32-bit mach => just less than 1k

Definition at line 1598 of file bn.h.

Referenced by rt_extrude_plot().

#define BN_VLIST_NULL   ((struct bn_vlist *)0)
 

Definition at line 1630 of file bn.h.

#define BN_VLIST_MAGIC   0x98237474
 

Definition at line 1631 of file bn.h.

Referenced by bu_identify_magic().

#define BN_CK_VLIST _p   )     BU_CKMAG((_p), BN_VLIST_MAGIC, "bn_vlist")
 

Definition at line 1632 of file bn.h.

Referenced by bn_vlist_cleanup(), and rt_ck_vlist().

#define BN_CK_VLIST_TCL _interp,
_p   )     BU_CKMAG_TCL(_interp,(_p), BN_VLIST_MAGIC, "bn_vlist")
 

Definition at line 1633 of file bn.h.

#define BN_VLIST_LINE_MOVE   0
 

Definition at line 1636 of file bn.h.

Referenced by bn_vlist_3string(), bn_vlist_rpp(), draw_linear_seg(), draw_pipe_arc(), nmg_eu_to_vlist(), nmg_lu_to_vlist(), nmg_snurb_fu_to_vlist(), nmg_vlblock_e(), nmg_vlblock_eu(), nmg_vlblock_euleft(), nmg_vlblock_v(), nmg_vlist_to_eu(), nmg_vlist_to_wire_edges(), nmg_vu_to_vlist(), rt_ars_plot(), rt_bot_plot(), rt_cline_plot(), rt_ebm_plate(), rt_ehy_plot(), rt_ell_plot(), rt_epa_plot(), rt_extrude_plot(), rt_grp_plot(), rt_hf_plot(), rt_hlf_plot(), rt_metaball_plot_sph(), rt_part_plot(), rt_pg_plot(), rt_process_uplot_value(), rt_rhc_plot(), rt_superell_plot(), rt_tgc_plot(), rt_vlist_to_uplot(), rt_vol_plate(), and seg_to_vlist().

#define BN_VLIST_LINE_DRAW   1
 

Definition at line 1637 of file bn.h.

Referenced by bn_vlist_3string(), bn_vlist_rpp(), draw_linear_seg(), draw_pipe_arc(), nmg_eu_to_vlist(), nmg_lu_to_vlist(), nmg_snurb_fu_to_vlist(), nmg_vlblock_e(), nmg_vlblock_eu(), nmg_vlblock_euleft(), nmg_vlblock_v(), nmg_vlist_to_eu(), nmg_vlist_to_wire_edges(), nmg_vu_to_vlist(), rt_ars_plot(), rt_bot_plot(), rt_cline_plot(), rt_ebm_plate(), rt_ehy_plot(), rt_ell_plot(), rt_epa_plot(), rt_extrude_plot(), rt_grp_plot(), rt_hf_plot(), rt_hlf_plot(), rt_metaball_plot_sph(), rt_part_plot(), rt_pg_plot(), rt_process_uplot_value(), rt_rhc_plot(), rt_superell_plot(), rt_tgc_plot(), rt_vlist_to_uplot(), rt_vol_plate(), and seg_to_vlist().

#define BN_VLIST_POLY_START   2
 

pt[] has surface normal

Definition at line 1638 of file bn.h.

Referenced by nmg_lu_to_vlist(), nmg_vlist_to_eu(), nmg_vlist_to_wire_edges(), rt_bot_plot_poly(), rt_pg_plot_poly(), and rt_vlist_to_uplot().

#define BN_VLIST_POLY_MOVE   3
 

move to first poly vertex

Definition at line 1639 of file bn.h.

Referenced by nmg_lu_to_vlist(), nmg_vlist_to_eu(), nmg_vlist_to_wire_edges(), rt_bot_plot_poly(), rt_pg_plot_poly(), and rt_vlist_to_uplot().

#define BN_VLIST_POLY_DRAW   4
 

subsequent poly vertex

Definition at line 1640 of file bn.h.

Referenced by nmg_lu_to_vlist(), nmg_vlist_to_eu(), nmg_vlist_to_wire_edges(), rt_bot_plot_poly(), rt_pg_plot_poly(), and rt_vlist_to_uplot().

#define BN_VLIST_POLY_END   5
 

last vert (repeats 1st), draw poly

Definition at line 1641 of file bn.h.

Referenced by nmg_lu_to_vlist(), nmg_vlist_to_eu(), nmg_vlist_to_wire_edges(), rt_bot_plot_poly(), and rt_vlist_to_uplot().

#define BN_VLIST_POLY_VERTNORM   6
 

per-vertex normal, for interpoloation

Definition at line 1642 of file bn.h.

Referenced by nmg_lu_to_vlist(), rt_bot_plot_poly(), and rt_ck_vlist().

#define BN_GET_VLIST _free_hd,
 ) 
 

Value:

{\
                (p) = BU_LIST_FIRST( bn_vlist, (_free_hd) ); \
                if( BU_LIST_IS_HEAD( (p), (_free_hd) ) )  { \
                        (p) = (struct bn_vlist *)bu_malloc(sizeof(struct bn_vlist), "bn_vlist"); \
                        (p)->l.magic = BN_VLIST_MAGIC; \
                } else { \
                        BU_LIST_DEQUEUE( &((p)->l) ); \
                } \
                (p)->nused = 0; \
        }
Applications that are going to use BN_ADD_VLIST and BN_GET_VLIST are required to execute this macro once, on their _free_hd: BU_LIST_INIT( &_free_hd );

Note that BN_GET_VLIST and BN_FREE_VLIST are non-PARALLEL.

Definition at line 1651 of file bn.h.

#define BN_FREE_VLIST _free_hd,
hd   ) 
 

Value:

{ \
        BU_CK_LIST_HEAD( (hd) ); \
        BU_LIST_APPEND_LIST( (_free_hd), (hd) ); \
        }
Place an entire chain of bn_vlist structs on the freelist _free_hd

Definition at line 1663 of file bn.h.

Referenced by rt_vlblock_free().

#define BN_ADD_VLIST _free_hd,
_dest_hd,
pnt,
draw   ) 
 

Value:

{ \
        register struct bn_vlist *_vp; \
        BU_CK_LIST_HEAD( _dest_hd ); \
        _vp = BU_LIST_LAST( bn_vlist, (_dest_hd) ); \
        if( BU_LIST_IS_HEAD( _vp, (_dest_hd) ) || _vp->nused >= BN_VLIST_CHUNK )  { \
                BN_GET_VLIST(_free_hd, _vp); \
                BU_LIST_INSERT( (_dest_hd), &(_vp->l) ); \
        } \
        VMOVE( _vp->pt[_vp->nused], (pnt) ); \
        _vp->cmd[_vp->nused++] = (draw); \
        }

Definition at line 1668 of file bn.h.

Referenced by bn_vlist_3string(), bn_vlist_rpp(), rt_process_uplot_value(), rt_vlist_copy(), and rt_vlist_import().

#define BN_VLBLOCK_MAGIC   0x981bd112
 

Definition at line 1694 of file bn.h.

Referenced by bn_vlblock_init(), and bu_identify_magic().

#define BN_CK_VLBLOCK _p   )     BU_CKMAG((_p), BN_VLBLOCK_MAGIC, "bn_vlblock")
 

Definition at line 1695 of file bn.h.

Referenced by nmg_vlblock_around_eu(), nmg_vlblock_e(), nmg_vlblock_eu(), nmg_vlblock_fu(), nmg_vlblock_lu(), nmg_vlblock_m(), nmg_vlblock_r(), nmg_vlblock_s(), nmg_vlblock_v(), rt_plot_vlblock(), rt_vlblock_find(), and rt_vlblock_free().

#define TREE_TYPE_VERTS   1
 

Definition at line 1732 of file bn.h.

Referenced by Add_vert(), and create_vert_tree().

#define TREE_TYPE_VERTS_AND_NORMS   2
 

Definition at line 1733 of file bn.h.

Referenced by Add_vert_and_norm(), and create_vert_tree_w_norms().

#define VERT_BLOCK   512
 

number of vertices to malloc per call when building the array

Definition at line 1735 of file bn.h.

Referenced by Add_vert(), create_vert_tree(), and create_vert_tree_w_norms().

#define VERT_TREE_MAGIC   0x56455254
 

"VERT"

Definition at line 1737 of file bn.h.

Referenced by create_vert_tree(), and create_vert_tree_w_norms().

#define BN_CK_VERT_TREE _p   )     BU_CKMAG(_p, VERT_TREE_MAGIC, "vert_tree")
 

Definition at line 1738 of file bn.h.

Referenced by Add_vert(), Add_vert_and_norm(), clean_vert_tree(), and free_vert_tree().


Function Documentation

void bn_mat_print const char *  title,
const mat_t  m
 

B N _ M A T _ P R I N T

Definition at line 136 of file mat.c.

References bn_mat_print_guts(), and bu_log().

Referenced by bn_mat_ck(), bn_mat_inv(), db_do_anim(), db_shader_mat(), nmg_flatten_face(), rt_dsp_shot(), rt_ehy_print(), rt_ell_print(), rt_epa_print(), rt_eto_print(), rt_part_print(), rt_rec_print(), rt_rhc_print(), rt_rpc_print(), rt_sph_print(), rt_submodel_import(), rt_submodel_import5(), rt_submodel_print(), rt_tgc_print(), and rt_tor_print().

Here is the call graph for this function:

void bn_mat_print_guts const char *  title,
const mat_t  m,
char *  buf
 

Definition at line 105 of file mat.c.

Referenced by bn_mat_print(), and bn_tcl_mat_print().

double bn_atan2 double  y,
double  x
 

A wrapper for the system atan2(). On the Silicon Graphics, and perhaps on others, x==0 incorrectly returns infinity.

B N _ A T A N 2

Definition at line 152 of file mat.c.

Referenced by bn_ae_vec(), bn_aet_vec(), rt_ell_uv(), rt_part_uv(), and rt_sph_uv().

void bn_mat_mul register mat_t  o,
register const mat_t  a,
register const mat_t  b
 

Multiply matrix "a" by "b" and store the result in "o". NOTE: This is different from multiplying "b" by "a" (most of the time!) NOTE: "o" must not be the same as either of the inputs.

B N _ M A T _ M U L

Definition at line 227 of file mat.c.

Referenced by bn_mat_arb_rot(), bn_mat_fromto(), bn_mat_lookat(), bn_mat_mul2(), bn_mat_mul3(), bn_mat_mul4(), bn_mat_scale_about_pt(), bn_mat_xform_about_pt(), bn_math_cmd(), bn_vlist_3string(), db_apply_state_from_memb(), db_do_anim(), db_follow_path(), db_shader_mat(), db_tree_mul_dbleaf(), Do_copy_membs(), rt_comb_import5(), rt_ebm_import(), rt_ebm_import5(), rt_ehy_curve(), rt_ehy_prep(), rt_ehy_tess(), rt_ell_prep(), rt_ell_tess(), rt_ell_tnurb(), rt_epa_curve(), rt_epa_prep(), rt_linear_pipe_prep(), rt_part_prep(), rt_part_tess(), rt_rec_prep(), rt_rhc_prep(), rt_rpc_prep(), rt_superell_prep(), rt_tgc_curve(), rt_tgc_prep(), rt_tgc_tnurb(), rt_vol_import(), rt_vol_import5(), tp_3axis(), tp_3symbol(), vo_rot(), vo_update(), wdb_ocenter_cmd(), wdb_orotate_cmd(), wdb_oscale_cmd(), and wdb_otranslate_cmd().

void bn_mat_mul2 register const mat_t  i,
register mat_t  o
 

A convenience wrapper for bn_mat_mul() to update a matrix in place. The arugment ordering is confusing either way.

B N _ M A T _ M U L 2

o = i * o

Definition at line 260 of file mat.c.

References bn_mat_mul(), and MAT_COPY.

Referenced by bn_mat_arb_rot(), vo_mat_aet(), and vo_rot().

Here is the call graph for this function:

void bn_mat_mul3 mat_t  o,
const mat_t  a,
const mat_t  b,
const mat_t  c
 

B N _ M A T _ M U L 3

o = a * b * c

The output matrix may be the same as 'b' or 'c', but may not be 'a'.

Definition at line 276 of file mat.c.

References bn_mat_mul().

Here is the call graph for this function:

void bn_mat_mul4 mat_t  ao,
const mat_t  a,
const mat_t  b,
const mat_t  c,
const mat_t  d
 

B N _ M A T _ M U L 4

o = a * b * c * d

The output matrix may be the same as any input matrix.

Definition at line 292 of file mat.c.

References bn_mat_mul().

Here is the call graph for this function:

void bn_matXvec register hvect_t  ov,
register const mat_t  im,
register const hvect_t  iv
 

Referenced by bn_math_cmd().

void bn_mat_inv register mat_t  output,
const mat_t  input
 

B N _ M A T _ I N V

The matrix pointed at by "input" is inverted and stored in the area pointed at by "output".

Calls bu_bomb if matrix is singular.

Definition at line 335 of file mat.c.

References bn_mat_inverse(), bn_mat_print(), bu_bomb(), and bu_log().

Referenced by bn_math_cmd(), db_region_mat(), nmg_snurb_is_planar(), rt_dsp_import5(), rt_ebm_prep(), rt_ell_tess(), rt_ell_tnurb(), rt_eto_prep(), rt_extrude_prep(), rt_hf_to_dsp(), rt_part_tess(), rt_submodel_prep(), rt_tor_prep(), rt_vol_prep(), vo_mrotPoint_cmd(), vo_rot(), vo_update(), vo_viewDir_cmd(), wdb_ocenter_cmd(), wdb_orotate_cmd(), wdb_oscale_cmd(), and wdb_otranslate_cmd().

Here is the call graph for this function:

int bn_mat_inverse register mat_t  output,
const mat_t  input
 

B N _ M A T _ I N V E R S E

The matrix pointed at by "input" is inverted and stored in the area pointed at by "output".

Invert a 4-by-4 matrix using Algorithm 120 from ACM. This is a modified Gauss-Jordan alogorithm Note: Inversion is done in place, with 3 work vectors

Returns:
1 if OK.

0 if matrix is singular.

Definition at line 361 of file mat.c.

References FAST, LOCAL, and MAT_COPY.

Referenced by bn_mat_inv(), and rt_bend_pipe_prep().

void bn_vtoh_move register vect_t  h,
register const vect_t  v
 

void bn_htov_move register vect_t  v,
register const vect_t  h
 

B N _ H T O V _ M O V E

Takes a pointer to [x,y,z,w], and converts it to an ordinary vector [x/w, y/w, z/w]. Optimization for the case of w==1 is performed.

Definition at line 466 of file mat.c.

References bu_log(), SMALL_FASTF, W, X, Y, and Z.

Here is the call graph for this function:

void bn_mat_trn mat_t  om,
register const mat_t  im
 

B N _ M A T _ T R N

Definition at line 491 of file mat.c.

Referenced by bn_mat_fromto(), bn_math_cmd(), rt_ehy_plot(), rt_ehy_prep(), rt_ehy_tess(), rt_ell_prep(), rt_ell_tess(), rt_ell_tnurb(), rt_epa_plot(), rt_epa_prep(), rt_epa_tess(), rt_linear_pipe_prep(), rt_part_prep(), rt_part_tess(), rt_rec_prep(), rt_rhc_plot(), rt_rhc_prep(), rt_rhc_tess(), rt_rpc_plot(), rt_rpc_prep(), rt_rpc_tess(), and rt_superell_prep().

void bn_mat_ae register mat_t  m,
double  azimuth,
double  elev
 

Referenced by bn_math_cmd().

void bn_ae_vec fastf_t azp,
fastf_t elp,
const vect_t  v
 

B N _ A E _ V E C

Find the azimuth and elevation angles that correspond to the direction (not including twist) given by a direction vector.

Definition at line 565 of file mat.c.

References bn_atan2(), bn_radtodeg, X, Y, and Z.

Referenced by bn_aet_vec(), bn_math_cmd(), db_tree_describe(), db_tree_flatten_describe(), and vo_lookat_cmd().

Here is the call graph for this function:

void bn_aet_vec fastf_t az,
fastf_t el,
fastf_t twist,
vect_t  vec_ae,
vect_t  vec_twist,
fastf_t  accuracy
 

Referenced by bn_math_cmd(), and vo_update().

void bn_mat_angles register mat_t  mat,
double  alpha,
double  beta,
double  ggamma
 

Referenced by bn_math_cmd(), bn_vlist_2string(), db_parse_1anim(), PL_FORTRAN(), tp_2symbol(), vo_mat_aet(), vo_mrot_cmd(), vo_rot_cmd(), vo_setview(), vo_vrot_cmd(), and wdb_orotate_cmd().

void bn_mat_angles_rad register mat_t  mat,
double  alpha,
double  beta,
double  ggamma
 

This routine builds a Homogeneous rotation matrix, given alpha, beta, and gamma as angles of rotation, in radians.

B N _ M A T _ A N G L E S _ R A D

Alpha is angle of rotation about the X axis, and is done third. Beta is angle of rotation about the Y axis, and is done second. Gamma is angle of rotation about Z axis, and is done first.

Definition at line 705 of file mat.c.

References LOCAL, and MAT_IDN.

void bn_eigen2x2 fastf_t val1,
fastf_t val2,
vect_t  vec1,
vect_t  vec2,
fastf_t  a,
fastf_t  b,
fastf_t  c
 

Referenced by bn_math_cmd(), rt_ell_curve(), and rt_tgc_curve().

void bn_vec_perp vect_t  new,
const vect_t  old
 

Given a vector, create another vector which is perpendicular to it. The output vector will have unit length only if the input vector did.

B N _ V E C _ P E R P

Definition at line 805 of file mat.c.

References LOCAL, VCROSS, VMOVE, VSETALL, X, Y, and Z.

Referenced by bn_mat_fromto(), bn_math_cmd(), nmg_eu_2vecs_perp(), nmg_to_tgc(), rt_grp_plot(), rt_hlf_plot(), and rt_hlf_prep().

void bn_mat_fromto mat_t  m,
const vect_t  from,
const vect_t  to
 

Given two vectors, compute a rotation matrix that will transform space by the angle between the two. There are many candidate matricies.

B N _ M A T _ F R O M T O

The input 'from' and 'to' vectors need not be unit length. MAT4X3VEC( to, m, from ) is the identity that is created.

Definition at line 833 of file mat.c.

References A, bn_mat_mul(), bn_mat_trn(), bn_vec_perp(), bu_log(), M, MAT4X3VEC, MAT_IDN, Q, R, V3ARGS, VCROSS, VDOT, VMOVE, VSET, VUNITIZE, X, Y, and Z.

Referenced by bn_math_cmd(), nmg_flatten_face(), nmg_isect2d_prep(), rt_extrude_prep(), and rt_part_tess().

Here is the call graph for this function:

void bn_mat_xrot mat_t  m,
double  sinx,
double  cosx
 

Referenced by bn_math_cmd().

void bn_mat_yrot mat_t  m,
double  siny,
double  cosy
 

Referenced by bn_mat_lookat(), and bn_math_cmd().

void bn_mat_zrot mat_t  m,
double  sinz,
double  cosz
 

Referenced by bn_mat_lookat(), bn_math_cmd(), and vo_mat_aet().

void bn_mat_lookat mat_t  rot,
const vect_t  dir,
int  yflip
 

B N _ M A T _ L O O K A T

Given a direction vector D of unit length, product a matrix which rotates that vector D onto the -Z axis. This matrix will be suitable for use as a "model2view" matrix.

XXX This routine will fail if the vector is already more or less aligned with the Z axis.

This is done in several steps.

        1)  Rotate D about Z to match +X axis.  Azimuth adjustment.
        2)  Rotate D about Y to match -Y axis.  Elevation adjustment.
        3)  Rotate D about Z to make projection of X axis again point
            in the +X direction.  Twist adjustment.
        4)  Optionally, flip sign on Y axis if original Z becomes inverted.
            This can be nice for static frames, but is astonishing when
            used in animation.

Definition at line 1010 of file mat.c.

References bn_mat_mul(), bn_mat_yrot(), bn_mat_zrot(), bu_log(), MAT4X3VEC, MAT_COPY, MAT_IDN, VPRINT, VSET, X, Y, and Z.

Referenced by bn_math_cmd().

Here is the call graph for this function:

void bn_vec_ortho register vect_t  out,
register const vect_t  in
 

Given a vector, create another vector which is perpendicular to it, and with unit length. This algorithm taken from Gift's arvec.f; a faster algorithm may be possible.

B N _ V E C _ O R T H O

Definition at line 1071 of file mat.c.

References FAST, NEAR_ZERO, SMALL, VPRINT, VSETALL, X, Y, and Z.

Referenced by bn_isect_line3_line3(), bn_math_cmd(), classify_seg(), isect_ray_snurb_face(), rt_arb_curve(), rt_arbn_curve(), rt_ars_curve(), rt_bot_curve(), rt_cline_curve(), rt_cline_plot(), rt_cline_tess(), rt_dsp_curve(), rt_ebm_curve(), rt_ehy_curve(), rt_ell_curve(), rt_epa_curve(), rt_eto_plot(), rt_eto_prep(), rt_eto_tess(), rt_hf_curve(), rt_hlf_curve(), rt_linear_pipe_prep(), rt_nmg_curve(), rt_nurb_curve(), rt_nurb_shot(), rt_part_curve(), rt_part_prep(), rt_pg_curve(), rt_pipe_curve(), rt_pipe_plot(), rt_rec_curve(), rt_rhc_curve(), rt_rpc_curve(), rt_sketch_curve(), rt_sph_curve(), rt_submodel_curve(), rt_tgc_curve(), rt_tor_export(), rt_tor_import5(), rt_vol_curve(), rt_xxx_curve(), tesselate_pipe_start(), and tp_3vector().

int bn_mat_scale_about_pt mat_t  mat,
const point_t  pt,
const double  scale
 

Build a matrix to scale uniformly around a given point.

B N _ M A T _ S C A L E _ A B O U T _ P T

Returns:
-1 if scale is too small.

0 if OK.

Definition at line 1123 of file mat.c.

References bn_mat_mul(), MAT_DELTAS_VEC, MAT_DELTAS_VEC_NEG, MAT_IDN, MAT_ZERO, NEAR_ZERO, and SMALL.

Referenced by bn_mat_scale_about_pt_wrapper(), db_parse_1anim(), and wdb_oscale_cmd().

Here is the call graph for this function:

void bn_mat_xform_about_pt mat_t  mat,
const mat_t  xform,
const point_t  pt
 

Build a matrix to apply arbitary 4x4 transformation around a given point.

B N _ M A T _ X F O R M _ A B O U T _ P T

Definition at line 1152 of file mat.c.

References bn_mat_mul(), MAT_DELTAS_VEC, MAT_DELTAS_VEC_NEG, and MAT_IDN.

Referenced by bn_math_cmd(), vo_rot(), and wdb_orotate_cmd().

Here is the call graph for this function:

int bn_mat_is_equal const mat_t  a,
const mat_t  b,
const struct bn_tol tol
 

B N _ M A T _ I S _ E Q U A L

Returns:
0 When matrices are not equal

1 When matricies are equal

Definition at line 1174 of file mat.c.

References BN_CK_TOL, bn_tol::dist, NEAR_ZERO, and bn_tol::perp.

Referenced by rt_find_identical_solid(), rt_gettree_leaf(), and shoot_and_plot().

int bn_mat_is_identity const mat_t  m  ) 
 

B N _ M A T _ I S _ I D E N T I T Y

This routine is intended for detecting identity matricies read in from ascii or binary files, where the numbers are pure ones or zeros. This routine is *not* intended for tolerance-based "near-zero" comparisons; as such, it shouldn't be used on matrices which are the result of calculation.

Returns:
0 non-identity

1 a perfect identity matrix

Definition at line 1234 of file mat.c.

References bn_mat_identity.

Referenced by db_tcl_tree_parse(), db_tree_counter(), rt_arbn_import5(), rt_comb_import5(), and rt_comb_v5_serialize().

void bn_mat_arb_rot mat_t  m,
const point_t  pt,
const vect_t  dir,
const fastf_t  ang
 

Construct a transformation matrix for rotation about an arbitrary axis.

B N _ M A T _ A R B _ R O T

The axis is defined by a point (pt) and a unit direction vector (dir). The angle of rotation is "ang"

Definition at line 1248 of file mat.c.

References bn_mat_mul(), bn_mat_mul2(), MAT_IDN, MDX, MDY, MDZ, X, Y, and Z.

Referenced by bn_math_cmd(), draw_pipe_bend(), tesselate_pipe_bend(), and vo_arot_cmd().

Here is the call graph for this function:

matp_t bn_mat_dup const mat_t  in  ) 
 

B N _ M A T _ D U P

Return a pointer to a copy of the matrix in dynamically allocated memory.

Definition at line 1309 of file mat.c.

References bcopy, and bu_malloc().

Referenced by db_dup_subtree(), db_tcl_tree_parse(), db_tree_mul_dbleaf(), and rt_comb_import5().

Here is the call graph for this function:

int bn_mat_ck const char *  title,
const mat_t  m
 

B N _ M A T _ C K

Check to ensure that a rotation matrix preserves axis perpendicularily. Note that not all matricies are rotation matricies.

Returns:
-1 FAIL

0 OK

Definition at line 1329 of file mat.c.

References A, bn_mat_print(), bu_bomb(), bu_debug, BU_DEBUG_COREDUMP, BU_DEBUG_MATH, bu_log(), MAT4X3VEC, NEAR_ZERO, VDIVIDE_TOL, VDOT, and VMOVE.

Referenced by db_recurse(), and db_tcl_tree_parse().

Here is the call graph for this function:

fastf_t bn_mat_det3 const mat_t  m  ) 
 

B N _ M A T _ D E T 3

Calculates the determinant of the 3X3 "rotation" part of the passed matrix

Definition at line 1378 of file mat.c.

References FAST.

fastf_t bn_mat_determinant const mat_t  m  ) 
 

B N _ M A T _ D E T E R M I N A N T

Calculates the determinant of the 4X4 matrix

Definition at line 1396 of file mat.c.

Referenced by nmg_snurb_is_planar().

int bn_mat_is_non_unif const mat_t  m  ) 
 

Definition at line 1427 of file mat.c.

References MAGSQ.

Referenced by rt_tor_import5().

int bn_distsq_line3_line3 fastf_t  dist[3],
point_t  P,
vect_t  d,
point_t  Q,
vect_t  e,
point_t  pt1,
point_t  pt2
 

Referenced by rt_cline_shot().

int bn_dist_pt3_lseg3 fastf_t dist,
point_t  pca,
const point_t  a,
const point_t  b,
const point_t  p,
const struct bn_tol tol
 

Referenced by nmg_break_edge_at_verts(), nmg_cnurb_lseg_coincident(), nmg_isect_eu_verts(), nmg_make_dualvu(), and rt_ars_tess().

int bn_3pts_collinear point_t  a,
point_t  b,
point_t  c,
const struct bn_tol tol
 

Referenced by nmg_break_long_edges(), nmg_fu_planeeqn(), nmg_insert_vu_if_on_edge(), and nmg_make_faces_at_vert().

int bn_pt3_pt3_equal const point_t  a,
const point_t  b,
const struct bn_tol tol
 

Referenced by bn_isect_line3_line3(), nmg_break_eg_on_v(), nmg_fu_planeeqn(), nmg_isect_line2_edge2p(), nmg_isect_vert2p_face2p(), nmg_ptbl_vfuse(), nmg_radial_join_eu(), nmg_radial_join_eu_NEW(), nmg_region_v_unique(), and nmg_repair_v_near_v().

int bn_dist_pt2_lseg2 fastf_t dist_sq,
fastf_t  pca[2],
const point_t  a,
const point_t  b,
const point_t  p,
const struct bn_tol tol
 

int bn_isect_lseg3_lseg3 fastf_t dist,
const point_t  p,
const vect_t  pdir,
const point_t  q,
const vect_t  qdir,
const struct bn_tol tol
 

Referenced by nmg_break_crossed_loops(), nmg_fix_overlapping_loops(), nmg_intersect_loops_self(), and nmg_isect_eu_eu().

int bn_isect_line3_line3 fastf_t t,
fastf_t u,
const point_t  p,
const vect_t  d,
const point_t  a,
const vect_t  c,
const struct bn_tol tol
 

Referenced by bn_isect_line_lseg(), bn_isect_lseg3_lseg3(), bn_math_cmd(), and rt_arc2d_to_cnurb().

int bn_2line3_colinear const point_t  p1,
const vect_t  d1,
const point_t  p2,
const vect_t  d2,
double  range,
const struct bn_tol tol
 

Referenced by nmg_2edgeuse_g_coincident(), and nmg_repair_v_near_v().

int bn_isect_pt2_lseg2 fastf_t dist,
const point_t  a,
const point_t  b,
const point_t  p,
const struct bn_tol tol
 

Referenced by bn_isect_line2_lseg2(), and nmg_break_eu_on_v().

int bn_isect_line2_lseg2 fastf_t dist,
const point_t  p,
const vect_t  d,
const point_t  a,
const vect_t  c,
const struct bn_tol tol
 

Referenced by isect_2D_loop_ray(), nmg_isect_edge2p_edge2p(), and nmg_isect_line2_edge2p().

int bn_isect_lseg2_lseg2 fastf_t dist,
const point_t  p,
const vect_t  pdir,
const point_t  q,
const vect_t  qdir,
const struct bn_tol tol
 

int bn_isect_line2_line2 fastf_t dist,
const point_t  p,
const vect_t  d,
const point_t  a,
const vect_t  c,
const struct bn_tol tol
 

Referenced by bn_isect_line2_lseg2(), bn_isect_line3_line3(), bn_isect_lseg2_lseg2(), bn_math_cmd(), and rt_extrude_shot().

double bn_dist_pt3_pt3 const point_t  a,
const point_t  b
 

Referenced by nmg_repair_v_near_v().

int bn_3pts_distinct const point_t  a,
const point_t  b,
const point_t  c,
const struct bn_tol tol
 

int bn_mk_plane_3pts plane_t  plane,
const point_t  a,
const point_t  b,
const point_t  c,
const struct bn_tol tol
 

Referenced by nmg_close_shell(), nmg_fu_planeeqn(), rt_arb_calc_planes(), rt_arb_edit(), and rt_nurb_shot().

int bn_mkpoint_3planes point_t  pt,
const plane_t  a,
const plane_t  b,
const plane_t  c
 

Referenced by bn_isect_2planes(), nmg_faces_can_be_intersected(), rt_arb_3face_intersect(), rt_arbn_plot(), and rt_arbn_tess().

int bn_isect_line3_plane fastf_t dist,
const point_t  pt,
const vect_t  dir,
const plane_t  plane,
const struct bn_tol tol
 

Referenced by isect_ray_planar_face(), nmg_isect_eu_fu(), and rt_arb_move_edge().

int bn_isect_2planes point_t  pt,
vect_t  dir,
const plane_t  a,
const plane_t  b,
const vect_t  rpp_min,
const struct bn_tol tol
 

Referenced by nmg_isect_two_generic_faces().

int bn_isect_2lines fastf_t t,
fastf_t u,
const point_t  p,
const vect_t  d,
const point_t  a,
const vect_t  c,
const struct bn_tol tol
 

int bn_isect_line_lseg fastf_t t,
const point_t  p,
const vect_t  d,
const point_t  a,
const point_t  b,
const struct bn_tol tol
 

Referenced by isect_ray_lseg().

double bn_dist_line3_pt3 const point_t  pt,
const vect_t  dir,
const point_t  a
 

Referenced by nmg_assess_vu(), nmg_repair_v_near_v(), and rt_dist_line3_line3().

double bn_distsq_line3_pt3 const point_t  pt,
const vect_t  dir,
const point_t  a
 

Referenced by bn_2line3_colinear(), bn_isect_line_lseg(), nmg_2edgeuse_g_coincident(), nmg_enlist_vu(), nmg_is_eu_on_line3(), nmg_is_vertex_on_inter(), nmg_isect_line2_vertex2(), and nmg_search_v_eg().

double bn_dist_line_origin const point_t  pt,
const vect_t  dir
 

double bn_dist_line2_point2 const point_t  pt,
const vect_t  dir,
const point_t  a
 

double bn_distsq_line2_point2 const point_t  pt,
const vect_t  dir,
const point_t  a
 

Referenced by bn_isect_line2_lseg2().

double bn_area_of_triangle const point_t  a,
const point_t  b,
const point_t  c
 

int bn_isect_pt_lseg fastf_t dist,
const point_t  a,
const point_t  b,
const point_t  p,
const struct bn_tol tol
 

Referenced by nmg_break_all_es_on_v(), nmg_isect_line2_edge2p(), and nmg_model_break_e_on_v().

double bn_dist_pt_lseg point_t  pca,
const point_t  a,
const point_t  b,
const point_t  p,
const struct bn_tol tol
 

void bn_rotate_bbox point_t  omin,
point_t  omax,
const mat_t  mat,
const point_t  imin,
const point_t  imax
 

Referenced by rt_ebm_prep(), rt_nmg_idisk(), rt_submodel_prep(), and rt_vol_prep().

void bn_rotate_plane plane_t  oplane,
const mat_t  mat,
const plane_t  iplane
 

Referenced by rt_nmg_idisk().

int bn_coplanar const plane_t  a,
const plane_t  b,
const struct bn_tol tol
 

Referenced by bn_isect_2planes(), nmg_find_isect_faces(), and nmg_two_face_fuse().

double bn_angle_measure vect_t  vec,
const vect_t  x_dir,
const vect_t  y_dir
 

Referenced by nmg_measure_fu_angle(), nmg_vlblock_euleft(), and nmg_vu_angle_measure().

double bn_dist_pt3_along_line3 const point_t  p,
const vect_t  d,
const point_t  x
 

Referenced by bn_isect_line_lseg(), and nmg_break_eg_on_v().

double bn_dist_pt2_along_line2 const point_t  p,
const vect_t  d,
const point_t  x
 

Referenced by bn_isect_line2_lseg2().

int bn_hlf_class const plane_t  half_eqn,
const vect_t  min,
const vect_t  max,
const struct bn_tol tol
 

Referenced by rt_arb_class(), and rt_hlf_class().

int bn_isect_planes point_t  pt,
const plane_t  planes[],
const int  pl_count
 

void bn_wlt_haar_1d_double_decompose double *  tbuf,
double *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_1d_double_reconstruct double *  tbuf,
double *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_1d_float_decompose float *  tbuf,
float *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_1d_float_reconstruct float *  tbuf,
float *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_1d_char_decompose char *  tbuf,
char *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_1d_char_reconstruct char *  tbuf,
char *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_1d_short_decompose short *  tbuf,
short *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_1d_short_reconstruct short *  tbuf,
short *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_1d_int_decompose int *  tbuf,
int *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_1d_int_reconstruct int *  tbuf,
int *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_1d_long_decompose long *  tbuf,
long *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_1d_long_reconstruct long *  tbuf,
long *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_double_decompose double *  tbuf,
double *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_2d_double_reconstruct double *  tbuf,
double *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_float_decompose float *  tbuf,
float *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_2d_float_reconstruct float *  tbuf,
float *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_char_decompose char *  tbuf,
char *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_2d_char_reconstruct char *  tbuf,
char *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_short_decompose short *  tbuf,
short *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_2d_short_reconstruct short *  tbuf,
short *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_int_decompose int *  tbuf,
int *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_2d_int_reconstruct int *  tbuf,
int *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_long_decompose long *  tbuf,
long *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  limit
 

void bn_wlt_haar_2d_long_reconstruct long *  tbuf,
long *  buf,
unsigned long  dimen,
unsigned long  depth,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_double_decompose2 double *  tbuf,
double *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  limit
 

void bn_wlt_haar_2d_double_reconstruct2 double *  tbuf,
double *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_float_decompose2 float *  tbuf,
float *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  limit
 

void bn_wlt_haar_2d_float_reconstruct2 float *  tbuf,
float *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_char_decompose2 char *  tbuf,
char *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  limit
 

void bn_wlt_haar_2d_char_reconstruct2 char *  tbuf,
char *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_short_decompose2 short *  tbuf,
short *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  limit
 

void bn_wlt_haar_2d_short_reconstruct2 short *  tbuf,
short *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_int_decompose2 int *  tbuf,
int *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  limit
 

void bn_wlt_haar_2d_int_reconstruct2 int *  tbuf,
int *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_wlt_haar_2d_long_decompose2 long *  tbuf,
long *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  limit
 

void bn_wlt_haar_2d_long_reconstruct2 long *  tbuf,
long *  buf,
unsigned long  dimen,
unsigned long  width,
unsigned long  height,
unsigned long  subimage_size,
unsigned long  limit
 

void bn_table_free struct bn_table tabp  ) 
 

Definition at line 79 of file tabdata.c.

References BN_CK_TABLE, bu_debug, BU_DEBUG_TABDATA, bu_free(), bu_log(), and bn_table::nx.

Here is the call graph for this function:

void bn_tabdata_free struct bn_tabdata data  ) 
 

Definition at line 92 of file tabdata.c.

References BN_CK_TABDATA, BN_CK_TABLE, bu_debug, BU_DEBUG_TABDATA, bu_free(), bu_log(), data, and NULL.

Here is the call graph for this function:

void bn_ck_table const struct bn_table tabp  ) 
 

Definition at line 108 of file tabdata.c.

References BN_CK_TABLE, bu_bomb(), bu_debug, BU_DEBUG_TABDATA, bu_log(), bn_table::nx, and bn_table::x.

Here is the call graph for this function:

struct bn_table* bn_table_make_uniform int  num,
double  first,
double  last
 

Definition at line 131 of file tabdata.c.

References BN_GET_TABLE, bu_bomb(), bu_debug, BU_DEBUG_TABDATA, bu_log(), fp, and bn_table::x.

Here is the call graph for this function:

void bn_tabdata_add struct bn_tabdata out,
const struct bn_tabdata in1,
const struct bn_tabdata in2
 

Definition at line 162 of file tabdata.c.

References BN_CK_TABDATA, bu_bomb(), bu_debug, BU_DEBUG_TABDATA, bu_log(), bn_tabdata::ny, bn_tabdata::table, and bn_tabdata::y.

Here is the call graph for this function:

void bn_tabdata_mul struct bn_tabdata out,
const struct bn_tabdata in1,
const struct bn_tabdata in2
 

Definition at line 193 of file tabdata.c.

References BN_CK_TABDATA, bu_bomb(), bu_debug, BU_DEBUG_TABDATA, bu_log(), bn_tabdata::ny, bn_tabdata::table, and bn_tabdata::y.

Here is the call graph for this function:

void bn_tabdata_mul3 struct bn_tabdata out,
const struct bn_tabdata in1,
const struct bn_tabdata in2,
const struct bn_tabdata in3
 

Definition at line 224 of file tabdata.c.

References BN_CK_TABDATA, bu_bomb(), bu_debug, BU_DEBUG_TABDATA, bu_log(), bn_tabdata::ny, bn_tabdata::table, and bn_tabdata::y.

Here is the call graph for this function:

void bn_tabdata_incr_mul3_scale struct bn_tabdata out,
const struct bn_tabdata in1,
const struct bn_tabdata in2,
const struct bn_tabdata in3,
double  scale
 

void bn_tabdata_incr_mul2_scale struct bn_tabdata out,
const struct bn_tabdata in1,
const struct bn_tabdata in2,
double  scale
 

void bn_tabdata_scale struct bn_tabdata out,
const struct bn_tabdata in1,
double  scale
 

void bn_table_scale struct bn_table tabp,
double  scale
 

void bn_tabdata_join1 struct bn_tabdata out,
const struct bn_tabdata in1,
double  scale,
const struct bn_tabdata in2
 

void bn_tabdata_join2 struct bn_tabdata out,
const struct bn_tabdata in1,
double  scale2,
const struct bn_tabdata in2,
double  scale3,
const struct bn_tabdata in3
 

void bn_tabdata_blend2 struct bn_tabdata out,
double  scale1,
const struct bn_tabdata in1,
double  scale2,
const struct bn_tabdata in2
 

void bn_tabdata_blend3 struct bn_tabdata out,
double  scale1,
const struct bn_tabdata in1,
double  scale2,
const struct bn_tabdata in2,
double  scale3,
const struct bn_tabdata in3
 

double bn_tabdata_area1 const struct bn_tabdata in  ) 
 

Definition at line 515 of file tabdata.c.

References BN_CK_TABDATA, bu_debug, BU_DEBUG_TABDATA, bu_log(), FAST, bn_tabdata::ny, and bn_tabdata::y.

Here is the call graph for this function:

double bn_tabdata_area2 const struct bn_tabdata in  ) 
 

Definition at line 542 of file tabdata.c.

References BN_CK_TABDATA, BN_CK_TABLE, bu_debug, BU_DEBUG_TABDATA, bu_log(), FAST, bn_tabdata::ny, bn_tabdata::table, width, bn_table::x, and bn_tabdata::y.

Here is the call graph for this function:

double bn_tabdata_mul_area1 const struct bn_tabdata in1,
const struct bn_tabdata in2
 

Definition at line 573 of file tabdata.c.

References BN_CK_TABDATA, bu_debug, BU_DEBUG_TABDATA, bu_log(), FAST, bn_tabdata::ny, and bn_tabdata::y.

Here is the call graph for this function:

double bn_tabdata_mul_area2 const struct bn_tabdata in1,
const struct bn_tabdata in2
 

Definition at line 601 of file tabdata.c.

References BN_CK_TABDATA, BN_CK_TABLE, bu_debug, BU_DEBUG_TABDATA, bu_log(), FAST, bn_tabdata::ny, bn_tabdata::table, width, bn_table::x, and bn_tabdata::y.

Here is the call graph for this function:

fastf_t bn_table_lin_interp const struct bn_tabdata samp,
double  wl
 

Referenced by bn_tabdata_freq_shift(), and bn_tabdata_resample_avg().

struct bn_tabdata* bn_tabdata_resample_max const struct bn_table newtable,
const struct bn_tabdata olddata
 

Definition at line 715 of file tabdata.c.

References BN_CK_TABDATA, BN_CK_TABLE, BN_GET_TABDATA, bn_table_find_x(), bu_debug, BU_DEBUG_TABDATA, bu_log(), bn_table::nx, bn_tabdata::table, bn_table::x, and bn_tabdata::y.

Here is the call graph for this function:

struct bn_tabdata* bn_tabdata_resample_avg const struct bn_table newtable,
const struct bn_tabdata olddata
 

Definition at line 796 of file tabdata.c.

References BN_CK_TABDATA, BN_CK_TABLE, BN_GET_TABDATA, bn_table_find_x(), bn_table_lin_interp(), bu_debug, BU_DEBUG_TABDATA, bu_log(), bn_table::nx, bn_tabdata::table, bn_table::x, and bn_tabdata::y.

Here is the call graph for this function:

int bn_table_write const char *  filename,
const struct bn_table tabp
 

Definition at line 879 of file tabdata.c.

References BN_CK_TABLE, bu_debug, BU_DEBUG_TABDATA, bu_log(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), fp, NULL, bn_table::nx, perror(), and bn_table::x.

Here is the call graph for this function:

struct bn_table* bn_table_read const char *  filename  ) 
 

Definition at line 916 of file tabdata.c.

References BN_GET_TABLE, bu_bomb(), bu_debug, BU_DEBUG_TABDATA, bu_log(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), bu_vls_addr(), bu_vls_free(), bu_vls_gets(), bu_vls_init(), fp, NULL, bn_table::nx, perror(), and bn_table::x.

Here is the call graph for this function:

void bn_pr_table const char *  title,
const struct bn_table tabp
 

Definition at line 963 of file tabdata.c.

References BN_CK_TABLE, bu_log(), bn_table::nx, and bn_table::x.

Here is the call graph for this function:

void bn_pr_tabdata const char *  title,
const struct bn_tabdata data
 

Definition at line 979 of file tabdata.c.

References BN_CK_TABDATA, bu_log(), and data.

Here is the call graph for this function:

int bn_print_table_and_tabdata const char *  filename,
const struct bn_tabdata data
 

Definition at line 1003 of file tabdata.c.

References BN_CK_TABDATA, BN_CK_TABLE, bu_debug, BU_DEBUG_TABDATA, bu_log(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), data, fp, NULL, bn_table::nx, perror(), and bn_table::x.

Here is the call graph for this function:

struct bn_tabdata* bn_read_table_and_tabdata const char *  filename  ) 
 

Definition at line 1047 of file tabdata.c.

References bu_debug, BU_DEBUG_TABDATA, bu_log(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), data, fp, NULL, and perror().

Here is the call graph for this function:

struct bn_tabdata* bn_tabdata_binary_read const char *  filename,
int  num,
const struct bn_table tabp
 

Definition at line 1107 of file tabdata.c.

References BN_CK_TABDATA, BN_CK_TABLE, BN_SIZEOF_TABDATA, bu_debug, BU_DEBUG_TABDATA, bu_free(), bu_log(), bu_malloc(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), data, NULL, and perror().

Here is the call graph for this function:

struct bn_tabdata* bn_tabdata_malloc_array const struct bn_table tabp,
int  num
 

Definition at line 1180 of file tabdata.c.

References BN_CK_TABLE, BN_SIZEOF_TABDATA, BN_TABDATA_MAGIC, bu_calloc(), bu_debug, BU_DEBUG_TABDATA, bu_log(), data, and bn_table::nx.

Here is the call graph for this function:

void bn_tabdata_copy struct bn_tabdata out,
const struct bn_tabdata in
 

Definition at line 1214 of file tabdata.c.

References bcopy, BN_CK_TABDATA, BN_SIZEOF_TABDATA_Y, bu_bomb(), bu_debug, BU_DEBUG_TABDATA, bu_log(), bn_tabdata::ny, bn_tabdata::table, and bn_tabdata::y.

Here is the call graph for this function:

struct bn_tabdata* bn_tabdata_dup const struct bn_tabdata in  ) 
 

Definition at line 1233 of file tabdata.c.

References bcopy, BN_CK_TABDATA, BN_GET_TABDATA, BN_SIZEOF_TABDATA_Y, bu_debug, BU_DEBUG_TABDATA, bu_log(), data, bn_tabdata::table, and bn_tabdata::y.

Here is the call graph for this function:

struct bn_tabdata* bn_tabdata_get_constval double  val,
const struct bn_table tabp
 

Definition at line 1253 of file tabdata.c.

References BN_CK_TABLE, BN_GET_TABDATA, bu_debug, BU_DEBUG_TABDATA, bu_log(), and data.

Here is the call graph for this function:

void bn_tabdata_constval struct bn_tabdata data,
double  val
 

Definition at line 1277 of file tabdata.c.

References BN_CK_TABDATA, bu_debug, BU_DEBUG_TABDATA, bu_log(), and data.

Here is the call graph for this function:

void bn_tabdata_to_tcl struct bu_vls vp,
const struct bn_tabdata data
 

Definition at line 1299 of file tabdata.c.

References BN_CK_TABDATA, BN_CK_TABLE, BU_CK_VLS, bu_debug, BU_DEBUG_TABDATA, bu_log(), bu_vls_printf(), bu_vls_strcat(), data, FAST, MAX_FASTF, bn_table::nx, and bn_table::x.

Here is the call graph for this function:

struct bn_tabdata* bn_tabdata_from_array const double *  array  ) 
 

Definition at line 1338 of file tabdata.c.

References BN_GET_TABLE, data, and bn_table::x.

void bn_tabdata_freq_shift struct bn_tabdata out,
const struct bn_tabdata in,
double  offset
 

Definition at line 1374 of file tabdata.c.

References BN_CK_TABDATA, bn_table_lin_interp(), bu_bomb(), bu_debug, bu_log(), bn_tabdata::ny, bn_tabdata::table, bn_table::x, and bn_tabdata::y.

Here is the call graph for this function:

int bn_table_interval_num_samples const struct bn_table tabp,
double  low,
double  hi
 

Definition at line 1401 of file tabdata.c.

References BN_CK_TABLE, bn_table::nx, and bn_table::x.

Referenced by rt_spect_make_CIE_XYZ().

int bn_table_delete_sample_pts struct bn_table tabp,
int  i,
int  j
 

Definition at line 1424 of file tabdata.c.

References BN_CK_TABLE, bu_bomb(), bu_debug, bu_log(), bn_table::nx, and bn_table::x.

Here is the call graph for this function:

struct bn_table* bn_table_merge2 const struct bn_table a,
const struct bn_table b
 

Definition at line 1455 of file tabdata.c.

References BN_CK_TABLE, BN_GET_TABLE, bu_bomb(), bu_debug, BU_DEBUG_TABDATA, bu_log(), bn_table::nx, and bn_table::x.

Here is the call graph for this function:

struct bn_tabdata* bn_tabdata_mk_linear_filter const struct bn_table spectrum,
double  lower_wavelen,
double  upper_wavelen
 

Definition at line 1510 of file tabdata.c.

References BN_CK_TABLE, BN_GET_TABDATA, bn_table_find_x(), BU_ASSERT, bu_debug, BU_DEBUG_TABDATA, bu_log(), NULL, bn_table::nx, bn_table::x, and bn_tabdata::y.

Here is the call graph for this function:

void tp_setup  ) 
 

Once-only setup routine Used by libplot3/symbol.c, so it can't be static.

Definition at line 83 of file vectfont.c.

References LAST, NUM_SYMBOLS, TINY, tp_cindex, and tp_ctable.

Referenced by bn_vlist_3string(), and tp_3symbol().


Variable Documentation

const mat_t bn_mat_identity
 

Definition at line 94 of file mat.c.

Referenced by bn_mat_is_identity(), db_tree_describe(), db_tree_flatten_describe(), rt_comb_export4(), rt_db_external5_to_internal5(), rt_db_get_internal(), rt_extrude_import(), rt_extrude_import5(), rt_gettree_leaf(), shoot_and_plot(), wdb_nmg_simplify_cmd(), and wdb_shells_cmd().

const double bn_pi
 

pi

Definition at line 51 of file const.c.

Referenced by bend_pipe_shot(), bn_angle_measure(), draw_pipe_arc(), nmg_edge_collapse(), nmg_measure_fu_angle(), nmg_radial_build_list(), nmg_vu_angle_measure(), rt_arc2d_to_cnurb(), rt_bend_pipe_prep(), rt_ehy_plot(), rt_ehy_tess(), rt_ell(), rt_ell_norms(), rt_epa_plot(), rt_epa_tess(), rt_eto_plot(), rt_eto_tess(), rt_num_circular_segments(), rt_pipe_ck(), rt_pipe_plot(), rt_pipe_prep(), rt_pipe_tess(), rt_rhc_plot(), rt_rhc_tess(), rt_rpc_plot(), rt_rpc_tess(), rt_tgc_tess(), rt_tor_plot(), rt_tor_tess(), and tesselate_pipe_bend().

const double bn_twopi
 

pi*2

Definition at line 52 of file const.c.

Referenced by bn_angle_measure(), nmg_check_radial_angles(), nmg_is_angle_in_wedge(), nmg_radial_join_eu(), nmg_vu_angle_measure(), rt_ehy_plot(), rt_ehy_tess(), rt_epa_plot(), rt_epa_tess(), rt_eto_plot(), rt_eto_tess(), rt_eto_uv(), rt_raybundle_maker(), rt_tgc_uv(), rt_tor_plot(), rt_tor_tess(), and spm_init().

const double bn_halfpi
 

pi/2

Definition at line 53 of file const.c.

Referenced by rt_cline_tess(), rt_ell_tess(), rt_find_fallback_angle(), rt_part_tess(), and rt_tgc_tess().

const double bn_invpi
 

1/pi

Definition at line 55 of file const.c.

Referenced by rt_ell_uv(), rt_rhc_uv(), rt_rpc_uv(), and rt_sph_uv().

const double bn_inv2pi
 

1/(pi*2)

Definition at line 56 of file const.c.

Referenced by rt_ehy_uv(), rt_ell_uv(), rt_epa_uv(), rt_part_uv(), rt_rec_uv(), rt_sph_uv(), and rt_tor_uv().

const double bn_inv255
 

Definition at line 59 of file const.c.

Referenced by db_apply_state_from_comb(), db_do_anim(), and rt_region_color_map().

const double bn_degtorad
 

(pi*2)/360

Definition at line 61 of file const.c.

Referenced by bn_mat_ae(), bn_mat_angles(), vo_arot_cmd(), vo_mat_aet(), and wdb_tol_cmd().

const double bn_radtodeg
 

360/(pi*2)

Definition at line 62 of file const.c.

Referenced by bn_ae_vec(), bn_aet_vec(), nmg_face_coincident_vu_sort(), nmg_jeg(), nmg_pick_best_edge_g(), nmg_pr_one_eu_vecs(), nmg_pr_radial(), nmg_radial_join_eu(), nmg_radial_verify_monotone(), nmg_radial_verify_pointers(), nmg_use_edge_g(), nmg_vlblock_euleft(), nmg_vu_angle_measure(), rt_find_fallback_angle(), and wdb_tol_cmd().

const char bn_version[]
 

Definition at line 1 of file vers.c.


Generated on Mon Sep 18 01:24:59 2006 for BRL-CAD by  doxygen 1.4.6