using System.Collections.Generic;
using Spark3D.Algebra3D;
using Spark3D.Objects3D;

namespace Spark3D.LightSources
{
    public class PointSource : ILightSource
    {
        Vector3D itsLocation;

        public PointSource(Vector3D location)
        {
            itsLocation = location;
        }

        public void Illuminate(IList<Polygon3D> Polygons)
        {
            foreach (Polygon3D p in Polygons)
            {
                p.AddLight(itsLocation);
            }
        }
    }
}
