apps.lightrays.raytracer.scene.geometry
Class Plane

java.lang.Object
  extended by apps.lightrays.raytracer.scene.SceneObject
      extended by apps.lightrays.raytracer.scene.geometry.Plane
Direct Known Subclasses:
TexturedPlane

public class Plane
extends SceneObject

The Class Plane.


Constructor Summary
Plane()
          Instantiates a new plane.
Plane(Point center, Vector perpendicular, OpticalProperties prop)
          Instantiates a new plane.
 
Method Summary
 Shader createShader(Ray ray)
          Creates the shader.
 Vector getNormal(Point intersect)
          Gets the normal.
 Colour getPixel(Point p)
          Gets the pixel.
 RayHitInfo intersect(Ray ray)
          Intersect.
 void setCenter(Point center)
          Sets the center.
 void setPerpendicular(Vector perp)
          Sets the perpendicular.
 java.lang.String toString()
           
 
Methods inherited from class apps.lightrays.raytracer.scene.SceneObject
getOpticProperties, setOpticProperties, setScene
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Plane

public Plane()
Instantiates a new plane.


Plane

public Plane(Point center,
             Vector perpendicular,
             OpticalProperties prop)
Instantiates a new plane.

Parameters:
center - the center
perpendicular - the perpendicular
prop - the prop
Method Detail

createShader

public Shader createShader(Ray ray)
Description copied from class: SceneObject
Creates the shader.

Specified by:
createShader in class SceneObject
Parameters:
ray - the r
Returns:
the shader

getNormal

public Vector getNormal(Point intersect)
Description copied from class: SceneObject
Gets the normal.

Specified by:
getNormal in class SceneObject
Parameters:
intersect - the intersect
Returns:
the normal

getPixel

public Colour getPixel(Point p)
Gets the pixel.

Parameters:
p - the p
Returns:
the pixel

intersect

public RayHitInfo intersect(Ray ray)
Description copied from class: SceneObject
Intersect.

Specified by:
intersect in class SceneObject
Parameters:
ray - the r
Returns:
the ray hit info

setCenter

public void setCenter(Point center)
Sets the center.

Parameters:
center - the new center

setPerpendicular

public void setPerpendicular(Vector perp)
Sets the perpendicular.

Parameters:
perp - the new perpendicular

toString

public java.lang.String toString()
Specified by:
toString in class SceneObject