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".
