package optics.light;

import basics.math.algebra.Vector;

public class Point extends LightSource {
    private Vector position;

    public Point(Color color, Vector position) {
        super(color);
        this.position = position;
    }

    @Override
    public Vector getDirection(Vector point) {
        return position.sub(point).normalize();
    }

    @Override
    public double getDistance(Vector point) {
        return this.position.distance(point);
    }
}
