Have you tried a SharedGroup and Link.

I use this all the time.

Seems there is a bug of some kind with SharedGroup if you attach (a lot of)
BranchGroups below the SharedGroup, as I recall.  But I haven't had a
problem.

Bob Gray

-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Jason Taylor
Sent: Monday, July 29, 2002 6:12 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] reusing geometry?


Morning!

I'm feeling with drawl symptoms from j3d.org already. :)

Can someone confirm for me how you go about 'reusing geometry' in order to
reduce memory usage.

What I've tried is;

newNode = node.cloneTree();
newNode.setAppearance(app);
addchild(newNode);

I had 4 basic source nodes with 3 different appearances for each to build
300 objects in my scene.

When I tried the above instead of "newNode = new Sphere(...);" I didn't see
any difference in the run time memory usage.

Is it because I'm using the basic Sun Sphere() ?

I couldn't find *any* examples in my collection that used "cloneTree" but
that's the only function I've found that might help.

Cheers,
            Jason.

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