Has anyone had any experience with Billboards? I've looked at the
sample file 'Billboard', and tried to copy it, but to no success.. I'm
actually trying to do the stereotypical example- put up a rectangle with
a tree texture on it. I want it to rotate around the Z Axis.
The tree shows up fine in the right spot. - it just doesn't rotate at
all. I've attached the code snippet I'm using- it's not pretty, but
I've been taking it apart, trying new things and basically hacking it to
pieces trying to get it to work. Am I missing something fundamental?
Thanks,
Duncan.
Tree tr=new Tree(c,250); //A Tree Class which returns the Shape3D in
its getTree Method.
TransformGroup tg=new TransformGroup();
Transform3D t2=new Transform3D();
Point3d pp=new Point3d(583655.0, 5813796.0, 180.0);
t2.set(1,new Vector3d(pp));
tg.setTransform(t2);
BoundingSphere bounds =
new BoundingSphere(new Point3d(0.0,0.0,0.0), Double.MAX_VALUE);
TransformGroup tg3=new TransformGroup();
Vector3f vv=new Vector3f(0,0,1f);
Billboard bb=new Billboard(tg3,Billboard.ROTATE_ABOUT_AXIS,vv);
bb.setSchedulingBounds(bounds);
tg3.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
tg3.addChild(tr.GetTree()); //Add Shape3D
tg.addChild(tg3);
BranchGroup scene2 = new BranchGroup();
scene2.addChild(tg);
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/