|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.grogra.ray.util.RayList
public final class RayList
This class represents a list of rays.
Field Summary | |
---|---|
Ray[] |
rays
The array of light rays. |
Spectrum |
spectrumFactory
|
Constructor Summary | |
---|---|
RayList()
|
|
RayList(int size)
|
|
RayList(Spectrum factory)
|
Method Summary | |
---|---|
void |
appendRay(Ray lastRay)
|
void |
clear()
|
int |
getSize()
|
Ray |
lastRay()
|
Ray |
nextRay()
|
void |
setSize(int size)
Sets the size of the light ray array. |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Ray[] rays
size
- 1 are the valid light rays.
public final Spectrum spectrumFactory
Constructor Detail |
---|
public RayList()
public RayList(int size)
public RayList(Spectrum factory)
Method Detail |
---|
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()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |