de.grogra.ray.util
public final class RayList extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
Ray[] |
rays
The array of light rays.
|
Spectrum |
spectrumFactory |
| Constructor and Description |
|---|
RayList() |
RayList(int size) |
RayList(Spectrum factory) |
public Ray[] rays
size - 1 are the valid light rays.public final Spectrum spectrumFactory
public RayList()
public RayList(int size)
public RayList(Spectrum factory)
public void appendRay(Ray lastRay)
public void clear()
public int getSize()
public Ray lastRay()
public Ray nextRay()
public void setSize(int size)
size
is set to size, and the array rays
is enlarged if necessary so that it
has length of at least size. If an enlargement
is necessary, the existing array components are copied into the
new array, and the newly added components are initialized with
new instances of Ray.size - the new size of the light ray arraypublic int size()