|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.scene.state.RenderState
com.jme.scene.state.FogState
FogState maintains the fog qualities for a node and it's
children. The fogging function, color, start, end and density are all
set and maintained.
| Field Summary | |
static int |
AF_PER_PIXEL
Defines the rendering method for the fogging, where each pixel color is altered by the fogging function. |
static int |
AF_PER_VERTEX
Defines the rendering method for the fogging, where each vertex color is altered by the fogging function. |
protected int |
applyFunction
|
protected ColorRGBA |
color
|
protected float |
density
|
protected int |
densityFunction
|
static int |
DF_EXP
The fog blending function defined as: e^-(density*z) |
static int |
DF_EXPSQR
The fog blending function defined as: e^((-density*z)^2) |
static int |
DF_LINEAR
The fog blending function defined as: (end - z) / (end - start). |
protected float |
end
|
protected float |
start
|
| Fields inherited from class com.jme.scene.state.RenderState |
RS_ALPHA, RS_ATTRIBUTE, RS_CULL, RS_DITHER, RS_FOG, RS_FRAGMENT_PROGRAM, RS_GLSL_SHADER_OBJECTS, RS_LIGHT, RS_MATERIAL, RS_MAX_STATE, RS_SHADE, RS_STENCIL, RS_TEXTURE, RS_VERTEX_PROGRAM, RS_WIREFRAME, RS_ZBUFFER |
| Constructor Summary | |
FogState()
Constructor instantiates a new FogState with default
fog values. |
|
| Method Summary | |
int |
getType()
getType returns the render state type of the fog state. |
void |
setApplyFunction(int applyFunction)
setApplyFunction sets the apply function used for the fog
attributes. |
void |
setColor(ColorRGBA color)
setColor sets the color of the fog. |
void |
setDensity(float density)
setDensity sets the density of the fog. |
void |
setDensityFunction(int densityFunction)
setDensityFunction sets the density function used for the
fog blending. |
void |
setEnd(float end)
setEnd sets the end distance, or the distance where fog
is at it's thickest. |
void |
setStart(float start)
setStart sets the start distance, or where fog begins
to be applied. |
| Methods inherited from class com.jme.scene.state.RenderState |
apply, extract, isEnabled, setEnabled |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DF_LINEAR
public static final int DF_EXP
public static final int DF_EXPSQR
public static final int AF_PER_VERTEX
public static final int AF_PER_PIXEL
protected float start
protected float end
protected float density
protected ColorRGBA color
protected int densityFunction
protected int applyFunction
| Constructor Detail |
public FogState()
FogState with default
fog values.
| Method Detail |
public void setApplyFunction(int applyFunction)
setApplyFunction sets the apply function used for the fog
attributes. If an invalid value is passed in, the default function
is set to AF_PER_VERTEX.
applyFunction - the function used for the fog application.public void setDensityFunction(int densityFunction)
setDensityFunction sets the density function used for the
fog blending. If an invalid value is passed, the default function is
set to DF_LINEAR.
densityFunction - the function used for the fog density.public void setColor(ColorRGBA color)
setColor sets the color of the fog.
color - the color of the fog.public void setDensity(float density)
setDensity sets the density of the fog. This value is
clamped to [0, 1].
density - the density of the fog.public void setEnd(float end)
setEnd sets the end distance, or the distance where fog
is at it's thickest.
end - the distance where the fog is the thickest.public void setStart(float start)
setStart sets the start distance, or where fog begins
to be applied.
start - the start distance of the fog.public int getType()
getType returns the render state type of the fog state.
(RS_FOG).
getType in class RenderStateRenderState.getType()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||