jjdh API

jjdh.opengl.core
Class Fog

java.lang.Object
  extended by jjdh.opengl.core.Fog

public class Fog
extends Object


Field Summary
private  float[] fogColor
           
private  float fogDensity
           
private  float fogEnd
           
private  int fogHint
           
private  int fogMode
           
private  float fogStart
           
private static boolean isEnabled
           
 
Constructor Summary
Fog()
           
 
Method Summary
 void apply(javax.media.opengl.GL gl)
           
 void clearToFogColor(javax.media.opengl.GL gl)
           
static void disable(javax.media.opengl.GL gl)
          Disables Fog.
static void enable(javax.media.opengl.GL gl)
          Enables Fog.
 float[] getFogColor()
           
 float getFogDensity()
           
 float getFogEnd()
           
 int getFogHint()
           
 int getFogMode()
           
 float getFogStart()
           
static boolean isEnabled()
           
 void setFogColor(float[] fogColor)
          Sets the Color of the Fog.
 void setFogColor(float r, float g, float b, float a)
          Sets the Color of the Fog.
 void setFogDensity(float fogDensity)
          Sets how Dense Will The Fog Be..glFogf(GL.GL_FOG_DENSITY, 0.5f);
 void setFogEnd(float fogEnd)
          Sets the Fog End Depth.
 void setFogHint(int fogHint)
          Gives OpenGL a hint how to render the fog.
 void setFogMode(int fogMode)
          Changes the Fog Mode.
 void setFogStart(float fogStart)
          Sets the Fog Start Depth.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isEnabled

private static boolean isEnabled

fogMode

private int fogMode

fogColor

private float[] fogColor

fogDensity

private float fogDensity

fogHint

private int fogHint

fogStart

private float fogStart

fogEnd

private float fogEnd
Constructor Detail

Fog

public Fog()
Method Detail

enable

public static void enable(javax.media.opengl.GL gl)
Enables Fog.


disable

public static void disable(javax.media.opengl.GL gl)
Disables Fog.


apply

public void apply(javax.media.opengl.GL gl)

setFogColor

public void setFogColor(float r,
                        float g,
                        float b,
                        float a)
Sets the Color of the Fog.


setFogColor

public void setFogColor(float[] fogColor)
Sets the Color of the Fog.


clearToFogColor

public void clearToFogColor(javax.media.opengl.GL gl)

getFogColor

public float[] getFogColor()

getFogDensity

public float getFogDensity()

setFogDensity

public void setFogDensity(float fogDensity)
Sets how Dense Will The Fog Be..glFogf(GL.GL_FOG_DENSITY, 0.5f);


getFogEnd

public float getFogEnd()

setFogEnd

public void setFogEnd(float fogEnd)
Sets the Fog End Depth.


getFogHint

public int getFogHint()

setFogHint

public void setFogHint(int fogHint)
Gives OpenGL a hint how to render the fog.

Parameters:
fogHint - GL_NICEST, GL_FASTEST or GL_DONT_CARE

getFogMode

public int getFogMode()

setFogMode

public void setFogMode(int fogMode)
Changes the Fog Mode.

Parameters:
fogMode - GL.GL_LINEAR, GL.GL_EXP or GL.GL_EXP2

getFogStart

public float getFogStart()

setFogStart

public void setFogStart(float fogStart)
Sets the Fog Start Depth.


isEnabled

public static boolean isEnabled()

jjdh API

Copyright © 2006 Jonas Jacobi and Dennis Heidsiek. All Rights Reserved.