|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--yaarq.sys.yrqShader
The shader class encapsules light and shadow to be applied to a terrain. A texture provides the ligh or shadow to be applied, with all shaders added over each other defining the terrain lightmap. Shader textures are greyscale, and the shademap is applied using the ADDSIGNED texturing rule. This means that a shademap value of 128 denotes no shading, a value of 0 denotes absolute shade and a value of 255 denotes absolute brightness.
TODO: Nothing
| Constructor Summary | |
yrqShader(yrqEngine a_engine,
javax.media.j3d.Texture2D a_texture,
javax.vecmath.Point3d a_position,
float a_alpha)
... |
|
| Method Summary | |
float |
getAlpha()
This function retrieves the alpha value of the shader. |
boolean |
getDirty()
This function returns a boolean value denoting if the shader instance has been modified. |
javax.vecmath.Point3d |
getPosition()
This method retrieves the position of the shader. |
javax.media.j3d.Texture2D |
getTexture()
This function retrieves the texture of the shader. |
void |
setAlpha(float a_alpha)
This method sets the alpha value of the shader. |
void |
setDirty(boolean a_dirty)
This method sets the dirty state of the shader. |
void |
setPosition(javax.vecmath.Point3d a_position)
This method sets the position of the shader. |
void |
setTexture(javax.media.j3d.Texture2D a_texture)
This method sets a new texture to the shader. |
void |
update(java.awt.Graphics2D a_gfx,
int a_width,
int a_height)
This method is called by the terrain instance the shader has been attached to whenever necessary. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public yrqShader(yrqEngine a_engine,
javax.media.j3d.Texture2D a_texture,
javax.vecmath.Point3d a_position,
float a_alpha)
a_engine - The engine instancea_texture - The texture to use for the shadera_position - The initial position of the shadera_alpha - The initial alpha of the shader| Method Detail |
public float getAlpha()
public boolean getDirty()
public javax.vecmath.Point3d getPosition()
public javax.media.j3d.Texture2D getTexture()
public void setAlpha(float a_alpha)
a_alpha - The alpha value to set for the shaderpublic void setDirty(boolean a_dirty)
public void setPosition(javax.vecmath.Point3d a_position)
a_position - The position to which to translate the shaderpublic void setTexture(javax.media.j3d.Texture2D a_texture)
a_texture - The new texture to use for this shader
public void update(java.awt.Graphics2D a_gfx,
int a_width,
int a_height)
a_gfx - The graphics object to which to render the shadera_height - The pixel height of the shademap
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||