package a3test.basic;

import jp.sourceforge.acerola3d.a3.*;
import javax.vecmath.*;
import jp.sourceforge.acerola3d.A23;

public class CameraLookAtTest {
    public static void main(String args[]) throws Exception {
        A23.setDefaultUpperDirection(A3Object.UpperDirection.Y);
        //A23.setDefaultUpperDirection(A3Object.UpperDirection.Z);
        A3Window w = new A3Window(300,300);
        Action3D a3 = new Action3D("x-res:///axis.a3");
        w.add(a3);
        Vector3d v = new Vector3d();
        double t=0.0;
        while (true) {
            v.x=10.0*Math.sin(t);
            a3.setLoc(v);
            w.setCameraLookAtPointImmediately(v);
            Thread.sleep(100);
            t = t + 0.1;
        }
    }
}
