Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.ray.util
Class RayList

    java.lang.Object
      de.grogra.ray.util.RayList

    public final class RayList

extends java.lang.Object

This class represents a list of rays.

Author:
  Ole Kniemeyer

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

### rays

    public Ray[] rays

  The array of light rays. The components with indices from 0 to `size` - 1 are the valid light rays.

### spectrumFactory

    public final Spectrum spectrumFactory

Constructor Detail

### RayList

    public RayList()

### RayList

    public RayList(int size)

### RayList

    public RayList(Spectrum factory)

Method Detail

### appendRay

    public void appendRay(Ray lastRay)

### clear

    public void clear()

### getSize

    public int getSize()

### lastRay

    public Ray lastRay()

### nextRay

    public Ray nextRay()

### setSize

    public void setSize(int size)

  Sets the size of the light ray array. The field `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`.

  Parameters:
    `size` - the new size of the light ray array

### size

    public int size()

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD