Daniel,
Thanks again for your observations. As a matter of fact, the actual version
works exactly the way you said it, with the postId method, I have 20 displays
with a Billboard attached , and the code with 3 digits was something imposed by
the end user , I have only values within -99.99 ... 99.99 range, but a
supplemental check never hurts ...*S*...
Thanks again,
Daniel Selman wrote:
> Dan,
>
> Looks good. Couple of comments:
>
> If you take out this check, you will see the problem with Text3D. Input a 3
> digit number and strange things happen...
> if (ff.floatValue()>-99.99f && ff.floatValue()<99.99f){
>
> You check the string for changes every 1000 ms. It might be better to use
> the Behavior.postId method or update the string directly in the UI, that way
> the behavior scheduler won't have to do anything with your behavior. [If you
> have only one string though, this is probably just syntactic sugar].
>
> The usual problems with Billboards apply, they burn objects at a hell of a
> rate, don't work with multiple views, and quickly become impractical. You
> can't practically have a scenegraph with 100 Billboards in it, performance
> dies.
>
> BUT, don't get me wrong, what you've done works, and for your application
> perhaps it will see you through. For one of your first Java 3D programs it
> is very good - it certainly took me a while to get my head around Behaviors!
>
> Sincerely,
>
> 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: 11 December 1999 03:02
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] A good example of dynamic scene changes
>
> Daniel,
>
> Thanks for the advices.
>
> Take a look please at the attached code. It's one of my first tries when
> I've
> got Java 3D. Please excuse the parseTemp function, at the time I wasn't too
> close to Java, I was just experimenting and haven't read the format classes
> , so
> I wrote my own formatter. I needed something like a temperature displayer
> class
> wich I could send a value and a position in the 3D universe. It works...
> Right
> now I have attached to it a Billboard behavior so it will face allways the
> user,
> no matter his position.
>
> Daniel Selman wrote:
>
> > 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".
>
> --
> 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".
--
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".