I'm having trouble getting my overlay to display anything at all. Could someone have a look and tell me if I'm doing anything stupid or not doing something obvious.
In my scenegraph, I create my overlay and attach it:
overlay = new MyOverlay(canvas3D, new Rectangle(128, 128)); overlay.setVisible(true); TransformGroup viewTG = simpleU.getViewingPlatform().getViewPlatformTransform(); viewTG.addChild(overlay.getRoot());
This is the MyOverlay class:
public class MyOverlay
extends org.j3d.geom.overlay.OverlayBase { private Ellipse2D.Double circle =
new Ellipse2D.Double(10, 10, 350, 350); private GradientPaint gradient =
new GradientPaint(0, 0, Color.red, 175, 175, Color.yellow,
true); protected Ellipse2D.Double getCircle() {
return (circle);
} public MyOverlay(Canvas3D canvas3D, Rectangle bounds) {
super(canvas3D, bounds);
} public void paint(Graphics2D g) {
super.paint(g);
g.setColor(new Color(1f, 1f, 1f));
g.drawString("Hello wolrd", 50, 50);
g.fill3DRect(0, 0, 200, 200, true);g.setPaint(gradient); g.fill(getCircle()); } }
Am I missing something? Any help or pointers would be very gratefully received,
Thanks in advance,
James.
-- James Goldwater IT Consultant Tel: 020 8949 7927 Mobile: 0789 9955265
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
