505

Working with fog
Influencing bounds example code

  • Set bounds relative to the fog's coordinate system
    LinearFog myFog = new LinearFog( );
    myFog.setInfluencingBounds( myBounds );

  • Or relative to a bounding leaf's coordinate system
    TransformGroup myGroup = new TransformGroup( );
    BoundingLeaf myLeaf = new BoundingLeaf( myBounds );
    myGroup.addChild( myLeaf );
    . . .
    LinearFog myFog = new LinearFog( );
    myFog.setInfluencingBoundingLeaf( myLeaf );