@Test public void testApplyVector3() { final Matrix3 mat3 = new Matrix3().applyRotationX(MathUtils.HALF_PI); final Vector3 vec3 = new Vector3(0, 1, 0); final Vector3 result = mat3.applyPost(vec3, null); assertTrue(Math.abs(new Vector3(0, 0, 1).distance(result)) <= MathUtils.EPSILON); vec3.set(0, 1, 1); mat3.applyPost(vec3, result); assertTrue(Math.abs(new Vector3(0, -1, 1).distance(result)) <= MathUtils.EPSILON); vec3.set(0, 1, 1); mat3.applyPre(vec3, result); assertTrue(Math.abs(new Vector3(0, 1, -1).distance(result)) <= MathUtils.EPSILON); vec3.set(1, 1, 1); assertTrue(Math.abs(new Vector3(1, 1, -1).distance(mat3.applyPre(vec3, null))) <= MathUtils.EPSILON); }
_matrix.applyPre(vector, vector); if (_uniformScale) { vector.divideLocal(_scale.getX());
_matrix.applyPre(vector, vector); if (_uniformScale) { vector.divideLocal(_scale.getX());
_matrix.applyPre(point, point); if (_uniformScale) { point.divideLocal(_scale.getX());
_matrix.applyPre(point, point); if (_uniformScale) { point.divideLocal(_scale.getX());