package alive;

/**
 * <ALIVE Project>
 * VRML Actor
 * Default Actor for simple experiments
 * attributes can be mapped into size, color and
 * transparency
 * LSI - POLI - USP
 */


import javax.media.j3d.BranchGroup;
import javax.media.j3d.Canvas3D;
import javax.media.j3d.Transform3D;
import javax.media.j3d.TransformGroup;
import javax.media.j3d.View;
import javax.vecmath.Matrix4d;

import com.sun.j3d.loaders.Loader;
import com.sun.j3d.loaders.Scene;
import com.sun.j3d.utils.applet.MainFrame;
import com.sun.j3d.utils.universe.SimpleUniverse;

public class Actor_VRML extends Actor{
  String file = null;
  java.net.URL  filename = null;
  public Actor_VRML(String fn) {
    file = fn;
    model = "VRML:" + file;
    build();
  }
  public void createGeometry() {
    if (filename == null) {
      try {
        filename = new java.net.URL(file);
      }
      catch (java.net.MalformedURLException ex) {
        System.err.println(ex.getMessage());
        ex.printStackTrace();
        System.exit(1);
      }
    }
  }
}