예제 #1
0
        //Transform:RotateY in degrees not radians
        public void RotateY(float angle)
        {
            float x1 = Vertex1[0];
            float z1 = Vertex1[2];
            float x2 = Vertex2[0];
            float z2 = Vertex2[2];
            float x3 = Vertex3[0];
            float z3 = Vertex3[2];

            MathTrigonometry.RotateY(angle, ref x1, ref z1);
            MathTrigonometry.RotateY(angle, ref x2, ref z2);
            MathTrigonometry.RotateY(angle, ref x3, ref z3);
            CalcNormal();
            Vertex1[0] = x1; Vertex1[2] = z1;
            Vertex2[0] = x2; Vertex2[2] = z2;
            Vertex3[0] = x3; Vertex3[2] = z3;
        }
예제 #2
0
 public static void RotateY(float angle, ref float x, ref float z)
 {
     MathTrigonometry.RotateY(angle, ref x, ref z);
 }