java - Rotate around a specific point in Java3D -


I am importing 2 models in Java 3D, scaling them, and then one of them is RotationInterpolator

However, it rotates the object around the root, I rotate the object around my center, not the view. Just keep it, I want to spin it in place.

How do I rotate around a specific point?

  Rotate transform group TheBlades = new transform group (); Rotate theBlades.setCapability (TransformGroup.ALLOW_TRANSFORM_WRITE); Alpha rotation alpha = new alpha (-1,5000); Rotation Interpolator Rotator = New Rotation Interpolator (Rotation Elfa, Rotate TheBlades); Transform 3D ABC = New Transform 3D (); Abc.rotZ (Math.PI / 2); Rotator.setTransformAxis (ABC); Rotator Setsgilingbones (new bounding sphere); RotateTheBlades.addChild (rotator); RotateTheBlades.addChild (theBlades);  

This is my code to make my current rotation.

DR translates the object with origin, executes rotation, followed by the object Reverted with returned in. Which works.

My actual solution was to focus the original model in the .obj file only, I was loading in Java 3D, I completed my rotation, and then translated the object to their proper position. I am


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -