// Zdd: rotate angle degrees along X, Y, and Z. // For example, rot_angle (90.0, 1.0, 0.0, 0.0) is rotated 90 degrees along the X axis void rot_angle (float angle, float X, float y, float Z) {VEC <3, double> x_axis (x, y, z); double ang = m_pi/180.0f * angle; /* // In order to display the model in the video center, an xFF matrix XForm xFF = XForm: Trans (0, 0,-3.5f/FOV * themesh-> bsphere is moved. r) * XForm: Trans (-themesh-> bsphere. center); XForm I _xff = XForm: Trans (themesh-> bsphere. center) * XForm: Trans (0, 0, 3.5f/FOV * themesh-> bsphere. r); XF = xFF * XForm: Trans (themesh-> bsphere. center) * XForm: rot (Ang, x_axis) * XForm: Trans (-themesh-> bsphere. center) * I _xff * XF; * // the preceding three lines are clear and simplified as follows: XF = XForm: Trans (0, 0,-3.5f/FOV * themesh-> bsphere. r) * XForm: rot (Ang, x_axis) * XForm: Trans (0, 0, 3.5f/FOV * themesh-> bsphere. r) * XF ;}