|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.effect.fog.Fog
public class Fog
This class can be used to represent fog
Constructor Summary | |
---|---|
Fog()
Creates a new Fog object with the following default properties: Fog mode: EXP Color: RGBA parameters all 1.0f (pure white fog) Density: 1.0f Start/End: 0.0f/1.0f |
|
Fog(float red,
float green,
float blue,
float alpha,
float start,
float end)
Creates a new Fog object with the specified parameters. |
Method Summary | |
---|---|
void |
draw(javax.media.opengl.GL gl)
Draws the fog in the scene |
float[] |
getColor()
Returns the RGBA color of the fog as an array of four values |
float |
getDensity()
Returns the fog's density |
float |
getEnd()
Returns the end position of the fog |
float |
getStart()
Returns the fog's start position |
boolean |
isInExp2Mode()
Returns whether exp2 fog mode is active |
boolean |
isInExpMode()
Returns whether exp fog mode is active |
boolean |
isInLinearMode()
Returns whether linear fog mode is active |
void |
setColor(float red,
float green,
float blue,
float alpha)
Sets the RGBA color of the fog to the specified values |
void |
setDensity(float density)
Sets the fog's density. |
void |
setEnabled(boolean enableFog)
Specifies whether the fog shall be enabled or disabled. |
void |
setEnd(float end)
Sets the end position of the fog |
void |
setStart(float start)
Sets the start position of the fog |
void |
setStartAndEnd(float start,
float end)
Sets the start and end position of the fog |
void |
setToExp2Mode()
Sets the fog mode to exp2 fog mode. |
void |
setToExpMode()
Sets the fog mode to exp fog mode. |
void |
setToLinearMode()
Sets the fog mode to linear fog mode. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Fog()
public Fog(float red, float green, float blue, float alpha, float start, float end)
red
- amount of redgreen
- amount of greenblue
- amount of bluealpha
- alpha valuestart
- start position of the fogend
- end position of the fogMethod Detail |
---|
public void setColor(float red, float green, float blue, float alpha)
red
- amount of redgreen
- amount of greenblue
- amount of bluealpha
- alpha valuepublic float[] getColor()
public void setEnabled(boolean enableFog)
enableFog
- enable fog? --> true = yes, false = nopublic void setStart(float start)
start
- fog's start positionpublic float getStart()
public void setEnd(float end)
end
- the fog's end positionpublic float getEnd()
public void setStartAndEnd(float start, float end)
start
- start positionend
- end positionpublic void setDensity(float density)
density
- density value for the fogpublic float getDensity()
public void setToLinearMode()
public boolean isInLinearMode()
public void setToExpMode()
public boolean isInExpMode()
public void setToExp2Mode()
public boolean isInExp2Mode()
public void draw(javax.media.opengl.GL gl)
gl
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |