threeD.raytracer.shaders
Class ShaderParameters
java.lang.Object
threeD.raytracer.shaders.ShaderParameters
- public class ShaderParameters
- extends java.lang.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)
Constructs a new ShaderParameters object using the specified arguments. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ShaderParameters
public ShaderParameters(Vector point,
Vector viewerDirection,
Vector lightDirection,
Light light,
Light[] otherLights,
Surface surface,
Surface[] otherSurfaces)
- Constructs a new ShaderParameters object using the specified arguments.
- Parameters:
point - Vector object representing the point to be shaded.viewerDirection - Vector object representing the direction toward the viewer (should be unit length).lightDirection - Vector object representing the direction toward the light (should be unit length).light - Light object representing the light.otherLights - Array of Light objects representing other lights in the scene.surface - Surface object to be shaded.otherSurfaces - Array of other Surface objects in the scene.
ShaderParameters
public ShaderParameters(Vector point,
Vector viewerDirection,
Vector lightDirection,
Light light,
Light[] otherLights,
Surface[] otherSurfaces)
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 java.lang.String toString()
Copyright 2003-05 Mike Murray