I am working on a behavior whereby I need to know how much a particular Shape3D has been scaled (w.r.t. the scene graph root), and what I thought would be simple just isn't working as I expected. I'm hoping for some conceptual checking here....
I have an object that is 1x1x1 which sits under a few transform groups. When my Behavior initializes I get the initial scale like this: Transform3D trans = new Transform3D(); shape.getLocalToVworld(trans); Vector3d scale = new Vector3d(); trans.getScale(scale); System.out.println("scale: " + scale); wakeupOn(...); which prints out what I'd expect given the initial state of my tranform hierarchy. My Behavior.processStimulus() method does the same query operation, and gets called with each frame (currently at least so I can constantly monitor it). I have a "MouseZoom" behavior attached to my root transform, and the behavior I'd expect is that when I "zoom" the scene (which just scales my root transform), the scale vector printed out in my processStimulus() method changes. However, what is getting printed out is the same scale vector that I started off with (+/- 1e-16), even though the object visually scales as expected. Am I misunderstanding the behavior of getLocalToVworld() method? Shouldn't a scale applied near the root of the scene graph be evident in a query to the "LocaltoVworld" transform at a leaf? If a scale is uniform, do you have to call Transform3D.getScale() rather than Transform3D.getScale(Vector3d)? Thanks, Simeon /** * @author Simeon H.K. Fitch * @organization Mustard Seed Software * @web http://www.mustardseedsoftware.com * @email [EMAIL PROTECTED] * @voice 210.867.1616 * @fax 309.424.4982 */ =========================================================================== 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".