package a3test.a3objects;

import jp.sourceforge.acerola3d.a3.*;

public class A3FogTest {
    public static void main(String args[]) throws Exception {
        A3Window w = new A3Window(300,300);
        w.setNavigationMode(A3CanvasInterface.NaviMode.EXAMINE);
        A3Fog f = new A3Fog(A3FogType.EXPONENTIAL);
        //A3Fog f = new A3Fog(A3FogType.LINEAR);
        w.add(f);
        Action3D a3_1 = new Action3D("x-res:///axis.a3");
        Action3D a3_2 = new Action3D("x-res:///axis.a3");
        a3_2.setLoc(-1.0,0.0,-5.0);
        w.add(a3_1);
        w.add(a3_2);
        
        double t=0.0;
        while (true) {
            f.setColor((float)Math.sin(t),(float)Math.sin(t+2),(float)Math.sin(t+4));
            f.setDensity((float)Math.sin(t/100.0));
            //f.setFrontDistance(0.0);
            //f.setBackDistance(100.0*Math.sin(t/100.0));
            try{Thread.sleep(100);}catch(Exception e){;}
            t = t + 0.1;
        }
    }
}
