500

Working with fog
LinearFog example code

  • Create fog
    LinearFog myFog = new LinearFog( );
    myFog.setColor( new Color3f( 1.0f, 1.0f, 1.0f ) );
    myFog.setFrontDistance( 1.0 );
    myFog.setBackDistance( 30.0 );

  • Set the influencing bounds
    BoundingSphere myBounds = new BoundingSphere(
        new Point3d( ), 1000.0 );
    myFog.setInfluencingBounds( myBounds );