Esempio n. 1
0
        private void SpawnMap6()
        {
            skybox = null;

            //Point light
            Light light = new Light(LightType.Point, new Vector3(0.7f, 0.7f, 0.7f), 20.0f, new Vector3(0.0f, -1.45f, 2.0f), 0.5f);             //new Vector3(0.0f, -0.1f, 2.0f) //-1.45f

            lights.Add(light);

            //Floor
            Mesh floor = new Plane(new Vector3(0.0f, -1.0f, 0.0f), new Vector3(0.0f, -2.0f, 0.0f), null, "Floor");

            meshes.Add(floor);
            Material planeMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.75f, 0.75f, 0.75f));

            materials.Add(planeMaterial);

            //Roof
            Mesh roof = new Plane(new Vector3(0.0f, 1.0f, 0.0f), new Vector3(0.0f, -1.5f, 0.0f), null, "Roof");

            meshes.Add(roof);
            Material roofMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.75f, 0.75f, 0.75f));

            materials.Add(roofMaterial);

            //Left wall
            Mesh leftWall = new Plane(new Vector3(1.0f, 0.0f, 0.0f), new Vector3(0.0f, -2.0f, 0.0f), null, "Left Wall");

            meshes.Add(leftWall);
            Material leftWallMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.75f, 0.25f, 0.25f));

            materials.Add(leftWallMaterial);

            //Right wall
            Mesh rightWall = new Plane(new Vector3(-1.0f, 0.0f, 0.0f), new Vector3(0.0f, -2.0f, 0.0f), null, "Right Wall");

            meshes.Add(rightWall);
            Material rightWallMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.25f, 0.25f, 0.75f));

            materials.Add(rightWallMaterial);

            //Front wall
            Mesh frontWall = new Plane(new Vector3(0.0f, 0.0f, -1.0f), new Vector3(0.0f, -4.2f, 0.0f), null, "Front Wall");

            meshes.Add(frontWall);
            Material frontWallMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.75f, 0.75f, 0.75f));

            materials.Add(frontWallMaterial);

            //Back wall
            Mesh backWall = new Plane(new Vector3(0.0f, 0.0f, 1.0f), new Vector3(0.0f, -5.0f, 0.0f), null, "Back Wall");

            meshes.Add(backWall);
            Material backWallMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.75f, 0.75f, 0.75f));

            materials.Add(backWallMaterial);

            //Mirror ball
            Mesh sphere1 = new Sphere(new Vector3(-0.9f, 1.35f, 3.0f), 0.65f, "Mirror Ball");

            meshes.Add(sphere1);
            Material sphere1Material = new ReflectionMaterial(TextureType.Color, 1.0f);

            materials.Add(sphere1Material);

            //Glass ball
            Mesh sphere2 = new Sphere(new Vector3(1.0f, 1.35f, 2.25f), 0.65f, "Glass Ball");

            meshes.Add(sphere2);
            Material sphere2Material = new ReflectionRefractionMaterial(TextureType.Color, 1.5f);

            materials.Add(sphere2Material);
        }
Esempio n. 2
0
        private void SpawnMap3()
        {
            skybox = null;

            //Point light
            Light light = new Light(LightType.Point, new Vector3(0.7f, 0.7f, 0.7f), 15.0f, new Vector3(0.0f, -1.45f, 2.0f), 0.5f);

            lights.Add(light);

            //Floor
            Mesh floor = new Plane(new Vector3(0.0f, -1.0f, 0.0f), new Vector3(0.0f, -2.0f, 0.0f), null, "Floor");

            meshes.Add(floor);
            Material planeMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.75f, 0.75f, 0.75f));

            materials.Add(planeMaterial);

            //Roof
            Mesh roof = new Plane(new Vector3(0.0f, 1.0f, 0.0f), new Vector3(0.0f, -1.5f, 0.0f), null, "Roof");

            meshes.Add(roof);
            Material roofMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.75f, 0.75f, 0.75f));

            materials.Add(roofMaterial);

            //Left wall
            Mesh leftWall = new Plane(new Vector3(1.0f, 0.0f, 0.0f), new Vector3(0.0f, -2.0f, 0.0f), null, "Left Wall");

            meshes.Add(leftWall);
            Material leftWallMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.75f, 0.25f, 0.25f));

            materials.Add(leftWallMaterial);

            //Right wall
            Mesh rightWall = new Plane(new Vector3(-1.0f, 0.0f, 0.0f), new Vector3(0.0f, -2.0f, 0.0f), null, "Right Wall");

            meshes.Add(rightWall);
            Material rightWallMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.25f, 0.25f, 0.75f));

            materials.Add(rightWallMaterial);

            //Front wall
            Mesh frontWall = new Plane(new Vector3(0.0f, 0.0f, -1.0f), new Vector3(0.0f, -4.2f, 0.0f), null, "Front Wall");

            meshes.Add(frontWall);
            Material frontWallMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.75f, 0.75f, 0.75f));

            materials.Add(frontWallMaterial);

            //Back wall
            Mesh backWall = new Plane(new Vector3(0.0f, 0.0f, 1.0f), new Vector3(0.0f, -5.0f, 0.0f), null, "Back Wall");

            meshes.Add(backWall);
            Material backWallMaterial = new DiffuseMaterial(TextureType.Color, new Vector3(0.75f, 0.75f, 0.75f));

            materials.Add(backWallMaterial);

            //Photograph
            Mesh mirror = new Plane(new Vector3(0.0f, 0.0f, -1.0f), new Vector3(0.0f, 0.0f, -4.19f), new Vector3(2.0f, 1.0f, 2.0f * 1.26666f), "Photograph");

            meshes.Add(mirror);
            Material mirrorMaterial = new DiffuseMaterial(TextureType.Texture, "../../Assets/Textures/AilinTrym.png");

            materials.Add(mirrorMaterial);

            //Ball
            Mesh sphere1 = new Sphere(new Vector3(-0.9f, 1.35f, 2.0f), 0.65f, "Ball");

            meshes.Add(sphere1);
            Material sphere1Material = new DiffuseMaterial(TextureType.Texture, "../../Assets/Textures/test.png");

            materials.Add(sphere1Material);

            //Glass ball
            Mesh sphere2 = new Sphere(new Vector3(1.0f, 1.35f, 1.75f), 0.65f, "Glass Ball");

            meshes.Add(sphere2);
            Material sphere2Material = new ReflectionRefractionMaterial(TextureType.Color, 1.5f);

            materials.Add(sphere2Material);
        }