/** * Returns the inverse transform Tx' of this transform Tx, which * maps coordinates transformed by Tx back * to their original coordinates. * In other words, Tx'(Tx(p)) = p = Tx(Tx'(p)). * <p> * If this transform maps all coordinates onto a point or a line * then it will not have an inverse, since coordinates that do * not lie on the destination point or line will not have an inverse * mapping. * The <code>getDeterminant</code> method can be used to determine if this * transform has no inverse, in which case an exception will be * thrown if the <code>invert</code> method is called. * @see #getDeterminant * @exception GeometryException if the matrix cannot be inverted. * @return a new Transform */ public final Transform getInverse() throws GeometryException { if (Math.abs(m_jso.getDeterminant()) <= Double.MIN_VALUE) { throw new GeometryException("Can't invert this matrix - determinant is near 0"); } return new Transform(m_jso.getInverse()); }
/** * Concatenates a <code>Transform</code> <code>Tx</code> to * this <code>Transform</code> Cx in the most commonly useful * way to provide a new user space * that is mapped to the former user space by <code>Tx</code>. * Cx is updated to perform the combined transformation. * Transforming a point p by the updated transform Cx' is * equivalent to first transforming p by <code>Tx</code> and then * transforming the result by the original transform Cx like this: * Cx'(p) = Cx(Tx(p)) * In matrix notation, if this transform Cx is * represented by the matrix [this] and <code>Tx</code> is represented * by the matrix [Tx] then this method does the following: * <pre> * [this] = [this] x [Tx] * </pre> * @param Tx the <code>Transform</code> object to be * concatenated with this <code>Transform</code> object. */ public final Transform concatenate(final Transform transform) { m_jso.multiply(transform.getJSO()); return this; }
/** * Returns the inverse transform Tx' of this transform Tx, which * maps coordinates transformed by Tx back * to their original coordinates. * In other words, Tx'(Tx(p)) = p = Tx(Tx'(p)). * <p> * If this transform maps all coordinates onto a point or a line * then it will not have an inverse, since coordinates that do * not lie on the destination point or line will not have an inverse * mapping. * The <code>getDeterminant</code> method can be used to determine if this * transform has no inverse, in which case an exception will be * thrown if the <code>invert</code> method is called. * @see #getDeterminant * @exception GeometryException if the matrix cannot be inverted. * @return a new Transform */ public final Transform getInverse() throws GeometryException { if (Math.abs(m_jso.getDeterminant()) <= Double.MIN_VALUE) { throw new GeometryException("Can't invert this matrix - determinant is near 0"); } return new Transform(m_jso.getInverse()); }
/** * Concatenates a <code>Transform</code> <code>Tx</code> to * this <code>Transform</code> Cx in the most commonly useful * way to provide a new user space * that is mapped to the former user space by <code>Tx</code>. * Cx is updated to perform the combined transformation. * Transforming a point p by the updated transform Cx' is * equivalent to first transforming p by <code>Tx</code> and then * transforming the result by the original transform Cx like this: * Cx'(p) = Cx(Tx(p)) * In matrix notation, if this transform Cx is * represented by the matrix [this] and <code>Tx</code> is represented * by the matrix [Tx] then this method does the following: * <pre> * [this] = [this] x [Tx] * </pre> * @param Tx the <code>Transform</code> object to be * concatenated with this <code>Transform</code> object. */ public final Transform concatenate(Transform transform) { m_jso.multiply(transform.getJSO()); return this; }
/** * Returns the inverse transform Tx' of this transform Tx, which * maps coordinates transformed by Tx back * to their original coordinates. * In other words, Tx'(Tx(p)) = p = Tx(Tx'(p)). * <p> * If this transform maps all coordinates onto a point or a line * then it will not have an inverse, since coordinates that do * not lie on the destination point or line will not have an inverse * mapping. * The <code>getDeterminant</code> method can be used to determine if this * transform has no inverse, in which case an exception will be * thrown if the <code>invert</code> method is called. * @see #getDeterminant * @exception GeometryException if the matrix cannot be inverted. * @return a new Transform */ public final Transform getInverse() throws GeometryException { if (Math.abs(m_jso.getDeterminant()) <= Double.MIN_VALUE) { throw new GeometryException("Can't invert this matrix - determinant is near 0"); } return new Transform(m_jso.getInverse()); }
/** * Concatenates a <code>Transform</code> <code>Tx</code> to * this <code>Transform</code> Cx in the most commonly useful * way to provide a new user space * that is mapped to the former user space by <code>Tx</code>. * Cx is updated to perform the combined transformation. * Transforming a point p by the updated transform Cx' is * equivalent to first transforming p by <code>Tx</code> and then * transforming the result by the original transform Cx like this: * Cx'(p) = Cx(Tx(p)) * In matrix notation, if this transform Cx is * represented by the matrix [this] and <code>Tx</code> is represented * by the matrix [Tx] then this method does the following: * <pre> * [this] = [this] x [Tx] * </pre> * @param Tx the <code>Transform</code> object to be * concatenated with this <code>Transform</code> object. */ public final Transform concatenate(final Transform transform) { m_jso.multiply(transform.getJSO()); return this; }
/** * Concatenates a <code>Transform</code> <code>Tx</code> to * this <code>Transform</code> Cx in the most commonly useful * way to provide a new user space * that is mapped to the former user space by <code>Tx</code>. * Cx is updated to perform the combined transformation. * Transforming a point p by the updated transform Cx' is * equivalent to first transforming p by <code>Tx</code> and then * transforming the result by the original transform Cx like this: * Cx'(p) = Cx(Tx(p)) * In matrix notation, if this transform Cx is * represented by the matrix [this] and <code>Tx</code> is represented * by the matrix [Tx] then this method does the following: * <pre> * [this] = [this] x [Tx] * </pre> * @param Tx the <code>Transform</code> object to be * concatenated with this <code>Transform</code> object. */ public final Transform concatenate(final Transform transform) { m_jso.multiply(transform.getJSO()); return this; }
/** * Returns the inverse transform Tx' of this transform Tx, which * maps coordinates transformed by Tx back * to their original coordinates. * In other words, Tx'(Tx(p)) = p = Tx(Tx'(p)). * <p> * If this transform maps all coordinates onto a point or a line * then it will not have an inverse, since coordinates that do * not lie on the destination point or line will not have an inverse * mapping. * The <code>getDeterminant</code> method can be used to determine if this * transform has no inverse, in which case an exception will be * thrown if the <code>invert</code> method is called. * @see #getDeterminant * @exception GeometryException if the matrix cannot be inverted. * @return a new Transform */ public final Transform getInverse() throws GeometryException { if (Math.abs(m_jso.getDeterminant()) <= Double.MIN_VALUE) { throw new GeometryException("Can't invert this matrix - determinant is near 0"); } return new Transform(m_jso.getInverse()); }
/** * Concatenates this transform with a rotation transformation. * This is equivalent to calling concatenate(R), where R is an * <code>Transform</code> represented by the following matrix: * <pre> * [ cos(theta) -sin(theta) 0 ] * [ sin(theta) cos(theta) 0 ] * [ 0 0 1 ] * </pre> * Rotating by a positive angle theta rotates points on the positive * X axis toward the positive Y axis. * * @param theta the angle of rotation measured in radians * * @return this Transform */ public final Transform rotate(final double theta) { m_jso.rotate(theta); return this; }
/** * Concatenates this transform with a rotation transformation. * This is equivalent to calling concatenate(R), where R is an * <code>Transform</code> represented by the following matrix: * <pre> * [ cos(theta) -sin(theta) 0 ] * [ sin(theta) cos(theta) 0 ] * [ 0 0 1 ] * </pre> * Rotating by a positive angle theta rotates points on the positive * X axis toward the positive Y axis. * * @param theta the angle of rotation measured in radians * * @return this Transform */ public final Transform rotate(final double theta) { m_jso.rotate(theta); return this; }
/** * Concatenates this transform with a rotation transformation. * This is equivalent to calling concatenate(R), where R is an * <code>Transform</code> represented by the following matrix: * <pre> * [ cos(theta) -sin(theta) 0 ] * [ sin(theta) cos(theta) 0 ] * [ 0 0 1 ] * </pre> * Rotating by a positive angle theta rotates points on the positive * X axis toward the positive Y axis. * * @param theta the angle of rotation measured in radians * * @return this Transform */ public final Transform rotate(final double theta) { m_jso.rotate(theta); return this; }
/** * Concatenates this transform with a rotation transformation. * This is equivalent to calling concatenate(R), where R is an * <code>Transform</code> represented by the following matrix: * <pre> * [ cos(theta) -sin(theta) 0 ] * [ sin(theta) cos(theta) 0 ] * [ 0 0 1 ] * </pre> * Rotating by a positive angle theta rotates points on the positive * X axis toward the positive Y axis. * * @param theta the angle of rotation measured in radians * * @return this Transform */ public final Transform rotate(double theta) { m_jso.rotate(theta); return this; }
/** * Constructs a new <code>Transform</code> from 6 floating point * values representing the 6 specifiable entries of the 3x3 * transformation matrix. * * @param m00 the X coordinate scaling element of the 3x3 matrix * @param m10 the Y coordinate shearing element of the 3x3 matrix * @param m01 the X coordinate shearing element of the 3x3 matrix * @param m11 the Y coordinate scaling element of the 3x3 matrix * @param m02 the X coordinate translation element of the 3x3 matrix * @param m12 the Y coordinate translation element of the 3x3 matrix */ public Transform(final double m00, final double m10, final double m01, final double m11, final double m02, final double m12) { m_jso = TransformJSO.make(m00, m10, m01, m11, m02, m12); }
/** * Constructs a new <code>Transform</code> from 6 floating point * values representing the 6 specifiable entries of the 3x3 * transformation matrix. * * @param m00 the X coordinate scaling element of the 3x3 matrix * @param m10 the Y coordinate shearing element of the 3x3 matrix * @param m01 the X coordinate shearing element of the 3x3 matrix * @param m11 the Y coordinate scaling element of the 3x3 matrix * @param m02 the X coordinate translation element of the 3x3 matrix * @param m12 the Y coordinate translation element of the 3x3 matrix */ public Transform(double m00, double m10, double m01, double m11, double m02, double m12) { m_jso = TransformJSO.make(m00, m10, m01, m11, m02, m12); }
/** * Constructs a new <code>Transform</code> from 6 floating point * values representing the 6 specifiable entries of the 3x3 * transformation matrix. * * @param m00 the X coordinate scaling element of the 3x3 matrix * @param m10 the Y coordinate shearing element of the 3x3 matrix * @param m01 the X coordinate shearing element of the 3x3 matrix * @param m11 the Y coordinate scaling element of the 3x3 matrix * @param m02 the X coordinate translation element of the 3x3 matrix * @param m12 the Y coordinate translation element of the 3x3 matrix */ public Transform(final double m00, final double m10, final double m01, final double m11, final double m02, final double m12) { m_jso = TransformJSO.make(m00, m10, m01, m11, m02, m12); }
/** * Constructs a new <code>Transform</code> from 6 floating point * values representing the 6 specifiable entries of the 3x3 * transformation matrix. * * @param m00 the X coordinate scaling element of the 3x3 matrix * @param m10 the Y coordinate shearing element of the 3x3 matrix * @param m01 the X coordinate shearing element of the 3x3 matrix * @param m11 the Y coordinate scaling element of the 3x3 matrix * @param m02 the X coordinate translation element of the 3x3 matrix * @param m12 the Y coordinate translation element of the 3x3 matrix */ public Transform(final double m00, final double m10, final double m01, final double m11, final double m02, final double m12) { m_jso = TransformJSO.make(m00, m10, m01, m11, m02, m12); }
public static final Transform fromXY(final double x, final double y) { return new Transform(TransformJSO.make(x, y)); }
public boolean isIdentity() { return m_jso.isIdentity(); }