Rings
Version 0.2

threeD.raytracer.engine
Class ShaderParameters

java.lang.Object
  extended bythreeD.raytracer.engine.ShaderParameters

public class ShaderParameters
extends Object

A ShaderParameters object stores parameters needed by most Shader implementations.


Constructor Summary
ShaderParameters(Vector point, Vector viewerDirection, Vector lightDirection, Light light, Light[] otherLights, Surface[] otherSurfaces)
           
ShaderParameters(Vector point, Vector viewerDirection, Vector lightDirection, Light light, Light[] otherLights, Surface surface, Surface[] otherSurfaces)
           
 
Method Summary
 Light getLight()
           
 Vector getLightDirection()
           
 Light[] getOtherLights()
           
 Surface[] getOtherSurfaces()
           
 Vector getPoint()
           
 Surface getSurface()
           
 Vector getViewerDirection()
           
 void setSurface(Surface surface)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShaderParameters

public ShaderParameters(Vector point,
                        Vector viewerDirection,
                        Vector lightDirection,
                        Light light,
                        Light[] otherLights,
                        Surface surface,
                        Surface[] otherSurfaces)

ShaderParameters

public ShaderParameters(Vector point,
                        Vector viewerDirection,
                        Vector lightDirection,
                        Light light,
                        Light[] otherLights,
                        Surface[] otherSurfaces)
Method Detail

getPoint

public Vector getPoint()
Returns:
A Vector object representing the point to be shaded.

getViewerDirection

public Vector getViewerDirection()
Returns:
A Vector object representing the direction toward the viewer (this can be expected to be unit length).

getLightDirection

public Vector getLightDirection()
Returns:
A Vector object representing the direction toward the light (this can be expected to be unit length).

getLight

public Light getLight()
Returns:
A Light object representing the light.

getOtherLights

public Light[] getOtherLights()
Returns:
An array of Light objects representing the other lights in the scene.

setSurface

public void setSurface(Surface surface)
Parameters:
surface - The new Surface object.

getSurface

public Surface getSurface()
Returns:
The Surface object to be shaded.

getOtherSurfaces

public Surface[] getOtherSurfaces()
Returns:
An array of other Surface objects in the scene.

toString

public String toString()

Rings
Version 0.2

Copyright 2003-05 Mike Murray