429

Working with Fog
Influencing Bounds Example Code

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

  • Or relative to a bounding leaf's coordinate system
    TransformGroup group = new TransformGroup( );
    BoundingLeaf leaf = new BoundingLeaf( bounds );
    group.addChild( leaf );
    . . .
    LinearFog fog = new LinearFog( );
    fog.setInfluencingBoundingLeaf( leaf );