Dan/Steve,
As far as I know there is no way of changing the geometry within a Text3D
after it has been created. The setString method will merely *append*
geometry to the internal GeometryArray, regardless of what is passed in.
SUN were supposed to revise some of the Text3D methods for 1.2 however, so I
might be out of date.
This will leave you with:
- creating and destroying Text3D objects dynamically. This could be very
slow, as Text3D objects can become very complex, and it is hard to
impossible to control the vertex count. You will probably also need
behavior(s) to align/scale the Text3D relative to the viewer. You may leak
Text3D memory.
- don't use Text3D, use Text2D or a Raster. This will allow you to update
the labels but (may) leak texture memory instead. You won't have to align or
scale the labels.
- write your own Text3D class that allows on the fly updating of geometry.
Quite a big project in itself, but would be a very useful utility. There is
probably quite a bit of OpenGL code that you can adapt for this.
Best of luck,
Daniel Selman
[EMAIL PROTECTED]
http://www.tornadolabs.com
-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Dan Todor
Sent: 10 December 1999 02:40
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] A good example of dynamic scene changes
>From what I have tried, you can put any text, then change it in a behavior,
but
only the EXACT number of characters that you send for the first time to the
Text3D object. If you send one character in plus or minus, everything
becomes a
mess. Haven't yet tried out padding with spaces... Anybody has some
experience in
this field ?
Steve Sampson wrote:
> Andy,
> Great Demo. Wow!
> What I have is an array of strings that I want to display as 3D objects.
> And as the program runs, the text changes. I can display the text ok,
> just not change it.
> Any help, code or hints would be greatly appreciated.
> thanks
> Steve
>
> At 08:56 AM 12/9/99 -0600, you wrote:
> >I wrote a J3D application about 8 months ago which allowed the user to
> >visualize a ship's motions in regular waves. (The results were
> >pre-calculated by a commercial hydrodynamics package). Tha java
application
> >had to dynamically change the wave profile, and the position of the boat
as
> >a function of time. As the scene was changing the user could transform
the
> >scene with the mouse. (The scene's 'dynamic' change was made in another
> >thread). You can download the application from:
> >http://www.wsatkins.co.uk/asas-aqwa/download.htm - Choose AQWA Sequence
> >Player 4th from the bottom of the list).
> >(Just put garbage in the form fields when asked)
> >
> >If this is the sort of example you are looking for let me know and I will
> >send you some code.
> >
> >Regards,
> >
> >Andy Phelps
> >
> >>Hello,
> >>Does anybody have a good example of dynamically changing what is drawn.
> >>Or as least tell me where to look? I have a list of thing I want to
draw,
> >and as the program runs the list changes and the scene should change as a
> >result. I understand how to move and rotate objects, but I wish to be
able
> >to dynamically change objects.
> >>thanks for any help.
> >>Steve
> >>
> >
>
>
===========================================================================
> 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".
--
Best regards,
Dan Todor
---
You can have it done FAST | \
You can have it done RIGHT | | --- Pick any two.
You can have it done CHEAP | /
===========================================================================
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".