|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable
net.sf.j3d.threeD.raytracer.shaders.ShaderParameters
public class ShaderParameters
A ShaderParameters object stores parameters needed by most Shader implementations.
| Field Summary | |
|---|---|
RGB |
fogColor
|
double |
fogDensity
|
double |
fogRatio
|
| 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. |
|
| Method Summary | |
|---|---|
void |
addEnterance()
Adds one to the reflection count and the enterance count. |
void |
addExit()
Adds one to the reflection count and the exit count. |
void |
addReflection()
Adds one to the reflection count stored by this ShaderParameters object. |
Light[] |
getAllLights()
|
int |
getEnteranceCount()
|
int |
getExitCount()
|
Light |
getLight()
|
Vector |
getLightDirection()
|
Light[] |
getOtherLights()
|
Surface[] |
getOtherSurfaces()
|
Vector |
getPoint()
|
int |
getReflectionCount()
|
Surface |
getSurface()
|
Vector |
getViewerDirection()
|
void |
setLight(Light l)
Sets the Light to the specified Light object. |
void |
setLightDirection(Vector l)
Sets the direction toward the light to the specified Vector object. |
void |
setOtherLights(Light[] l)
Sets the other Lights to those stored in the specified array. |
void |
setOtherSurfaces(Surface[] s)
Sets the other Surfaces to those stored in the specified array. |
void |
setPoint(Vector p)
Sets the point to be shaded to the specified Vector object. |
void |
setSurface(Surface surface)
|
void |
setViewerDirection(Vector v)
Sets the direction toward the viewer to the specified Vector object. |
String |
toString()
|
| Methods inherited from class java.util.Hashtable |
|---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public RGB fogColor
public double fogRatio
public double fogDensity
| Constructor Detail |
|---|
public ShaderParameters(Vector point,
Vector viewerDirection,
Vector lightDirection,
Light light,
Light[] otherLights,
Surface surface,
Surface[] otherSurfaces)
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.
public ShaderParameters(Vector point,
Vector viewerDirection,
Vector lightDirection,
Light light,
Light[] otherLights,
Surface[] otherSurfaces)
| Method Detail |
|---|
public void setPoint(Vector p)
p - Vector object to use.public Vector getPoint()
public void setViewerDirection(Vector v)
v - Vector object to use.public Vector getViewerDirection()
public void setLightDirection(Vector l)
l - Vector object to use.public Vector getLightDirection()
public void setLight(Light l)
l - Light object to use.public Light getLight()
public void setOtherLights(Light[] l)
l - Array of Light objects to use.public Light[] getOtherLights()
public void setSurface(Surface surface)
surface - The new Surface object.public Surface getSurface()
public void setOtherSurfaces(Surface[] s)
s - Array of Surface objects to use.public Surface[] getOtherSurfaces()
public Light[] getAllLights()
public int getReflectionCount()
public int getEnteranceCount()
public int getExitCount()
public void addReflection()
public void addEnterance()
public void addExit()
public String toString()
toString in class Hashtable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||