raytracer
Class ScatteredRayContainer
java.lang.Object
raytracer.ScatteredRayContainer
public class ScatteredRayContainer
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rays
public java.util.ArrayList<ScatteredRay> rays
ScatteredRayContainer
public ScatteredRayContainer()
- constructor
ScatteredRayContainer
public ScatteredRayContainer(ScatteredRayContainer raycon)
- copy constructor
- Parameters:
raycon
- [in/out] ray container
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