John,

it works now, thank you.

It was as easy as to insert  an additional BranchGroup in my hierarchy
between two TransformGroups, one staying unchanged, the others containing
the spheres, to be added and removed.

With 128 data point only I can't feel any performance drops. But I didn't do
any measurements.

But as you did mention earlier - this question comes often. Why do the
common code examples fall short to demonstrate this obviously important
feature?

I think there is something to explain to the interested public, as with your
help I found out, that there are (at least?) 5 different ways to add to a
life scene ...

1. doing it with BranchGroups

2. Detach and reattach the particular BranchGroups (which I didn't get to
work, not trying very hard)

3. Adding further Geometries to a Standard-Shape3d (see reply from Ricardo
Nakamura, works fine, runs fast with some restrictions to take in to
account) and

4. switching nodes on and off (not really dynamic but maybe sufficient in
some cases)

5. reusing static data points by changing their geometry (see reply from
Mark Hood, somehow similar to 4.)


Horst Walther


----- Original Message -----
From: "John Wright" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 7:28 PM
Subject: Re: [JAVA3D] adding objects to a life scene


> Horst,
>
> There are pros and cons of various ways to represent your data.
> Thousands of individual BranchGroups can become an issue.
>
> What you might consider is detaching your BranchGroup (so it's no longer
> live) adding making your changes and then reattaching it.  A lot depends
> on just what you are really trying to display and how you are going to
> interact with it.  There is a clear cut issue of optimizing large
> Shape3Ds (may never get culled by the view) vs having lots of smaller
> Shape3Ds (can create a lot of CPU and memory overhead).
>
> - John Wright
> Starfire Research
>
> "Horst Walther (SiG)" wrote:
> >
> > ... thank you John,
> >
> > sorry for the inconvenience for sending this question again and even
> > threefold. - This was my first posting ever.
> >
> > If only Branchgroups can be added / removed to / from a scengraph this
mean
> > I have to put each sphere into a single Branchgroup.
> >
> > I'm not sure if all these Branchgroups  can be children of a single
> > TransformGroup to share their operations when picked. ( I only know it
the
> > other way round.)
> >
> > If this is not possible, this is possibly not the solution in my case.
If it
> > were, are there any drawbacks to have so many Branchgroups in place?
> >
> > Horst
> >
> > ----- Original Message -----
> > From: "John Wright" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 09, 2003 3:15 PM
> > Subject: Re: [JAVA3D] adding objects to a life scene
> >
> > > Horst,
> > >
> > > This one comes up often.
> > >
> > > You do need to structure your scene such that you can add and remove
> > > branchgroups to handle what you want to do.  Branchgroups are the only
> > > thing you can add to a live scene.  If you know all your data upfront
> > > some people will use "switch nodes" to just switch on and off what is
> > > displayed, but I don't think this fits your situation.
> > >
> > > - John Wright
> > > Starfire Research
> > >
> > > "Horst Walther (SiG)" wrote:
> > > >
> > > > SiG Software Integration GmbHHi all,
> > > >
> > > > simple question: how can I add objects, e.g. simple spheres, to a
life
> > > > graph?
> > > >
> > > > Background is: I like to dynamically add 3d-datapoints read from a
> > external
> > > > data feeding device each minute to even the same transformation
group.
> > > > Depending on the users choice on the limit the oldest data points
should
> > > > disappear then, while he still is able to rotate, translate an zoom
it
> > > > manually.
> > > >
> > > > I have already learned from a posting of Nathalie (Nov 8, 2000),
that I
> > have
> > > > to set for "each Group node in which I want to add or modify
children I
> > must
> > > > set the capabilities ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE
and/or
> > > > ALLOW_CHILDREN_EXTEND.
> > > >
> > > > Adding a new node results in the error message "only a BranchGroup
node
> > may
> > > > be added".
> > > >
> > > > Does it mean, that I have to reconstruct my BranchGroup and compile
it
> > every
> > > > time (every minute in my case) for all that hundreds or (depending
on
> > the
> > > > users choice) thousands of data points?
> > > >
> > > > If so - is there now workaround? Are there no "not so obvious
features"
> > > > hidden somewhere in the deep j3d-structure, which could enable a
more
> > > > flexible near life behaviour?
> > > >
> > > > I would be thankful for any hints, comments and of course a MiRCE
> > (minimal
> > > > running code example).
> > > >
> > > > thanks
> > > >
> > > > Horst
> > > >
> > > > ------------------------------------------------
> > > >
> > > > Dr. Horst Walther
> > > > SiG Software Integration GmbH
> > > > Chilehaus A * Fischertwiete 2
> > > > D-20095 Hamburg
> > > > phone: +49 40 32005 439
> > > > Fax & Voice-Mail: +49 40 8708306 8
> > > > Mobil & Voice box: +49 171 2145502
> > > > e-Mail:  [EMAIL PROTECTED]
> > > > WWW: http://www.si-G.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".
> > >
> > >
> >
===========================================================================
> > > 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".
>
>
===========================================================================
> 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".

Reply via email to