bn Tcl interface
[libbn (numerical functions)]

Collaboration diagram for bn Tcl interface:


Files

file  bn_tcl.c
 Tcl interfaces to all the LIBBN math routines.

Data Structures

struct  math_func_link

Functions

int bn_decode_mat (fastf_t *m, const char *str)
int bn_decode_quat (fastf_t *q, const char *str)
int bn_decode_vect (fastf_t *v, const char *str)
int bn_decode_hvect (fastf_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 mat_t q)
void bn_encode_vect (struct bu_vls *vp, const mat_t v)
void bn_encode_hvect (struct bu_vls *vp, const mat_t v)
void bn_quat_distance_wrapper (double *dp, mat_t q1, mat_t q2)
void bn_mat_scale_about_pt_wrapper (int *statusp, mat_t mat, const point_t pt, const double scale)
int bn_math_cmd (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
 Tcl wrappers for the math functions.
int bn_cmd_noise_perlin (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bn_cmd_noise (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bn_cmd_noise_slice (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
 usage: noise_slice xdim ydim inv h_val lac octaves dX dY dZ sX [sY sZ]
int bn_cmd_random (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
void bn_tcl_mat_print (Tcl_Interp *interp, const char *title, const mat_t m)
void bn_tcl_setup (Tcl_Interp *interp)
 Add all the supported Tcl interfaces to LIBBN routines to the list of commands known by the given interpreter.
int Bn_Init (Tcl_Interp *interp)
 Allows LIBBN to be dynamically loade to a vanilla tclsh/wish with "load /usr/brlcad/lib/libbn.so".
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)

Function Documentation

int bn_decode_mat fastf_t m,
const char *  str
 

Definition at line 66 of file bn_tcl.c.

References MAT_IDN.

int bn_decode_quat fastf_t q,
const char *  str
 

Definition at line 81 of file bn_tcl.c.

int bn_decode_vect fastf_t v,
const char *  str
 

Definition at line 88 of file bn_tcl.c.

int bn_decode_hvect fastf_t v,
const char *  str
 

Definition at line 95 of file bn_tcl.c.

void bn_encode_mat struct bu_vls vp,
const mat_t  m
 

Definition at line 102 of file bn_tcl.c.

References bu_vls_printf(), bu_vls_putc(), and NULL.

Referenced by bn_math_cmd(), db_tcl_tree_describe(), vo_model2view_cmd(), vo_pmat_cmd(), vo_pmodel2view_cmd(), vo_rmat_cmd(), and vo_view2model_cmd().

Here is the call graph for this function:

void bn_encode_quat struct bu_vls vp,
const mat_t  q
 

Definition at line 115 of file bn_tcl.c.

References bu_vls_printf(), and V4ARGS.

Referenced by bn_math_cmd().

Here is the call graph for this function:

void bn_encode_vect struct bu_vls vp,
const mat_t  v
 

Definition at line 121 of file bn_tcl.c.

References bu_vls_printf(), and V3ARGS.

Referenced by bn_math_cmd(), rt_tcl_pr_hit(), vo_aet_cmd(), vo_center_cmd(), vo_eye_cmd(), vo_keypoint_cmd(), vo_m2vPoint_cmd(), vo_mrotPoint_cmd(), vo_v2mPoint_cmd(), vo_viewDir_cmd(), and wdb_ocenter_cmd().

Here is the call graph for this function:

void bn_encode_hvect struct bu_vls vp,
const mat_t  v
 

Definition at line 127 of file bn_tcl.c.

References bu_vls_printf(), and V4ARGS.

Referenced by bn_math_cmd().

Here is the call graph for this function:

void bn_quat_distance_wrapper double *  dp,
mat_t  q1,
mat_t  q2
 

Definition at line 133 of file bn_tcl.c.

References quat_distance().

Referenced by bn_math_cmd().

Here is the call graph for this function:

void bn_mat_scale_about_pt_wrapper int *  statusp,
mat_t  mat,
const point_t  pt,
const double  scale
 

Definition at line 139 of file bn_tcl.c.

References bn_mat_scale_about_pt().

Referenced by bn_math_cmd().

Here is the call graph for this function:

int bn_math_cmd ClientData  clientData,
Tcl_Interp interp,
int  argc,
char **  argv
 

Tcl wrappers for the math functions.

B N _ M A T H _ C M D

This is where you should put clauses, in the below "if" statement, to add Tcl support for the LIBBN math routines.

Definition at line 184 of file bn_tcl.c.

References bn_ae_vec(), bn_aet_vec(), bn_decode_hvect(), bn_decode_mat(), bn_decode_quat(), bn_decode_vect(), bn_eigen2x2(), bn_encode_hvect(), bn_encode_mat(), bn_encode_quat(), bn_encode_vect(), bn_isect_line2_line2(), bn_isect_line3_line3(), bn_mat_ae(), bn_mat_angles(), bn_mat_arb_rot(), bn_mat_fromto(), bn_mat_inv(), bn_mat_lookat(), bn_mat_mul(), bn_mat_scale_about_pt_wrapper(), bn_mat_trn(), bn_mat_xform_about_pt(), bn_mat_xrot(), bn_mat_yrot(), bn_mat_zrot(), bn_matXvec(), bn_quat_distance_wrapper(), BN_TOL_MAGIC, bn_vec_ortho(), bn_vec_perp(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), bn_tol::dist, interp, NULL, quat_bisect(), quat_double(), quat_exp(), quat_log(), quat_make_nearest(), quat_mat2quat(), quat_quat2mat(), quat_sberp(), quat_slerp(), quat_t, result, status, TCL_ERROR, TCL_OK, V3ARGS, VBLEND2, VJOIN1, void(), and VSETALL.

Referenced by bn_tcl_setup().

Here is the call graph for this function:

int bn_cmd_noise_perlin ClientData  clientData,
Tcl_Interp interp,
int  argc,
char **  argv
 

Definition at line 674 of file bn_tcl.c.

References atof(), bn_noise_perlin(), interp, NULL, Tcl_Interp::result, TCL_ERROR, TCL_OK, X, Y, and Z.

Here is the call graph for this function:

int bn_cmd_noise ClientData  clientData,
Tcl_Interp interp,
int  argc,
char **  argv
 

Definition at line 704 of file bn_tcl.c.

References atof(), bn_noise_fbm(), bn_noise_turb(), interp, NULL, Tcl_Interp::result, TCL_ERROR, TCL_OK, and val.

Here is the call graph for this function:

int bn_cmd_noise_slice ClientData  clientData,
Tcl_Interp interp,
int  argc,
char **  argv
 

usage: noise_slice xdim ydim inv h_val lac octaves dX dY dZ sX [sY sZ]

The idea here is to get a whole slice of noise at once, thereby avoiding the overhead of doing this in Tcl.

Definition at line 755 of file bn_tcl.c.

References atof(), bn_noise_fbm(), interp, NOISE_FBM, NULL, TCL_ERROR, val, VSETALL, X, Y, and Z.

Here is the call graph for this function:

int bn_cmd_random ClientData  clientData,
Tcl_Interp interp,
int  argc,
char **  argv
 

Definition at line 848 of file bn_tcl.c.

References BN_RANDOM, interp, NULL, TCL_ERROR, TCL_OK, and val.

void bn_tcl_mat_print Tcl_Interp interp,
const char *  title,
const mat_t  m
 

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

Definition at line 892 of file bn_tcl.c.

References bn_mat_print_guts(), interp, and NULL.

Here is the call graph for this function:

void bn_tcl_setup Tcl_Interp interp  ) 
 

Add all the supported Tcl interfaces to LIBBN routines to the list of commands known by the given interpreter.

B N _ T C L _ S E T U P

Definition at line 909 of file bn_tcl.c.

References bn_math_cmd(), interp, and NULL.

Here is the call graph for this function:

int Bn_Init Tcl_Interp interp  ) 
 

Allows LIBBN to be dynamically loade to a vanilla tclsh/wish with "load /usr/brlcad/lib/libbn.so".

B N _ I N I T

The name of this function is specified by TCL.

Definition at line 956 of file bn_tcl.c.

References bn_tcl_setup(), interp, and TCL_OK.

Here is the call graph for this function:

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
 


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