Ejemplo n.º 1
0
        private void SetDefaultsForSixthLab()
        {
            _labBase = new SixthLab(_image);

            var elements = new IAddable[7];

            elements[0] = new AmbientLight(0.2f);

            elements[1] = new PointLight(
                new DoublePoint3D(2, 1, 0),
                0.6f
                );

            elements[2] = new DirectLight(
                new DoublePoint3D(1, 4, 4),
                0.2f
                );

            elements[3] = new Sphere(
                new DoublePoint3D(0, -1, 3),
                1,
                new ColorRGB(255, 0, 0),
                500,
                0.2f,
                0f);

            elements[4] = new Sphere(
                new DoublePoint3D(2, 0, 4),
                1,
                new ColorRGB(0, 0, 255),
                500,
                0.3f,
                0f);

            elements[5] = new Sphere(
                new DoublePoint3D(-2, 0, 4),
                1,
                new ColorRGB(0, 255, 0),
                10,
                0.4f,
                0f);

            elements[6] = new Sphere(
                new DoublePoint3D(0, -5001, 0),
                5000,
                new ColorRGB(255, 255, 0),
                1000,
                0.5f,
                0f);

            /*elements[6] = new Hexahedron(
             *  new DoublePoint3D[] {
             *  new DoublePoint3D(-1, -1, 4),
             *  new DoublePoint3D(-1, 1, 4),
             *  new DoublePoint3D(1, 1, 4),
             *  new DoublePoint3D(1, -1, 4),
             *  new DoublePoint3D(0, 0, 0),
             *  new DoublePoint3D(0, 0, 0),
             *  new DoublePoint3D(0, 0, 0),
             *  new DoublePoint3D(0, 0, 0)
             *  },
             *  new DoublePoint2D(0, 0),
             *  new ColorRGB(255,0,0),
             *  1000,
             *  0f,
             *  0f
             *  );*/

            ElementsLB.Items.AddRange(elements);

            CameraX.Text = "0";
            CameraY.Text = "0";
            CameraZ.Text = "0";

            CameraXAngleTB.Value = 0;
            CameraYAngleTB.Value = 0;

            _labParameters = ParseSixthLabParameters();
            (_labParameters as SixthLabParameters).Initial = true;
        }
Ejemplo n.º 2
0
 private void SetDefaultsForFourthLab()
 {
     _labBase       = new FourthLab(_image);
     _labParameters = ParseFourthLabParameters();
     FirstPresetFourthLab();
 }
Ejemplo n.º 3
0
 private void SetDefaultsForSecondLab()
 {
     _labBase       = new SecondLab(_image);
     _labParameters = ParseSecondLabParameters();
 }
Ejemplo n.º 4
0
 private void SetDefaultsForThirdLab()
 {
     FirstPresetThirdLab();
     _labBase       = new ThirdLab(_image);
     _labParameters = ParseThirdLabParameters();
 }
Ejemplo n.º 5
0
 private void SetDefaultsForFirstLab()
 {
     _labBase       = new FirstLab(_image);
     _labParameters = ParseFirstLabParameters();
 }