have you tried
Shape3D.getGeometry().setDuplicateOnCloneTree(false)
before calling cloneTree() ?
I'm not sure if it works as expected but it could be worth a try ...
-- Peter
> -----Original Message-----
> From: Jason Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Donnerstag, 1. August 2002 17:41
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] AW: [JAVA3D] reusing geometry?
>
>
> Thanks that's what I had suspected, I knew there was a good reason why
> I'd used the Sphere primitive in the first place. Problem of leaving a
> project/api for a year then starting it again, I can't
> remember half the
> reasons why I did bits the way I did (apart from the rather occational
> documentation :)
>
> And to Bob, I have read the SharedGroup/Link stuff recently
> but I think
> from my understanding all the copies are the same where as I
> need to be
> able to pick individuals and have differant appearances randomised
> across them.
>
> I'm running about 60-70MB with 300 spheres (each is a LOD
> with Near: 10
> sides+Tex, Med: 8 sides+Tex and Far: PointArray size 3 AntiA) and ~200
> ships, mostly cones with simular LOD but more are now simple
> VRML models
> at the Near range. Each has a RasterLabel in a switch (soon to have 2
> labels, one with multiline detailed info).
>
> Get 2-20 fps on NT with ATIRage128Pro 32MB and 12-40 fps on W2K with
> GeForce3 64MB.
>
> Cheers,
> Jason.
>
> >>> [EMAIL PROTECTED] 01/08/2002 16:18:40 >>>
> Hi Jason,
>
> All "primitives" defined in com.sun.j3d.util.geometry by default share
> the
> geometry! So your technique will not have any efect on the Sun's
> Sphere,
> Box, Cone, Cylinder, etc... If you want NOT to share the geometry,
> you'll
> have to use the GEOMETRY_NOT_SHARED flag in the constructor. Just read
> the
> javadoc for the abstract Primitive class.
>
> However, if you generate your geometry "by hand", then you should call
> setDuplicateOnCloneTree(true) on your NodeComponent objects (including
> but
> not limited to Geometry) before using cloneTree(). From specs: "Leaf
> Node
> cloneTree behavior is determined by the duplicateOnCloneTree
> flag found
> in
> every Leaf Node's component data class and by the forceDuplicate
> parameter"
>
> Cheers,
>
> Florin
>
>
> -----Urspr�ngliche Nachricht-----
> Von: Jason Taylor [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 29. Juli 2002 12:12
> An: [EMAIL PROTECTED]
> Betreff: [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".
>
> ==============================================================
> =============
> 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".