Hi Chris
If using 2D text maybe you should consider a billboard to make it face the user point of view. If using 3D text, maybe you should play with something like the little class bellow, before developing further your code.
Hope it helps,
Antonio Jose Cacho
import java.awt.*;
import javax.vecmath.*;
import javax.media.j3d.*;
/**
* Generates a simple 3D text label to anotate a location or a feature of a scene
* @author Antonio Cacho,
cacho@...
*/
public class TextLabel {
private static final Font font= new Font("TextLabel", Font.PLAIN, 2);
private static final Font3D font3D = new Font3D(font, new FontExtrusion());
private static final BoundingSphere bounds= new BoundingSphere(new Point3d(0,0,0), Double.POSITIVE_INFINITY);
public TextLabel(String label, Point3f location, BranchGroup holdingBG) {
Shape3D labelShape= new Shape3D( new Text3D(font3D, label, location), new Appearance() );
labelShape.setBounds( bounds );
BranchGroup labelBranchGroup= new BranchGroup();
labelBranchGroup.addChild(labelShape);
labelBranchGroup.compile();
holdingBG.addChild( labelBranchGroup );
}
}
[Message sent by forum member 'aj_cacho' (
ajcacho@...)]
http://forums.java.net/jive/thread.jspa?messageID=370439---------------------------------------------------------------------
To unsubscribe, e-mail:
interest-unsubscribe@...
For additional commands, e-mail:
interest-help@...