Transform implements Cloneable, Savable, Externalizable, ReadOnlyTransform, Poolable { public Transform setScale(final ReadOnlyVector3 scale) { MathUtils.checkArgumentNotNull(scale, "scale"); if (!_rotationMatrix) { throw new TransformException( "Scale is already provided by 3x3 matrix. If this is a mistake, consider using setRotation instead of setMatrix."); } if (scale.getX() == 0.0 && scale.getY() == 0.0 && scale.getZ() == 0.0) { throw new IllegalArgumentException("scale may not be ZERO."); } _scale.set(scale); _identity = _identity && scale.getX() == 1.0 && scale.getY() == 1.0 && scale.getZ() == 1.0; _uniformScale = scale.getX() == scale.getY() && scale.getY() == scale.getZ(); return this; } Transform();  Transform(final ReadOnlyTransform source); protected  Transform(final ReadOnlyMatrix3 matrix, final ReadOnlyVector3 scale, final ReadOnlyVector3 translation,
    final boolean identity, final boolean rotationMatrix, final boolean uniformScale); @Override ReadOnlyMatrix3 getMatrix(); @Override ReadOnlyVector3 getTranslation(); @Override ReadOnlyVector3 getScale(); @Override boolean isIdentity(); @Override boolean isRotationMatrix(); @Override boolean isUniformScale(); Transform setIdentity(); Transform setRotation(final ReadOnlyMatrix3 rotation); Transform setRotation(final ReadOnlyQuaternion rotation); Transform setTranslation(final ReadOnlyVector3 translation); Transform setTranslation(final double x, final double y, final double z); Transform setScale(final ReadOnlyVector3 scale); Transform setScale(final double x, final double y, final double z); Transform setScale(final double uniformScale); Transform set(final ReadOnlyTransform source); Transform translate(final double x, final double y, final double z); Transform translate(final ReadOnlyVector3 vec); @Override Vector3 applyForward(final Vector3 point); @Override Vector3 applyForward(final ReadOnlyVector3 point, final Vector3 store); @Override Vector3 applyInverse(final Vector3 point); @Override Vector3 applyInverse(final ReadOnlyVector3 point, final Vector3 store); @Override Vector3 applyForwardVector(final Vector3 vector); @Override Vector3 applyForwardVector(final ReadOnlyVector3 vector, final Vector3 store); @Override Vector3 applyInverseVector(final Vector3 vector); @Override Vector3 applyInverseVector(final ReadOnlyVector3 vector, final Vector3 store); @Override Transform multiply(final ReadOnlyTransform transformBy, final Transform store); @Override Transform invert(final Transform store); @Override Matrix4 getHomogeneousMatrix(final Matrix4 store); @Override void getGLApplyMatrix(final DoubleBuffer store); @Override void getGLApplyMatrix(final FloatBuffer store); Transform fromHomogeneousMatrix(final ReadOnlyMatrix4 matrix); static boolean isValid(final ReadOnlyTransform transform); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object o); @Override boolean strictEquals(final Object o); @Override Transform clone(); @Override Class<? extends Transform> getClassTag(); @Override void write(final OutputCapsule capsule); @Override void read(final InputCapsule capsule); @Override void readExternal(final ObjectInput in); @Override void writeExternal(final ObjectOutput out); final static Transform fetchTempInstance(); final static void releaseTempInstance(final Transform trans); static final double ALLOWED_DEVIANCE; static final ReadOnlyTransform IDENTITY; }
@Test(expected = TransformException.class) public void testFailScale1A() { final Transform trans = new Transform(new Matrix3(), new Vector3(), new Vector3(), false, false, false); trans.setScale(Vector3.ONE); }
@Test(expected = IllegalArgumentException.class) public void testFailScale1B() { final Transform trans = new Transform(); trans.setScale(Vector3.ZERO); }
@Test(expected = TransformException.class) public void testFailScale2A() { final Transform trans = new Transform(new Matrix3(), new Vector3(), new Vector3(), false, false, false); trans.setScale(1, 1, 1); }
@Test(expected = IllegalArgumentException.class) public void testFailScale2B() { final Transform trans = new Transform(); trans.setScale(0, 0, 0); }
@Test(expected = TransformException.class) public void testFailScale3A() { final Transform trans = new Transform(new Matrix3(), new Vector3(), new Vector3(), false, false, false); trans.setScale(1); }
@Test(expected = IllegalArgumentException.class) public void testFailScale3B() { final Transform trans = new Transform(); trans.setScale(0); }