Class PhongRayTracer

java.lang.Object
rendering.raytracing.RayTracer
rendering.raytracing.PhongRayTracer

public class PhongRayTracer
extends RayTracer
This RayTracer implements the Phong model.
  • Field Summary

    Fields inherited from class rendering.raytracing.RayTracer

    scene
  • Constructor Summary

    Constructors
    Constructor Description
    PhongRayTracer​(Scene scene, int maxRecursionLevel, double minEffectCoefficient)
    Construct a new PhongRayTracer for the given scene.
  • Method Summary

    Modifier and Type Method Description
    Colour trace​(Ray ray)
    Trace the given ray to calculate the Colour that ray results in.

    Methods inherited from class rendering.raytracing.RayTracer

    trace

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PhongRayTracer

      public PhongRayTracer​(Scene scene, int maxRecursionLevel, double minEffectCoefficient)
      Construct a new PhongRayTracer for the given scene.
      Parameters:
      scene - The scene to trace.
      maxRecursionLevel - The maximum number of times to trace reflections and refractions.
      minEffectCoefficient - The minimum coefficient to consider calculating.
  • Method Details

    • trace

      public Colour trace​(Ray ray)
      Description copied from class: RayTracer
      Trace the given ray to calculate the Colour that ray results in.
      Specified by:
      trace in class RayTracer
      Parameters:
      ray - The ray to trace in the scene.
      Returns:
      The Colour resulting from the trace of the ray.