Thanks Justin,
            After thinking about it and getting suggestions from you and
Shawn, I was able to get it to work.  I ended up using the SharedGroup.

                                                            Shaun Shepherd
                                                            Applied Research
Associates



----- Original Message -----
From: "Justin Couch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 29, 2000 7:21 PM
Subject: Re: [JAVA3D] Multiple flt objects in one scene


> Shaun Shepherd wrote:
> >
> > I am trying to get a flt file I have loaded to be in more than one
location
> > in my scene.  There needs to be many of them so I'm currently using a
loop.
>
> This sounds like a very inefficient way of doing things. If I  read what
> you are saying correctly, you are loading the same file many times, each
> time with a different transform group above it. Is that correct?
>
> If so, no wonder you are running out of memory. What you want to do is
> load it once, then place the entire scene graph into a shared group and
> then use transforms above the SharedGroup.
>
> Roughly here is what you would do in psuedo code:
>
> Loader ldr = new FLTLoader();
> Scene scn = ldr.load("myfile");
>
> SharedGroup sgrp = new SharedGroup();
> sgrp.addChild(scn.getSceneGroup());
>
> BranchGroup my_world = new BranchGroup();
>
> for(i = 0; i < num_places; i++)
> {
>   Transform3D t3d = new Transform3D(x, y, z);
>   Transform tx = new Transform(t3d);
>
>   Link lnk = new Link(sgrp);
>   tx.addChild(lnk);
>
>   my_world.addChild(tx);
> }
>
>
> This should save you an awful lot of memory and make the startup *much*
> quicker.
>
> --
> Justin Couch                                    Author, Java Hacker
> http://www.vlc.com.au/~justin/               Java 3D FAQ Maintainer
> http://www.j3d.org/              J3D.org The Java 3D Community Site
> -------------------------------------------------------------------
> "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".

Reply via email to