Exemple #1
0
        private void Shift(object sender, EventArgs e)
        {
            var moveTransformation = TransformationsFactory.CreateMoveTransformation(
                (double)moveX.Value,
                (double)moveY.Value,
                (double)moveZ.Value);

            ApplyTransformation(moveTransformation);
        }
Exemple #2
0
        private void Scale(object sender, EventArgs e)
        {
            var scaleTransformation = TransformationsFactory.CreateScaleTransformation(
                (double)scaleX.Value,
                (double)scaleY.Value,
                (double)scaleZ.Value);

            ApplyTransformation(scaleTransformation);
        }
Exemple #3
0
        private void Rotate(object sender, EventArgs e)
        {
            var rotateTransformation = TransformationsFactory.CreateRotateTransformation(
                (double)angleX.Value,
                (double)angleY.Value,
                (double)angleZ.Value);

            ApplyTransformation(rotateTransformation);
        }
Exemple #4
0
        private void MoveLight(object sender, EventArgs e)
        {
            var moveTransformation = TransformationsFactory.CreateMoveTransformation(
                (double)moveLightX.Value,
                (double)moveLightY.Value,
                (double)moveLightZ.Value);

            moveTransformation.Transform(lightPoint);
            RedrawFigures();
        }
Exemple #5
0
        private void ViewViewTransformationProjection(object sender, EventArgs e)
        {
            projection             = ProjectionsFactory.CreatePerspectiveProjection((double)d.Value);
            currentPlane           = PlaneFactory.CreateXY(DefaultPoint);
            currentPlane.ViewPoint = MathExtensions.CreatePolarPoint(
                (double)anglePhiView.Value,
                (double)angleTheta.Value,
                (double)rho.Value);
            var viewTransformation = TransformationsFactory.CreateViewTransformation(
                (double)anglePhiView.Value,
                (double)angleTheta.Value,
                (double)rho.Value,
                (double)d.Value);

            projection = viewTransformation;
            RedrawFigures();
        }