public void run() { rotation += 0.01; translation += 0.01; if (scalingDown) { scale = scale * 0.99; if (scale < 0.1) scalingDown = false; } else { scale = scale * 1.01; if (scale > 2.0) scalingDown = true; } AffineTransform transform = new AffineTransform(); transform.setRotationEuler(Math.PI/2.0, 0.0, rotation); transform.setTranslation(new Vector3D(translation, 0.0, 0.0)); transform.setScale(scale); node.setTransform(transform); } }
@Override protected void computeRotationTranslation(AffineTransform transform3D) { transform3D.setIdentity(); if (isUsingYawPitchRoll()) { yoFrameYawPitchRoll.getEulerAngles(rotationEulerVector); transform3D.setRotationEuler(rotationEulerVector); } else { transform3D.setRotation(yoFrameQuaternion); } transform3D.setTranslation(yoFramePoint); transform3D.setScale(scale); }
public void run() { AffineTransform transform = new AffineTransform(); transform.setRotationEuler(nextVector3d(parametersHolder.getRotationTrajectory())); transform.setTranslation(nextVector3d(parametersHolder.getTranslationTrajectory())); transform.setScale(parametersHolder.getScaleTrajectory().getNextValue()); node.setTransform(transform); } public static Vector3D nextVector3d(ImmutableTriple<SimpleBounceTrajectory, SimpleBounceTrajectory, SimpleBounceTrajectory> trajectoryVector)
transform.getRotationScale(expectedRotationScale); expectedRotationScale.setRotationEuler(eulerAngles); transform.setRotationEuler(eulerAngles); EuclidCoreTestTools.assertMatrix3DEquals(expectedRotationScale, actualRotationScale, EPS); EuclidCoreTestTools.assertTuple3DEquals(expectedTranslation, actualTranslation, EPS); transform.getRotationScale(expectedRotationScale); expectedRotationScale.setRotationEuler(rotX, rotY, rotZ); transform.setRotationEuler(rotX, rotY, rotZ); EuclidCoreTestTools.assertMatrix3DEquals(expectedRotationScale, actualRotationScale, EPS); EuclidCoreTestTools.assertTuple3DEquals(expectedTranslation, actualTranslation, EPS);