Hi
It is possible to keep a label constantly in front of an object. A very
simple way of doing it is to take the old position vector of the label and
the current vector from the view to the center of the object.
You can turn one vector into another by normalizing the current view vector
and multiplying it by the magnitude of the old position vector.
The result is the new position vector that you need to transform the label
by.
B.D.
>From: Gerd Mueller <[EMAIL PROTECTED]>
>Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: [JAVA3D] Text3D vs. Texture
>Date: Wed, 18 Jul 2001 09:48:35 +0200
>
> > > 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.
>
>Thanks, the Label3D seems to me the best solution.
>
>Just an idea: Is it possible to have an object always in front of
>another ? Just like the OrientedShape3D, but I guess there has to
>be a translation somewhere, not only a rotation. That would be
>ideal for the labels. My problem is as follows: I develop a
>molecule editor and the atoms may have labels. It would be cool
>if the labels would always be in front of the atoms no matter
>where I look from.
>
>Best Regards,
>Gerd
>
>--
>________________________________________________________________
>Gerd Mueller [EMAIL PROTECTED]
>SMB GmbH http://www.smb-tec.com
>
>===========================================================================
>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".
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
===========================================================================
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".