我正在尝试用 Java 3D 创建一个旋转的飞机螺旋桨。此刻,它围绕着原点旋转。但是,我需要它围绕自身旋转。我没有用 Java 做过很多 3D 图形,所以我很难过。
TransformGroup rotateTheBlades = new TransformGroup();
rotateTheBlades.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
Alpha rotationAlpha = new Alpha(-1,5000);
RotationInterpolator rotator = new RotationInterpolator(
rotationAlpha,rotateTheBlades);
Transform3D abc = new Transform3D();
abc.rotZ(Math.PI/2);
rotator.setTransformAxis(abc);
rotator.setSchedulingBounds(new BoundingSphere());
rotateTheBlades.addChild(rotator);
rotateTheBlades.addChild(propeller);
sceneBG.addChild(rotateTheBlades);
任何帮助将不胜感激。PS:我试图将它翻译成之前和之后的原点,但它似乎没有做任何事情。