@Override public void setAngularVelocityToNaN() { angularVelocity.setToNaN(); }
/** {@inheritDoc} */ @Override public void setToNaN() { super.setToNaN(); radii.setToNaN(); }
/** * Sets the point and normal of this plane to {@link Double#NaN}. After calling this method, this * plane becomes invalid. A new valid point and valid normal will have to be set so this plane is * again usable. */ @Override public void setToNaN() { point.setToNaN(); normal.setToNaN(); }
public NumericalMovingReferenceFrame(String nameSuffix, ReferenceFrame originalFrame, double updateDT) { super(originalFrame.getName() + nameSuffix, originalFrame.getRootFrame()); this.originalFrame = originalFrame; this.updateDT = updateDT; previousRotation.setToNaN(); previousTranslation.setToNaN(); }
@Test public void testGetRotationVector() { Random random = new Random(2343456L); T axisAngle; Vector3D actualVector = new Vector3D(); Vector3D expectedVector = new Vector3D(); for (int i = 0; i < ITERATIONS; i++) { axisAngle = createRandomAxisAngle(random); actualVector.setToNaN(); axisAngle.getRotationVector(actualVector); RotationVectorConversion.convertAxisAngleToRotationVector(axisAngle, expectedVector); EuclidCoreTestTools.assertRotationVectorGeometricallyEquals(actualVector, expectedVector, getEpsilon()); } }
@Test public void testTransformTuple() throws Exception { Random random = new Random(435L); Vector3D actual = new Vector3D(); Vector3D expected = new Vector3D(); for (int i = 0; i < NUMBER_OF_ITERATIONS; i++) { RotationScaleMatrix matrix = EuclidCoreRandomTools.nextRotationScaleMatrix(random, 10.0); Vector3D original = EuclidCoreRandomTools.nextVector3D(random); matrix.transform(original, expected); actual.set(original); matrix.transform(actual); EuclidCoreTestTools.assertTuple3DEquals(expected, actual, EPS); actual.setToNaN(); matrix.transform(original, actual); EuclidCoreTestTools.assertTuple3DEquals(expected, actual, EPS); } }
@Test public void testInverseTransformTuple() throws Exception { Random random = new Random(435L); Vector3D actual = new Vector3D(); Vector3D expected = new Vector3D(); for (int i = 0; i < NUMBER_OF_ITERATIONS; i++) { RotationScaleMatrix matrix = EuclidCoreRandomTools.nextRotationScaleMatrix(random, 10.0); Vector3D original = EuclidCoreRandomTools.nextVector3D(random); matrix.inverseTransform(original, expected); actual.set(original); matrix.inverseTransform(actual); EuclidCoreTestTools.assertTuple3DEquals(expected, actual, EPS); actual.setToNaN(); matrix.inverseTransform(original, actual); EuclidCoreTestTools.assertTuple3DEquals(expected, actual, EPS); } }
@Test public void testTransformTuple() throws Exception { Random random = new Random(435L); Vector3D actual = new Vector3D(); Vector3D expected = new Vector3D(); for (int i = 0; i < ITERATIONS; i++) { RotationMatrix matrix = EuclidCoreRandomTools.nextRotationMatrix(random); Vector3D original = EuclidCoreRandomTools.nextVector3D(random); Matrix3DTools.transform(matrix, original, expected); actual.set(original); matrix.transform(actual); EuclidCoreTestTools.assertTuple3DEquals(expected, actual, EPS); actual.setToNaN(); matrix.transform(original, actual); EuclidCoreTestTools.assertTuple3DEquals(expected, actual, EPS); } }
surfaceNormal.setToNaN();