Package scene.camera
Class Pixel<T>
java.lang.Object
scene.camera.Pixel<T>
- Type Parameters:
T
- The generic type T is the type of the data that each pixel knows about itself. This may be simply the center point of the pixel, it may be a collection of many points in the pixel, it may be a ray (or an array of rays) from some point to the pixel, or anything else.
public class Pixel<T>
extends java.lang.Object
This class represents a pixel in a
PixelGrid
. The pixel knows its position in the grid in terms of the row
and column indices.-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
data
The data stored by each pixel. This may be the center point of the pixel for example, or a ray to the pixel. -
row
public final int rowThe row index of the pixel in itsPixelGrid
. -
col
public final int colThe column index of the pixel in itsPixelGrid
.
-
-
Constructor Details
-
Pixel
Construct a newPixel
with the given row and column indices storing somedata
about itself.- Parameters:
data
- The data stored by the pixel.row
- The row index of the pixel.col
- The column index of the pixel.
-