XJRT Rendering Toolkit 1.0b06

org.autochthonous.graphics.rt.objects
Class Fog

java.lang.Object
  extended byorg.autochthonous.graphics.rt.objects.Fog
All Implemented Interfaces:
Atmosphere

public class Fog
extends java.lang.Object
implements Atmosphere

A fog atmosphere. By default it affects all objects in the scene, unless the choice is constrained by the using the addAffected method.

Example:

      <Fog color="1.0, 1.0, 1.0" fogFactor="0.001" rFactor="0.03"/>
 

Document Type Definition:

     <!ENTITY %Float    "CDATA">
     <!ENTITY %Color3f  "CDATA">

     <!ELEMENT PointLight EMPTY>
     <!ATTLIST PointLight
         color        %Color3f;  "1, 1, 1"
         fogFactor %Point3f;  "0.001"
         rFactor     %Float      "0.03">
 


Constructor Summary
Fog(Color3f col, float fogFactor)
          Create a fog object with the standard rFactor of 0.03.
Fog(Color3f col, float fogFactor, float rFactor)
           
 
Method Summary
 void addAffected(Traceable obj)
          Add an affected region to the fog.
 AtmosphereData getAtmosphereData(Hit hit, Illuminated world)
          Calculate the atmosphere data according to Beer's law of fog and haze.
static Fog getInstance(RMLReader in)
           
 void transform(Transform trans)
          transform the location of the fog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Fog

public Fog(Color3f col,
           float fogFactor)
Create a fog object with the standard rFactor of 0.03.

Parameters:
col -
fogFactor -

Fog

public Fog(Color3f col,
           float fogFactor,
           float rFactor)
Method Detail

getInstance

public static Fog getInstance(RMLReader in)
                       throws java.io.IOException
Throws:
java.io.IOException

transform

public void transform(Transform trans)
transform the location of the fog.

Specified by:
transform in interface Atmosphere

addAffected

public void addAffected(Traceable obj)
Add an affected region to the fog. The fog will be limited in its affect to the space occupied by the objects passed in to the this method.

Specified by:
addAffected in interface Atmosphere

getAtmosphereData

public AtmosphereData getAtmosphereData(Hit hit,
                                        Illuminated world)
Calculate the atmosphere data according to Beer's law of fog and haze.

Specified by:
getAtmosphereData in interface Atmosphere
See Also:
Atmosphere.getAtmosphereData(org.autochthonous.graphics.rt.Hit, org.autochthonous.graphics.rt.Illuminated)

XJRT Rendering Toolkit 1.0b06