threeD.raytracer.engine
Class ShaderParameters
java.lang.Object
threeD.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)
|
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)
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()
Copyright 2003-05 Mike Murray