Class LineInterpolator
java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineInterpolator
Interpolates between two points along a line for scanline rendering.
This class calculates screen coordinates and depth values (d) for a given Y position. It supports perspective-correct interpolation by tracking the distance between points and using it to compute step increments.
The comparison logic prioritizes interpolators with greater vertical coverage to optimize scanline ordering.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LineInterpolator
public LineInterpolator()
-
-
Method Details
-
containsY
public boolean containsY(int y) -
getD
public double getD() -
getX
public int getX(int y) -
setPoints
public void setPoints(double x1, double y1, double d1, double x2, double y2, double d2)
-