How do you set the scale of a TransformGroup to just scale in the z-direction? I thought scale set the scale in all directions. I don't see a scaleZ() kind of transform.
Cheers, Bob Gray -----Original Message----- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]]On Behalf Of Andreas Jerke Sent: Sunday, May 19, 2002 8:24 AM To: [EMAIL PROTECTED] Subject: Re: [JAVA3D] Memory Leak in Cylinder Geometry Update Hi Mehrtash, perhaps I missunderstand you, but isn't it easier to put a TG above your Shape3D object and modify the scaling (X,Y or Z, depending on your cylinder)? If you create a Cylinder with length = 1 you could set the new length by modifing the scale (X,Y or Z) factor in your TG. regards, Andreas >-----Original Message----- >From: Discussion list for Java 3D API >[mailto:[EMAIL PROTECTED]] On Behalf Of Mehrtash Babadi >Sent: Sonntag, 19. Mai 2002 13:07 >To: [EMAIL PROTECTED] >Subject: [JAVA3D] Memory Leak in Cylinder Geometry Update > > > Dear members, > > I am having a problem in my java3d code. > suppose I want to place a Cylinder in my > virtual universe and I want to change its > length. to do so, I construct a new Cylinder > with the new properties. then I get its geometry > and set the old cylinder's geometry to the new one. > > a pseudocode is something like this: > > Cylinder newCylinder = > new Cylinder(blah, blah, blah...); > > newCylinder.getShape(Cylinder.BODY).setCapability > (Shape3D.ALLOW_GEOMETRY_READ); > newCylinder.getShape(Cylinder.BODY).setCapability > (Shape3D.ALLOW_GEOMETRY_WRITE); > > (and the same lines for Cylinder.TOP and > Cylinder.BOTTOM) > > oldCylinder.getShape(Cylinder.BODY). > getGeometry(geom); > oldGeom = null; > newCylinder.getShape(Cylinder.BODY). > getGeometry(geom); > oldCylinder.getShape(Cylinder.BODY). > setGeometry(geom); > > newCylinder = null; > geom = null; > > (and again, the same lines for Cylinder.TOP and > Cylinder.BOTTOM) > > clear and simple. but, unfortunately, i face an > unpleasing memory leak. I have no time at this > moment for further investigations with JProbe or > JOptimizeIt and I'm composing this letter > in a big hurry! Any comment or help is > much appreciated! I'll be glad to hear better > and faster ways or a way to prevent memory > leaks! > > Sincerely, > Mehrtash =========================================================================== 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".
