shader
Class AreaLightShaderOp

java.lang.Object
  extended by shader.AreaLightShaderOp
All Implemented Interfaces:
IShaderOp

public class AreaLightShaderOp
extends java.lang.Object
implements IShaderOp


Constructor Summary
AreaLightShaderOp(double width, double height, Point3D location, Vector3D dir, int samples, IPainter emm, double power, IPainter N, double hotSpot)
          constructor
 
Method Summary
 void performOperation(IntersectionInfo ri, RayState rs, RGBColor c, ScatteredRayContainer raycon, Scene scene)
          computes the color
 boolean requireSPF()
          does the shader op needs the SPF
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AreaLightShaderOp

public AreaLightShaderOp(double width,
                         double height,
                         Point3D location,
                         Vector3D dir,
                         int samples,
                         IPainter emm,
                         double power,
                         IPainter N,
                         double hotSpot)
constructor

Parameters:
width - width of the light source
height - height of the light source
location - where is the light source located
dir - what is the light source focussed on
samples - number of samples to take
emm - emission of this light
power - power scale
N - Phong factor for focussing the light on something
hotSpot - angle in radians of the light's hot spot
Method Detail

performOperation

public void performOperation(IntersectionInfo ri,
                             RayState rs,
                             RGBColor c,
                             ScatteredRayContainer raycon,
                             Scene scene)
Description copied from interface: IShaderOp
computes the color

Specified by:
performOperation in interface IShaderOp
Parameters:
ri - [in] intersection info
rs - [in] actual state of the ray
c - [out] color of the intersection
raycon - [in/out] the ray container
scene - [in]

requireSPF

public boolean requireSPF()
Description copied from interface: IShaderOp
does the shader op needs the SPF

Specified by:
requireSPF in interface IShaderOp
Returns:
true if it needs spf