示例#1
0
        public void DisplayPixel(int X, int Y, ref Vector3D Colors)
        {
            Vector <double> Coords = Colors.ToVector();

            if (Coords[0] > 1.0)
            {
                Coords[0] /= Coords[0];
            }
            if (Coords[1] > 1.0)
            {
                Coords[1] /= Coords[1];
            }
            if (Coords[2] > 1.0)
            {
                Coords[2] /= Coords[2];
            }
            Vector3D ClampedColor = Vector3D.OfVector(Coords);

            ViewPlane.SetPixel(X, Y, ref ClampedColor);
        }
示例#2
0
 public World()
 {
     VP     = new ViewPlane(768, 768);
     Lights = new List <Light>();
 }