示例#1
0
        private void UpdateForm()
        {
            cube = new Cube();

            var transformationMatrix = (new Matrix4() * cubeControls.Values.CubeScale)
                                       .RotateX(cubeControls.Values.CubeThetaX)
                                       .RotateY(cubeControls.Values.CubeThetaY)
                                       .RotateZ(cubeControls.Values.CubeThetaZ)
                                       .Translate(
                new Vector3(
                    cubeControls.Values.CubeX,
                    cubeControls.Values.CubeY,
                    cubeControls.Values.CubeZ
                    )
                );

            cube.ApplyMatrix(transformationMatrix);

            // Invalidate form to trigger a new paint
            Invalidate();
        }