BRL-CAD
#include "common.h"
#include <string.h>
#include <math.h>
#include "tcl.h"
#include "bn.h"
#include "bu/cmd.h"
#include "bu/units.h"
#include "vmath.h"
#include "ged.h"
#include "obj.h"
Include dependency graph for view_obj.c:

Go to the source code of this file.

Functions

void vo_update (struct view_obj *vop, int oflag)
 
void vo_mat_aet (struct view_obj *vop)
 
struct view_obj * vo_open_cmd (const char *oname)
 
void vo_size (struct view_obj *vop, fastf_t size)
 
int vo_size_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_invSize_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_aet_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_rmat_cmd (struct view_obj *vop, int argc, const char *argv[])
 
void vo_center (struct view_obj *vop, point_t center)
 
int vo_center_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_model2view_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_pmodel2view_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_view2model_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_perspective_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_pmat_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_eye_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_eye_pos_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_lookat_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_orientation_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_pov_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_zoom (struct view_obj *vop, fastf_t sf)
 
int vo_zoom_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_units_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_base2local_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_local2base_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_rot (struct view_obj *vop, char coord, char rotate_about, mat_t rmat, int(*func)())
 
int vo_rot_cmd (struct view_obj *vop, int argc, const char *argv[], int(*func)())
 
int vo_tra (struct view_obj *vop, char coord, vect_t tvec, int(*func)())
 
int vo_tra_cmd (struct view_obj *vop, int argc, const char *argv[], int(*func)())
 
int vo_slew (struct view_obj *vop, vect_t svec)
 
int vo_slew_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_observer_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_coord_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_rotate_about_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_keypoint_cmd (struct view_obj *vop, int argc, const char *argv[])
 
void vo_setview (struct view_obj *vop, vect_t rvec)
 
int vo_setview_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_arot_cmd (struct view_obj *vop, int argc, const char *argv[], int(*func)())
 
int vo_vrot_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_mrot_cmd (struct view_obj *vop, int argc, const char *argv[], int(*func)())
 
int vo_mrotPoint_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_m2vPoint_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_v2mPoint_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_sca (struct view_obj *vop, fastf_t sf, int(*func)())
 
int vo_sca_cmd (struct view_obj *vop, int argc, const char *argv[], int(*func)())
 
int vo_viewDir_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_ae2dir_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int vo_dir2ae_cmd (struct view_obj *vop, int argc, const char *argv[])
 
int Vo_Init (Tcl_Interp *interp)
 

Variables

struct view_obj HeadViewObj
 

Detailed Description

A view object contains the attributes and methods for controlling viewing transformations.

Definition in file view_obj.c.

Function Documentation

void vo_update ( struct view_obj *  vop,
int  oflag 
)

Definition at line 67 of file view_obj.c.

References bn_aet_vec(), bn_mat_inv(), bn_mat_mul(), bu_observer_notify(), bu_vls_addr(), NEAR_ZERO, and VSET.

Referenced by vo_aet_cmd(), vo_center(), vo_eye_cmd(), vo_eye_pos_cmd(), vo_lookat_cmd(), vo_open_cmd(), vo_orientation_cmd(), vo_perspective_cmd(), vo_pov_cmd(), vo_rmat_cmd(), vo_rot(), vo_sca(), vo_setview(), vo_size(), vo_slew(), vo_tra(), and vo_zoom().

Here is the call graph for this function:

void vo_mat_aet ( struct view_obj *  vop)

Definition at line 115 of file view_obj.c.

References bn_mat_angles(), bn_mat_mul2(), and bn_mat_zrot().

Referenced by vo_aet_cmd(), and vo_lookat_cmd().

Here is the call graph for this function:

struct view_obj* vo_open_cmd ( const char *  oname)

Definition at line 139 of file view_obj.c.

References BU_GET, BU_LIST_APPEND, BU_LIST_INIT, bu_vls_init(), bu_vls_strcpy(), HeadViewObj, vo_update(), VSET, and VSETALL.

Here is the call graph for this function:

void vo_size ( struct view_obj *  vop,
fastf_t  size 
)

Definition at line 174 of file view_obj.c.

References RT_MINVIEWSIZE, SQRT_SMALL_FASTF, and vo_update().

Referenced by vo_size_cmd().

Here is the call graph for this function:

int vo_size_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 189 of file view_obj.c.

References bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), SMALL_FASTF, and vo_size().

Here is the call graph for this function:

int vo_invSize_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 247 of file view_obj.c.

References bu_vls_addr(), bu_vls_free(), bu_vls_init(), and bu_vls_printf().

Here is the call graph for this function:

int vo_aet_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 290 of file view_obj.c.

References bn_decode_vect(), bn_encode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_mat_aet(), vo_update(), X, Y, and Z.

Here is the call graph for this function:

int vo_rmat_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 399 of file view_obj.c.

References bn_decode_mat(), bn_encode_mat(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), and vo_update().

Here is the call graph for this function:

void vo_center ( struct view_obj *  vop,
point_t  center 
)

Definition at line 453 of file view_obj.c.

References vo_update().

Referenced by vo_center_cmd().

Here is the call graph for this function:

int vo_center_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 463 of file view_obj.c.

References bn_decode_vect(), bn_encode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_center(), X, Y, and Z.

Here is the call graph for this function:

int vo_model2view_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 543 of file view_obj.c.

References bn_encode_mat(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), and bu_vls_printf().

Here is the call graph for this function:

int vo_pmodel2view_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 586 of file view_obj.c.

References bn_encode_mat(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), and bu_vls_printf().

Here is the call graph for this function:

int vo_view2model_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 629 of file view_obj.c.

References bn_encode_mat(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), and bu_vls_printf().

Here is the call graph for this function:

int vo_perspective_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 669 of file view_obj.c.

References bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), persp_mat(), and vo_update().

Here is the call graph for this function:

int vo_pmat_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 734 of file view_obj.c.

References bn_encode_mat(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), and bu_vls_printf().

Here is the call graph for this function:

int vo_eye_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 777 of file view_obj.c.

References bn_decode_vect(), bn_encode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_update(), VSET, X, Y, and Z.

Here is the call graph for this function:

int vo_eye_pos_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 874 of file view_obj.c.

References bn_decode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), mike_persp_mat(), vo_update(), X, Y, and Z.

Here is the call graph for this function:

int vo_lookat_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 947 of file view_obj.c.

References bn_ae_vec(), bn_decode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_mat_aet(), vo_update(), VSET, X, Y, and Z.

Here is the call graph for this function:

int vo_orientation_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1033 of file view_obj.c.

References bn_decode_quat(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), quat_quat2mat(), and vo_update().

Here is the call graph for this function:

int vo_pov_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1087 of file view_obj.c.

References bn_decode_quat(), bn_decode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), quat_quat2mat(), and vo_update().

Here is the call graph for this function:

int vo_zoom ( struct view_obj *  vop,
fastf_t  sf 
)

Definition at line 1168 of file view_obj.c.

References RT_MINVIEWSCALE, SMALL_FASTF, and vo_update().

Referenced by vo_zoom_cmd().

Here is the call graph for this function:

int vo_zoom_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1188 of file view_obj.c.

References bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), and vo_zoom().

Here is the call graph for this function:

int vo_units_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1230 of file view_obj.c.

References bu_units_conversion(), bu_units_string(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), and ZERO.

Here is the call graph for this function:

int vo_base2local_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1293 of file view_obj.c.

References bu_vls_addr(), bu_vls_free(), bu_vls_init(), and bu_vls_printf().

Here is the call graph for this function:

int vo_local2base_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1335 of file view_obj.c.

References bu_vls_addr(), bu_vls_free(), bu_vls_init(), and bu_vls_printf().

Here is the call graph for this function:

int vo_rot ( struct view_obj *  vop,
char  coord,
char  rotate_about,
mat_t  rmat,
int(*)()  func 
)

Definition at line 1377 of file view_obj.c.

References bn_mat_inv(), bn_mat_mul(), bn_mat_mul2(), bn_mat_xform_about_pt(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_update(), and VSET.

Referenced by vo_arot_cmd(), vo_mrot_cmd(), vo_rot_cmd(), and vo_vrot_cmd().

Here is the call graph for this function:

int vo_rot_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[],
int(*)()  func 
)

Definition at line 1450 of file view_obj.c.

References bn_decode_vect(), bn_mat_angles(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_rot(), X, Y, and Z.

Here is the call graph for this function:

int vo_tra ( struct view_obj *  vop,
char  coord,
vect_t  tvec,
int(*)()  func 
)

Definition at line 1531 of file view_obj.c.

References delta, and vo_update().

Referenced by vo_tra_cmd().

Here is the call graph for this function:

int vo_tra_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[],
int(*)()  func 
)

Definition at line 1566 of file view_obj.c.

References bn_decode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_tra(), X, Y, and Z.

Here is the call graph for this function:

int vo_slew ( struct view_obj *  vop,
vect_t  svec 
)

Definition at line 1643 of file view_obj.c.

References vo_update().

Referenced by vo_slew_cmd().

Here is the call graph for this function:

int vo_slew_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1657 of file view_obj.c.

References bn_decode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_slew(), X, Y, and Z.

Here is the call graph for this function:

int vo_observer_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1732 of file view_obj.c.

References bu_log(), and bu_observer_cmd().

Here is the call graph for this function:

int vo_coord_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1763 of file view_obj.c.

References bu_vls_addr(), bu_vls_free(), bu_vls_init(), and bu_vls_printf().

Here is the call graph for this function:

int vo_rotate_about_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1815 of file view_obj.c.

References bu_vls_addr(), bu_vls_free(), bu_vls_init(), and bu_vls_printf().

Here is the call graph for this function:

int vo_keypoint_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1869 of file view_obj.c.

References bn_decode_vect(), bn_encode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), X, Y, and Z.

Here is the call graph for this function:

void vo_setview ( struct view_obj *  vop,
vect_t  rvec 
)

Definition at line 1949 of file view_obj.c.

References bn_mat_angles(), vo_update(), X, Y, and Z.

Referenced by vo_setview_cmd().

Here is the call graph for this function:

int vo_setview_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 1958 of file view_obj.c.

References bn_decode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_setview(), X, Y, and Z.

Here is the call graph for this function:

int vo_arot_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[],
int(*)()  func 
)

Definition at line 2021 of file view_obj.c.

References bn_mat_arb_rot(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_rot(), VSETALL, X, Y, and Z.

Here is the call graph for this function:

int vo_vrot_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 2092 of file view_obj.c.

References bn_decode_vect(), bn_mat_angles(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_rot(), X, Y, and Z.

Here is the call graph for this function:

int vo_mrot_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[],
int(*)()  func 
)

Definition at line 2158 of file view_obj.c.

References bn_decode_vect(), bn_mat_angles(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), vo_rot(), X, Y, and Z.

Here is the call graph for this function:

int vo_mrotPoint_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 2225 of file view_obj.c.

References bn_decode_vect(), bn_encode_vect(), bn_mat_inv(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), X, Y, and Z.

Here is the call graph for this function:

int vo_m2vPoint_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 2313 of file view_obj.c.

References bn_decode_vect(), bn_encode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), X, Y, and Z.

Here is the call graph for this function:

int vo_v2mPoint_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 2395 of file view_obj.c.

References bn_decode_vect(), bn_encode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), X, Y, and Z.

Here is the call graph for this function:

int vo_sca ( struct view_obj *  vop,
fastf_t  sf,
int(*)()  func 
)

Definition at line 2481 of file view_obj.c.

References RT_MINVIEWSIZE, SMALL_FASTF, and vo_update().

Referenced by vo_sca_cmd().

Here is the call graph for this function:

int vo_sca_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[],
int(*)()  func 
)

Definition at line 2502 of file view_obj.c.

References bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), and vo_sca().

Here is the call graph for this function:

int vo_viewDir_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 2545 of file view_obj.c.

References bn_encode_vect(), bn_mat_inv(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), and VSET.

Here is the call graph for this function:

int vo_ae2dir_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

Definition at line 2605 of file view_obj.c.

References bn_encode_vect(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), and bu_vls_printf().

Here is the call graph for this function:

int vo_dir2ae_cmd ( struct view_obj *  vop,
int  argc,
const char *  argv[] 
)

guts to the dir2ae command

Definition at line 2692 of file view_obj.c.

References bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), X, Y, and Z.

Here is the call graph for this function:

int Vo_Init ( Tcl_Interp *  interp)

Definition at line 2863 of file view_obj.c.

References BU_LIST_INIT, and HeadViewObj.

Variable Documentation

struct view_obj HeadViewObj

Definition at line 49 of file view_obj.c.

Referenced by Vo_Init(), and vo_open_cmd().