Class Polygon

java.lang.Object
  extended by Surface
      extended by Polygon

public class Polygon
extends Surface

Represents a three-dimensional flat surface. This surface should be fully opaque.


Field Summary
 
Fields inherited from class Surface
EMPTY
 
Constructor Summary
Polygon(Point[] vertices, Material material)
           
 
Method Summary
 Intersection getIntersection(Ray query)
          Returns information about the closest point on this surface that the query ray hits, where the ``distance'' along the ray will be at least one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polygon

public Polygon(Point[] vertices,
               Material material)
Method Detail

getIntersection

public Intersection getIntersection(Ray query)
Description copied from class: Surface
Returns information about the closest point on this surface that the query ray hits, where the ``distance'' along the ray will be at least one.

Specified by:
getIntersection in class Surface