package a3test.a3objects;

import jp.sourceforge.acerola3d.a3.*;
import java.awt.*;
import java.awt.event.*;

public class A3ImageTest {
    static Frame frame;
    public static void main(String args[]) throws Exception {
        frame = new Frame("A3Util");
        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent we) {
                frame.dispose();
                System.exit(0);
            }
        });
        A3Canvas canvas = A3Canvas.createA3Canvas(300,300);
        frame.add(canvas);
        frame.pack();
        frame.setVisible(true);

        A3Image a3 = new A3Image("x-res:///image.gif");
        canvas.add(a3);
        canvas.setCameraLocImmediately(0.0,0.0,5.0);
        double theta=0.0;
        while (true) {
            try{Thread.sleep(100);}catch(Exception e){;}
            a3.setLoc(Math.cos(theta),Math.sin(theta),0.0);
//            a3.setQuat(Math.sin(theta),0.0,0.0,Math.cos(theta));
            theta = theta + 0.1;
        }
    }
}
