package eu.jonahbauer.raytracing.render.camera;

import eu.jonahbauer.raytracing.math.Ray;
import org.jetbrains.annotations.NotNull;

import java.util.random.RandomGenerator;

public interface Camera {
    /**
     * {@return the width of this camera in pixels}
     */
    int getWidth();

    /**
     * {@return the height of this camera in pixels}
     */
    int getHeight();

    /**
     * Casts a ray through the given pixel.
     * @param x the pixel x coordinate
     * @param y the pixel y coordinate
     * @param i the subpixel x coordinate
     * @param j the subpixel y coordinate
     * @param n the subpixel count (per side)
     * @param random a random number generator
     * @return a new ray
     */
    @NotNull Ray cast(int x, int y, int i, int j, int n, @NotNull RandomGenerator random);
}
