The default RasterTextLabel disables depth buffering. You have to enable it
manually like this:
Appearance app = rasterTextLabel1.getAppearance();
RenderingAttributes ra = app.getRenderingAttributes();
ra.setDepthBufferEnable(true);
Max
-----Original Message-----
From: Zak Nixon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 27 February 2002 08:13
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Transformations and rotations.
Is there anyway to stop the labels from showing up if other objects are in
front of them?
Zak
-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Justin Couch
Sent: Sunday, February 24, 2002 1:52 PM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Transformations and rotations.
Zak Nixon wrote:
> I am placing labels in the scene, at a given fixed location. Now
when the
> viewer moves the scene(via orbit behavior) I want the labels to be rotated
> so that they are always facing the viewer. Does anyone know how to do
this?
There's a piece of code in the j3d.org codebase to do this. It is called
RasterTextLabel. It uses the j3d Raster class to present text strings
that are always rendered to the screen in a "parallel" mode (rasters are
like a straight BLT of pixels). The Raster sits in the ordinary scene
graph, so any transformations and rotations you apply keep it centered
in the correct place relative to your other objects.
http://code.j3d.org/javadoc/org/j3d/geom/RasterTextLabel.html
--
Justin Couch http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler http://www.yumetech.com/
Author, Java 3D FAQ Maintainer http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
- Greg Bear, Slant
-------------------------------------------------------------------
===========================================================================
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".
===========================================================================
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".
This e-mail and any attachment is for authorised use by the intended recipient(s)
only. It may contain proprietary material, confidential information and/or be subject
to legal privilege. It should not be copied, disclosed to, retained or used by, any
other party. If you are not an intended recipient then please promptly delete this
e-mail and any attachment and all copies and inform the sender. Thank you.
===========================================================================
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".