apps.lightrays.raytracer.shaders
Class PhongShader

java.lang.Object
  extended by apps.lightrays.raytracer.shaders.Shader
      extended by apps.lightrays.raytracer.shaders.PhongShader
Direct Known Subclasses:
PlaneShader

public class PhongShader
extends Shader

The Class PhongShader.


Constructor Summary
PhongShader(Scene scene, Ray incident_ray, RayHitInfo hit, SceneObject obj)
          Instantiates a new phong shader.
 
Method Summary
 void getColour(Colour c)
          Gets the colour.
 Vector reflect()
          Reflect.
 Vector refract()
          Refract.
 
Methods inherited from class apps.lightrays.raytracer.shaders.Shader
getDepth, getIncident_ray, getOptical_properties, setDepth, setIncident_ray, setOptical_properties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhongShader

public PhongShader(Scene scene,
                   Ray incident_ray,
                   RayHitInfo hit,
                   SceneObject obj)
Instantiates a new phong shader.

Parameters:
scene - the scene
incident_ray - the incident_ray
hit - the hit
obj - the obj
Method Detail

getColour

public void getColour(Colour c)
Description copied from class: Shader
Gets the colour.

Specified by:
getColour in class Shader
Parameters:
c - the c

reflect

public Vector reflect()
Reflect.

Returns:
the vector

refract

public Vector refract()
Refract.

Returns:
the vector