马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
void Make_Rister_Matrix_9(double rister_o[3],CString rister_z,double matrix_values[9],CString m_kc,
double new_matrix_values[9],double output_point[ 3 ] )
{
double rotation_angle;
double rotation_axis[ 3 ];
double rister_c[3];
tag_t matrix_id;
tag_t wcs_id;
tag_t csys_id;
UF_CSYS_ask_wcs (&wcs_id );
UF_CSYS_create_matrix (matrix_values, &matrix_id );
UF_CSYS_create_csys (rister_o, matrix_id, &csys_id );
UF_CSYS_set_wcs (csys_id);
UF_CSYS_set_wcs_display (1);
rotation_angle = atof(m_kc)*DEGRA;
rister_c[0] = 0.0;
rister_c[1] = 0.0;
rister_c[2] = atof(rister_z);
UF_CSYS_map_point (UF_CSYS_ROOT_WCS_COORDS, rister_c,
UF_CSYS_ROOT_COORDS, output_point);
UF_MTX3_z_vec (matrix_values, rotation_axis);
rotation_axis[2] = 0.0-rotation_axis[2];
UF_MTX3_rotate_about_axis (rotation_axis, rotation_angle, new_matrix_values);
UF_MTX3_y_vec (matrix_values, rotation_axis);
UF_CSYS_set_wcs(wcs_id);
UF_CSYS_set_wcs_display (1);
UF_OBJ_delete_object(csys_id);
}
UF_MTX3_rotate_about_axis:结果是绝对坐标下的matrix,该怎么得到在新建的
坐标下旋转后的matrix 啊??? |