@Override protected void computeRotationTranslation(AffineTransform transform3d) { transform3d.setIdentity(); }
@Override protected void computeRotationTranslation(AffineTransform transform3d) { transform3d.setIdentity(); }
@Override protected void computeRotationTranslation(AffineTransform transform3d) { // Dealing with the transform here. transform3d.setIdentity(); }
public void translateTo(Vector3D translation) { transform.setIdentity(); transform.setTranslation(translation); }
@Override protected void computeRotationTranslation(AffineTransform transform) { if (getCurrentGraphicType() == TrajectoryGraphicType.HIDE) return; if (poseToWorldFrame != null) { poseToWorldFrame.get(rigidBodyTransform); transform.set(rigidBodyTransform); } else { transform.setIdentity(); } update(); }
@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 final AffineTransform getTransform() { if (showGraphicObject && !containsNaN()) { computeRotationTranslation(objectTransform); if (USE_JESPERS_BUGGY_HACK_TO_TRY_TO_PUT_YOGRAPHICS_WITH_RESPECT_TO_ROBOT) { // This is a buggy attempt to make the graphic objects go where the robot is, rather than the estimated robot. // It works when simulating, but not when rewinding. transform.set(objectTransform); transform.preMultiply(rootTransform); } else { transform.set(objectTransform); } } else { transform.setIdentity(); transform.setScale(0.0); } return transform; }
@Override protected void computeRotationTranslation(AffineTransform transform3D) { transform3D.setIdentity(); if (Double.isNaN(x.getDoubleValue()) || Double.isNaN(y.getDoubleValue()) || z != null && Double.isNaN(z.getDoubleValue())) { translationVector.set(-1000.0, -1000.0, -1000.0); transform3D.setTranslation(translationVector); } else { if (z != null) translationVector.set(x.getDoubleValue(), y.getDoubleValue(), z.getDoubleValue()); else translationVector.set(x.getDoubleValue(), y.getDoubleValue(), 0.0); double globalScale = 1.0; if (globalScaleProvider != null) { globalScale = globalScaleProvider.getValue(); } transform3D.setScale(scale * globalScale); transform3D.setTranslation(translationVector); } }
@Test public void testSetIdentity() throws Exception { Random random = new Random(2342L); AffineTransform transform = EuclidCoreRandomTools.nextAffineTransform(random); for (int row = 0; row < 3; row++) { for (int column = 0; column < 4; column++) { if (row == column) assertFalse(transform.getElement(row, column) == 1.0); else assertFalse(transform.getElement(row, column) == 0.0); } } transform.setIdentity(); for (int row = 0; row < 4; row++) { for (int column = 0; column < 4; column++) { if (row == column) assertTrue(transform.getElement(row, column) == 1.0); else assertTrue(transform.getElement(row, column) == 0.0); } } }
@Override protected void computeRotationTranslation(AffineTransform transform3D) { transform3D.setIdentity(); transform3D.setScale(scale * radii.getX(), scale * radii.getY(), scale * radii.getZ()); transform3D.setRotationYawPitchRoll(yawPitchRoll.getYaw().getValue(), yawPitchRoll.getPitch().getValue(), yawPitchRoll.getRoll().getValue()); transform3D.setTranslation(position); }
@Test public void testContainsNaN() throws Exception { AffineTransform transform = new AffineTransform(); assertFalse(transform.containsNaN()); transform.setRotationToNaN(); assertTrue(transform.containsNaN()); transform.setIdentity(); assertFalse(transform.containsNaN()); transform.setTranslationToNaN(); assertTrue(transform.containsNaN()); }
@Override protected void computeRotationTranslation(AffineTransform transform3D) { transform3D.setIdentity(); double globalScale = 1.0; if (globalScaleProvider != null) { globalScale = globalScaleProvider.getValue(); } transform3D.setScale(scale * globalScale); if (isUsingYawPitchRoll()) transform3D.setRotationYawPitchRoll(yawPitchRoll.getYaw().getValue(), yawPitchRoll.getPitch().getValue(), yawPitchRoll.getRoll().getValue()); else transform3D.setRotation(quaternion); transform3D.setTranslation(position); }
@Override protected void computeRotationTranslation(AffineTransform transform3D) { transform3D.setIdentity(); z_rot.set(vector); double length = z_rot.length(); if (length < 1e-7) z_rot.set(0.0, 0.0, 1.0); else z_rot.normalize(); if (Math.abs(z_rot.getX()) <= 0.99) x_rot.set(1.0, 0.0, 0.0); else x_rot.set(0.0, 1.0, 0.0); y_rot.cross(z_rot, x_rot); y_rot.normalize(); x_rot.cross(y_rot, z_rot); x_rot.normalize(); rotMatrix.setColumns(x_rot, y_rot, z_rot); translationVector.set(base); transform3D.setScale(lineThickness, lineThickness, length); transform3D.setTranslation(translationVector); transform3D.setRotation(rotMatrix); }
@Override protected void computeRotationTranslation(AffineTransform transform3D) transform3D.setIdentity();
actual.setIdentity(); double m00 = expected.getM00(); double m01 = expected.getM01(); actual.setIdentity(); actual.set(expected); EuclidCoreTestTools.assertAffineTransformEquals(expected, actual, EPS); actual.setIdentity(); actual.set(rigidBodyTransform); actual.setIdentity(); DenseMatrix64F denseMatrix = new DenseMatrix64F(4, 4); for (int row = 0; row < 4; row++) actual.setIdentity(); int startRow = random.nextInt(10); int startColumn = random.nextInt(10); actual.setIdentity(); double[] transformArray = new double[16]; for (int row = 0; row < 4; row++)