material
Class DielectricSPF

java.lang.Object
  extended by material.DielectricSPF
All Implemented Interfaces:
ISPF

public class DielectricSPF
extends java.lang.Object
implements ISPF

the dielectric scattering function


Constructor Summary
DielectricSPF(IPainter tau, IPainter ri, IPainter s, boolean hg)
          constructor - Creates a scattering function
 
Method Summary
 RGBColor getRayColor(IntersectionInfo intersection)
          returns the color of the ray shaded with data from the intersection info
 double getReflectance(Vector3D toLight, IntersectionInfo ri)
           
 void scatter(IntersectionInfo ri, ScatteredRayContainer scattered)
          Creates a scattered ray and adds it to the ray-container
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DielectricSPF

public DielectricSPF(IPainter tau,
                     IPainter ri,
                     IPainter s,
                     boolean hg)
constructor - Creates a scattering function

Parameters:
tau - Transmittance
ri - Index of refraction
s - Scattering function (either Phong or HG)
hg - Use Henyey-Greenstein phase function scattering
Method Detail

getReflectance

public double getReflectance(Vector3D toLight,
                             IntersectionInfo ri)
Parameters:
toLight - vector to the light (normalized)
ri - information of the intersection
Returns:
the reflectance

scatter

public void scatter(IntersectionInfo ri,
                    ScatteredRayContainer scattered)
Creates a scattered ray and adds it to the ray-container

Specified by:
scatter in interface ISPF
Parameters:
ri - [in] intersection details for point of intersection
scattered - [in/out] the container with the scattered rays

getRayColor

public RGBColor getRayColor(IntersectionInfo intersection)
returns the color of the ray shaded with data from the intersection info

Specified by:
getRayColor in interface ISPF
Parameters:
intersection - [in] intersection details for point of intersection
Returns:
the color at the intersection