> From: Gerd Mueller <[EMAIL PROTECTED]>
> Wido Wirsam <[EMAIL PROTECTED]> wrote:
>
> > I think for labeling it's better to use the '2d-texture-text' version. But
> > you don't have to generate the text-image by yourself, Java3D does this
> > for you. Take a look at the text2D-class. The readability will be even
> > better because you can use antialiasing on the Text2D. But take care
> > about bug #4416995 when using antialiasing. I used this in my project:
> > http://www.mathematik.uni-marburg.de/~wirsam/xxl/
>
> Thanks, the Text2D itself works. But I need the text in a OrientedShape
> and Text2D is itself a Shape3D. I've tried to copy the Text2D into
> the OrientedShape but got a classcastexc.

Try the attached class.  It is a modified version of Text2D, so that the text is
in an OrientedShape3D instead of a Shape3D.

> Also some of the Text2D
> objects show only a white rectangle (even in the Text2DTest example,
> where the 'Green Italic Text' is a white rectangle).

This happens when the size of the texture for the Text2D is larger than the
maximum texture size for the graphics card.  There is no easy fix.  One way
would be use a smaller font, which would result in a smaller texture.   The real
fix is to re-implement Text2D using a font object that has textures for each
character, but that is alot of work.

>Any more ideas ?

You may want to look at the Label3D code I posted yesterday.

Doug Gehringer
Sun Microsystems

OrientedText2D.java

Reply via email to