Beispiel #1
0
        public void RotateBlah(Rotation rotation)
        {
            var rotateX = rotation.GetXMatrix();
            var rotateY = rotation.GetYMatrix();
            var rotateZ = rotation.GetZMatrix();

            var result = rotateZ * rotateX * rotateY;
            for (int i = 0; i < TransformedVertices.Length; i++)
            {
                var verticeMatrix = TransformedVertices[i].ToSingleRowMatrix();
                var verticeResult = verticeMatrix * result;
                TransformedVertices[i].X = (float)verticeResult[0, 0];
                TransformedVertices[i].Y = (float)verticeResult[0, 1];
                TransformedVertices[i].Z = (float)verticeResult[0, 2];
            }
        }