package alive;

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

import javax.media.j3d.*;
import javax.vecmath.*;
import com.sun.j3d.utils.image.TextureLoader;
import com.sun.j3d.utils.geometry.*;

public class Actor_BillBoard extends Actor {
  Billboard billboard = null;
  String imagefile = null;
  int resolution = 26;

  public Actor_BillBoard(String im) {
    model = "ABB:" + im;
    imagefile = im;
    build();
  }

  public void createGeometry() {
    BoundingSphere bSphere = new BoundingSphere(new Point3d(),1000);
    TransformGroup tgbb = new TransformGroup();
    tgbb.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
    billboard = new Billboard(tgbb);
    billboard.setSchedulingBounds(bSphere);
    this.addChild(billboard);
    tg.addChild(tgbb);
  }
}
