org.xith3d.effects.atmosphere
Class GLSLAtmosphereFactory

java.lang.Object
  extended by org.xith3d.effects.atmosphere.AtmosphereFactory
      extended by org.xith3d.effects.atmosphere.GLSLAtmosphereFactory
All Implemented Interfaces:
Updatable

public class GLSLAtmosphereFactory
extends AtmosphereFactory

The AtmosphereFactory is a visual effect for spheres. It computes in real-time the atmosphere of a planet see from space.

All computations are done by the GPU using shaders.

This code is a Xith adaptation of Sean O'Neil code given here: http://sponeil.net/ (Code under BSD license)


Constructor Summary
GLSLAtmosphereFactory()
           
 
Method Summary
protected  void prepareAtmosphere(Sphere sphere, float atmosphereRadius, PointLight light)
          
 void setWavelength3(org.openmali.vecmath2.Tuple3f wavelength3)
          
 void transformVector(org.openmali.vecmath2.Quaternion4f q, org.openmali.vecmath2.Tuple3f v, org.openmali.vecmath2.Vector3f out)
           
 void update(long gameTime, long frameTime, UpdatingThread.TimingMode timingMode)
          Updates this Updatable object.
 
Methods inherited from class org.xith3d.effects.atmosphere.AtmosphereFactory
getLight, getLightPos, getSphere, getWavelength3, prepareAtmosphere, setLight, setSphere
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLSLAtmosphereFactory

public GLSLAtmosphereFactory()
Method Detail

setWavelength3

public void setWavelength3(org.openmali.vecmath2.Tuple3f wavelength3)

Overrides:
setWavelength3 in class AtmosphereFactory

transformVector

public final void transformVector(org.openmali.vecmath2.Quaternion4f q,
                                  org.openmali.vecmath2.Tuple3f v,
                                  org.openmali.vecmath2.Vector3f out)

prepareAtmosphere

protected void prepareAtmosphere(Sphere sphere,
                                 float atmosphereRadius,
                                 PointLight light)

Specified by:
prepareAtmosphere in class AtmosphereFactory

update

public void update(long gameTime,
                   long frameTime,
                   UpdatingThread.TimingMode timingMode)
Description copied from interface: Updatable
Updates this Updatable object.

Parameters:
gameTime - the gameTime in Milliseconds
frameTime - the frameTime in Milliseconds (needed time for the last frame)
timingMode - the TimingMode to use for frameTime.