/// <summary> /// Rotates the Vector by the specified Euler Angles. /// </summary> /// <param name="eulerAngles">Angles to rotate.</param> public void EulerRotation(Euler.Angles eulerAngles) { int i = 0; int t = 0; double[] M3 = new double[3]; double[] M2 = { I, J, K }; for (i = 0; i <= 2; i++) { M3[i] = 0; for (t = 0; t <= 2; t++) { M3[i] += eulerAngles.Matrix[i, t] * M2[t]; } } _i = M3[0]; _j = M3[1]; _k = M3[2]; }
/// <summary> /// Rotates the Point by the specified Euler Angles. /// </summary> /// <param name="angle">Angles of rotation.</param> public void EulerRotation(Euler.Angles angle) { int i = 0; int t = 0; double[] M3 = new double[3]; double[] M2 = { X, Y, Z }; for (i = 0; i <= 2; i++) { M3[i] = 0; for (t = 0; t <= 2; t++) { M3[i] += angle.Matrix[i, t] * M2[t]; } } X = M3[0]; Y = M3[1]; Z = M3[2]; }