/* quatext.h (C) 1997 Mark A. Livingston */ /* Any non-commercial use of this code is permitted so long as */ /* the above copyright line appears in the file. Please contact */ /* the author regarding permission for commercial use. */ /* define a type "plane" for plane equation stuff */ typedef double plane[4]; void qx_verbose_mode( int m ); void qx_make_trans_matrix( q_matrix_type mat, q_vec_type vec ); void qx_orthonorm_matrix( q_matrix_type mat ); void qx_vec_mult_matrix( q_vec_type dest, q_vec_type src, q_matrix_type mat ); void qx_vec_mult_matrix_rot( q_vec_type dest, q_vec_type src, q_matrix_type mat ); void qx_gl_mat_to_matrix( q_matrix_type mat, qgl_matrix_type gl_mat ); void qx_gl_mat_from_matrix( qgl_matrix_type gl_mat, q_matrix_type mat ); void qx_file_print_vec( FILE *fp, q_vec_type v ); void qx_file_print_matrix( FILE *fp, q_matrix_type m ); int qx_file_read_vec( FILE *fp, q_vec_type v ); int qx_file_read_matrix( FILE *fp, q_matrix_type m ); void qx_invert_matrix( q_matrix_type invertedMatrix, q_matrix_type srcMatrix ); void qx_invert_matrixGL( qgl_matrix_type invertedMatrix, qgl_matrix_type srcMatrix ); int qx_find_axis( q_xyz_quat_type xfaForg , q_xyz_quat_type xfbForg , q_vec_type axisPoint, q_vec_type axisVect ); void qx_diff( q_type xfbFxfa, q_type xfaForg, q_type xfbForg ); void qx_matrix_diff( double *angl, double *dist, q_matrix_type m1 , q_matrix_type m2 ); void qx_slerpx( q_type xfcForg, q_type xfaForg, q_type xfbForg, double t ); void qx_xyz_quat_scale( q_xyz_quat_type *dst , q_xyz_quat_type *src, double t ); double qx_det_3_vec( q_vec_type vec1, q_vec_type vec2, q_vec_type vec3 ); int qx_intersect_2_3d_lines( q_vec_type pnt0, q_vec_type vec0 , q_vec_type pnt1, q_vec_type vec1 , double *par0, double *par1 ); int qx_touch_2_3d_lines( q_vec_type pnt0, q_vec_type vec0 , q_vec_type pnt1, q_vec_type vec1 , q_vec_type inters, int distprt ); int qx_make_3d_cal_wf( double size, q_vec_type xAxPnt, q_vec_type xAxVec , q_vec_type yAxPnt, q_vec_type yAxVec , q_vec_type wf[] ); void qx_uprint( q_type q ); void qx_file_xyz_quat_print( FILE *fp, q_xyz_quat_type *xyzq ); void qx_xyz_quat_average( q_xyz_quat_type *destQ, q_xyz_quat_type *q, double *w, int ); void qx_matrix_scale( q_matrix_type d, double f, q_matrix_type s ); void qx_matrix_add( q_matrix_type s, q_matrix_type m1, q_matrix_type m2 ); void qx_matrix_transpose( q_matrix_type t, q_matrix_type a ); void qx_xyz_quat_wgt_avg( q_xyz_quat_type *d, q_xyz_quat_type *q, double *w, int n ); void qx_plane_from_3_points( plane p, q_vec_type pt[3] ); double qx_angle_btw_planes( plane p0, plane p1 ); double qx_point_plane_dist( q_vec_type pt, plane p ); void qx_project_point_to_plane( q_vec_type newp, q_vec_type p, plane r );