示例#1
0
        private void AddSphereAndBox()
        {
            // setup a solid reflecting sphere
            double radius = 1.5;

            RayTracer.BaseShape bigSphere = new RayTracer.SphereShape(new Vector3(1, 3, 4), radius, new RayTracer.SolidMaterial(new RGBA_Floats(0, .5, .5), 0.2, 0.0, 2.0));
            renderCollection.Add(bigSphere);

            RayTracer.BoxShape box = new RayTracer.BoxShape(new Vector3(-1, 2, 0), new Vector3(1, 4, 2),
                                                            new RayTracer.SolidMaterial(new RGBA_Floats(.9, .2, .1), .01, 0.0, 2.0));
            renderCollection.Add(box);
        }
        private void AddSphereAndBox()
        {
            // setup a solid reflecting sphere
            double radius = 1.5;
            RayTracer.BaseShape bigSphere = new RayTracer.SphereShape(new Vector3(1, 3, 4), radius, new RayTracer.SolidMaterial(new RGBA_Floats(0, .5, .5), 0.2, 0.0, 2.0));
            renderCollection.Add(bigSphere);

            RayTracer.BoxShape box = new RayTracer.BoxShape(new Vector3(-1, 2, 0), new Vector3(1, 4, 2),
                               new RayTracer.SolidMaterial(new RGBA_Floats(.9, .2, .1), .01, 0.0, 2.0));
            renderCollection.Add(box);
        }