raytracer
Class ScatteredRayContainer

java.lang.Object
  extended by raytracer.ScatteredRayContainer

public class ScatteredRayContainer
extends java.lang.Object


Field Summary
 java.util.ArrayList<ScatteredRay> rays
           
 
Constructor Summary
ScatteredRayContainer()
          constructor
ScatteredRayContainer(ScatteredRayContainer raycon)
          copy constructor
 
Method Summary
 void addScatteredRay(ScatteredRay ray)
          adds a scattered ray to the list
 ScatteredRay get(int i)
           
 int getSize()
           
 ScatteredRay randomlySelect()
          from the rays stored, randomly returns one given a value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rays

public java.util.ArrayList<ScatteredRay> rays
Constructor Detail

ScatteredRayContainer

public ScatteredRayContainer()
constructor


ScatteredRayContainer

public ScatteredRayContainer(ScatteredRayContainer raycon)
copy constructor

Parameters:
raycon - [in/out] ray container
Method Detail

addScatteredRay

public void addScatteredRay(ScatteredRay ray)
adds a scattered ray to the list

Parameters:
ray - scattered ray

getSize

public int getSize()
Returns:
the number of rays stored in the list

get

public ScatteredRay get(int i)
Parameters:
i -
Returns:
scattered ray with number i

randomlySelect

public ScatteredRay randomlySelect()
from the rays stored, randomly returns one given a value

Returns:
a scattered ray