public class Affine extends Transform
The Affine
class represents a general affine transform. An affine
transform performs a linear mapping from 2D/3D coordinates to other 2D/3D
coordinates while preserving the "straightness" and "parallelness"
of lines.
Affine transformations can be constructed using sequence rotations,
translations, scales, and shears.
For simple transformations application developers should use the
specific Translate
, Scale
, Rotate
, or Shear
transforms, which are more lightweight and thus more optimal for this simple
purpose. The Affine
class, on the other hand, has the advantage
of being able to represent a general affine transform and perform matrix
operations on it in place, so it fits better for more complex transformation
usages.
Such a coordinate transformation can be represented by a 3 row by
4 column matrix. This matrix transforms source coordinates (x,y,z)
into destination coordinates (x',y',z')
by considering
them to be a column vector and multiplying the coordinate vector
by the matrix according to the following process:
[ x'] [ mxx mxy mxz tx ] [ x ] [ mxx * x + mxy * y + mxz * z + tx ] [ y'] = [ myx myy myz ty ] [ y ] = [ myx * x + myy * y + myz * z + ty ] [ z'] [ mzx mzy mzz tz ] [ z ] [ mzx * x + mzy * y + mzz * z + tz ] [ 1 ]
Constructor and Description |
---|
Affine()
Creates a new instance of
Affine containing an identity transform. |
Affine(double[] matrix,
MatrixType type,
int offset)
Creates a new instance of
Affine with a transformation matrix
specified by an array. |
Affine(double mxx,
double mxy,
double tx,
double myx,
double myy,
double ty)
Creates a new instance of
Affine with a 2D transform specified
by the element values. |
Affine(double mxx,
double mxy,
double mxz,
double tx,
double myx,
double myy,
double myz,
double ty,
double mzx,
double mzy,
double mzz,
double tz)
Creates a new instance of
Affine with a transform specified
by the element values. |
Affine(Transform transform)
Creates a new instance of
Affine filled with the values from
the specified transform. |
Modifier and Type | Method and Description |
---|---|
void |
append(double[] matrix,
MatrixType type,
int offset)
Appends the transform specified by the array to this instance.
|
void |
append(double mxx,
double mxy,
double tx,
double myx,
double myy,
double ty)
Appends the 2D transform specified by the element values to this instance.
|
void |
append(double mxx,
double mxy,
double mxz,
double tx,
double myx,
double myy,
double myz,
double ty,
double mzx,
double mzy,
double mzz,
double tz)
Appends the transform specified by the element values to this instance.
|
void |
append(Transform transform)
Appends the specified transform to this instance.
|
void |
appendRotation(double angle)
Appends the 2D rotation to this instance.
|
void |
appendRotation(double angle,
double pivotX,
double pivotY)
Appends the 2D rotation with pivot to this instance.
|
void |
appendRotation(double angle,
double pivotX,
double pivotY,
double pivotZ,
double axisX,
double axisY,
double axisZ)
Appends the rotation to this instance.
|
void |
appendRotation(double angle,
double pivotX,
double pivotY,
double pivotZ,
Point3D axis)
Appends the rotation to this instance.
|
void |
appendRotation(double angle,
Point2D pivot)
Appends the 2D rotation with pivot to this instance.
|
void |
appendRotation(double angle,
Point3D pivot,
Point3D axis)
Appends the rotation to this instance.
|
void |
appendScale(double sx,
double sy)
Appends the 2D scale to this instance.
|
void |
appendScale(double sx,
double sy,
double sz)
Appends the scale to this instance.
|
void |
appendScale(double sx,
double sy,
double pivotX,
double pivotY)
Appends the 2D scale with pivot to this instance.
|
void |
appendScale(double sx,
double sy,
double sz,
double pivotX,
double pivotY,
double pivotZ)
Appends the scale with pivot to this instance.
|
void |
appendScale(double sx,
double sy,
double sz,
Point3D pivot)
Appends the scale with pivot to this instance.
|
void |
appendScale(double sx,
double sy,
Point2D pivot)
Appends the 2D scale with pivot to this instance.
|
void |
appendShear(double shx,
double shy)
Appends the shear to this instance.
|
void |
appendShear(double shx,
double shy,
double pivotX,
double pivotY)
Appends the shear with pivot to this instance.
|
void |
appendShear(double shx,
double shy,
Point2D pivot)
Appends the shear with pivot to this instance.
|
void |
appendTranslation(double tx,
double ty)
Appends the 2D translation to this instance.
|
void |
appendTranslation(double tx,
double ty,
double tz)
Appends the translation to this instance.
|
Affine |
clone()
Returns a deep copy of this transform.
|
Transform |
createConcatenation(Transform transform)
Returns the concatenation of this transform and the specified transform.
|
Affine |
createInverse()
Returns the inverse transform of this transform.
|
Point2D |
deltaTransform(double x,
double y)
Transforms the relative magnitude vector by this transform.
|
Point3D |
deltaTransform(double x,
double y,
double z)
Transforms the relative magnitude vector by this transform.
|
double |
determinant()
Computes determinant of the transformation matrix.
|
double |
getMxx()
Gets the X coordinate scaling element of the 3x4 matrix.
|
double |
getMxy()
Gets the XY coordinate element of the 3x4 matrix.
|
double |
getMxz()
Gets the XZ coordinate element of the 3x4 matrix.
|
double |
getMyx()
Gets the YX coordinate element of the 3x4 matrix.
|
double |
getMyy()
Gets the Y coordinate scaling element of the 3x4 matrix.
|
double |
getMyz()
Gets the YZ coordinate element of the 3x4 matrix.
|
double |
getMzx()
Gets the ZX coordinate element of the 3x4 matrix.
|
double |
getMzy()
Gets the ZY coordinate element of the 3x4 matrix.
|
double |
getMzz()
Gets the Z coordinate scaling element of the 3x4 matrix.
|
double |
getTx()
Gets the X coordinate translation element of the 3x4 matrix.
|
double |
getTy()
Gets the Y coordinate translation element of the 3x4 matrix.
|
double |
getTz()
Gets the Z coordinate translation element of the 3x4 matrix.
|
void |
impl_apply(Affine3D trans)
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
BaseTransform |
impl_derive(BaseTransform trans)
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
Point2D |
inverseDeltaTransform(double x,
double y)
Transforms the relative magnitude vector by the inverse of this transform.
|
Point3D |
inverseDeltaTransform(double x,
double y,
double z)
Transforms the relative magnitude vector by the inverse of this transform.
|
Point2D |
inverseTransform(double x,
double y)
Transforms the specified point by the inverse of this transform.
|
Point3D |
inverseTransform(double x,
double y,
double z)
Transforms the specified point by the inverse of this transform.
|
void |
invert()
Inverts this transform in place.
|
DoubleProperty |
mxxProperty() |
DoubleProperty |
mxyProperty() |
DoubleProperty |
mxzProperty() |
DoubleProperty |
myxProperty() |
DoubleProperty |
myyProperty() |
DoubleProperty |
myzProperty() |
DoubleProperty |
mzxProperty() |
DoubleProperty |
mzyProperty() |
DoubleProperty |
mzzProperty() |
void |
prepend(double[] matrix,
MatrixType type,
int offset)
Prepends the transform specified by the array to this instance.
|
void |
prepend(double mxx,
double mxy,
double tx,
double myx,
double myy,
double ty)
Prepends the 2D transform specified by the element values to this instance.
|
void |
prepend(double mxx,
double mxy,
double mxz,
double tx,
double myx,
double myy,
double myz,
double ty,
double mzx,
double mzy,
double mzz,
double tz)
Prepends the transform specified by the element values to this instance.
|
void |
prepend(Transform transform)
Prepends the specified transform to this instance.
|
void |
prependRotation(double angle)
Prepends the 2D rotation to this instance.
|
void |
prependRotation(double angle,
double pivotX,
double pivotY)
Prepends the 2D rotation with pivot to this instance.
|
void |
prependRotation(double angle,
double pivotX,
double pivotY,
double pivotZ,
double axisX,
double axisY,
double axisZ)
Prepends the rotation to this instance.
|
void |
prependRotation(double angle,
double pivotX,
double pivotY,
double pivotZ,
Point3D axis)
Prepends the rotation to this instance.
|
void |
prependRotation(double angle,
Point2D pivot)
Prepends the 2D rotation with pivot to this instance.
|
void |
prependRotation(double angle,
Point3D pivot,
Point3D axis)
Prepends the rotation to this instance.
|
void |
prependScale(double sx,
double sy)
Prepends the 2D scale to this instance.
|
void |
prependScale(double sx,
double sy,
double sz)
Prepends the scale to this instance.
|
void |
prependScale(double sx,
double sy,
double pivotX,
double pivotY)
Prepends the 2D scale with pivot to this instance.
|
void |
prependScale(double sx,
double sy,
double sz,
double pivotX,
double pivotY,
double pivotZ)
Prepends the scale with pivot to this instance.
|
void |
prependScale(double sx,
double sy,
double sz,
Point3D pivot)
Prepends the scale with pivot to this instance.
|
void |
prependScale(double sx,
double sy,
Point2D pivot)
Prepends the 2D scale with pivot to this instance.
|
void |
prependShear(double shx,
double shy)
Prepends the shear to this instance.
|
void |
prependShear(double shx,
double shy,
double pivotX,
double pivotY)
Prepends the shear with pivot to this instance.
|
void |
prependShear(double shx,
double shy,
Point2D pivot)
Prepends the shear with pivot to this instance.
|
void |
prependTranslation(double tx,
double ty)
Prepends the 2D translation to this instance.
|
void |
prependTranslation(double tx,
double ty,
double tz)
Prepends the translation to this instance.
|
void |
setElement(MatrixType type,
int row,
int column,
double value)
Sets the specified element of the transformation matrix.
|
void |
setMxx(double value) |
void |
setMxy(double value) |
void |
setMxz(double value) |
void |
setMyx(double value) |
void |
setMyy(double value) |
void |
setMyz(double value) |
void |
setMzx(double value) |
void |
setMzy(double value) |
void |
setMzz(double value) |
void |
setToIdentity()
Resets this transform to the identity transform.
|
void |
setToTransform(double[] matrix,
MatrixType type,
int offset)
Sets the values of this instance to the transformation matrix
specified by an array.
|
void |
setToTransform(double mxx,
double mxy,
double tx,
double myx,
double myy,
double ty)
Sets the values of this instance to the 2D transform specified
by the element values.
|
void |
setToTransform(double mxx,
double mxy,
double mxz,
double tx,
double myx,
double myy,
double myz,
double ty,
double mzx,
double mzy,
double mzz,
double tz)
Sets the values of this instance to the transform specified
by the element values.
|
void |
setToTransform(Transform transform)
Sets the values of this instance to the values provided by the specified
transform.
|
void |
setTx(double value) |
void |
setTy(double value) |
void |
setTz(double value) |
String |
toString()
Returns a string representation of this
Affine object. |
Point2D |
transform(double x,
double y)
Transforms the specified point by this transform.
|
Point3D |
transform(double x,
double y,
double z)
Transforms the specified point by this transform.
|
DoubleProperty |
txProperty() |
DoubleProperty |
tyProperty() |
DoubleProperty |
tzProperty() |
addEventFilter, addEventHandler, affine, affine, buildEventDispatchChain, column, column, deltaTransform, deltaTransform, getElement, getOnTransformChanged, identityProperty, impl_add, impl_remove, inverseDeltaTransform, inverseDeltaTransform, inverseTransform, inverseTransform, inverseTransform, inverseTransform2DPoints, inverseTransform3DPoints, isIdentity, isType2D, onTransformChangedProperty, removeEventFilter, removeEventHandler, rotate, row, row, scale, scale, setOnTransformChanged, shear, shear, similarTo, toArray, toArray, transform, transform, transform, transform2DPoints, transform3DPoints, transformChanged, translate, type2DProperty
public Affine()
Affine
containing an identity transform.public Affine(Transform transform)
Affine
filled with the values from
the specified transform.transform
- transform whose matrix is to be filled to the new
instanceNullPointerException
- if the specified transform
is nullpublic Affine(double mxx, double mxy, double tx, double myx, double myy, double ty)
Affine
with a 2D transform specified
by the element values.mxx
- the X coordinate scaling elementmxy
- the XY coordinate elementtx
- the X coordinate translation elementmyx
- the YX coordinate elementmyy
- the Y coordinate scaling elementty
- the Y coordinate translation elementpublic Affine(double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)
Affine
with a transform specified
by the element values.mxx
- the X coordinate scaling elementmxy
- the XY coordinate elementmxz
- the XZ coordinate elementtx
- the X coordinate translation elementmyx
- the YX coordinate elementmyy
- the Y coordinate scaling elementmyz
- the YZ coordinate elementty
- the Y coordinate translation elementmzx
- the ZX coordinate elementmzy
- the ZY coordinate elementmzz
- the Z coordinate scaling elementtz
- the Z coordinate translation elementpublic Affine(double[] matrix, MatrixType type, int offset)
Affine
with a transformation matrix
specified by an array.matrix
- array containing the flattened transformation matrixtype
- type of matrix contained in the arrayoffset
- offset of the first element in the arrayIndexOutOfBoundsException
- if the array is too short for
the specified type
and offset
IllegalArgumentException
- if the specified matrix is not affine
(the last line of a 2D 3x3 matrix is not [0, 0, 1]
or
the last line of a 3D 4x4 matrix is not [0, 0, 0, 1]
.NullPointerException
- if the specified matrix
or type
is nullpublic final void setMxx(double value)
public final double getMxx()
Transform
public final DoubleProperty mxxProperty()
public final void setMxy(double value)
public final double getMxy()
Transform
public final DoubleProperty mxyProperty()
public final void setMxz(double value)
public final double getMxz()
Transform
public final DoubleProperty mxzProperty()
public final void setTx(double value)
public final double getTx()
Transform
public final DoubleProperty txProperty()
public final void setMyx(double value)
public final double getMyx()
Transform
public final DoubleProperty myxProperty()
public final void setMyy(double value)
public final double getMyy()
Transform
public final DoubleProperty myyProperty()
public final void setMyz(double value)
public final double getMyz()
Transform
public final DoubleProperty myzProperty()
public final void setTy(double value)
public final double getTy()
Transform
public final DoubleProperty tyProperty()
public final void setMzx(double value)
public final double getMzx()
Transform
public final DoubleProperty mzxProperty()
public final void setMzy(double value)
public final double getMzy()
Transform
public final DoubleProperty mzyProperty()
public final void setMzz(double value)
public final double getMzz()
Transform
public final DoubleProperty mzzProperty()
public final void setTz(double value)
public final double getTz()
Transform
public final DoubleProperty tzProperty()
public void setElement(MatrixType type, int row, int column, double value)
type
- type of matrix to work withrow
- zero-based row numbercolumn
- zero-based column numbervalue
- new value of the specified transformation matrix elementIndexOutOfBoundsException
- if the indices are not within
the specified matrix typeIllegalArgumentException
- if setting the value would break
transform's affinity (for convenience the method allows to set
the elements of the last line of a 2D 3x3 matrix to
[0, 0, 1]
and the elements of the last line
of a 3D 4x4 matrix to [0, 0, 0, 1]
).NullPointerException
- if the specified type
is nullpublic double determinant()
Transform
determinant
in class Transform
public Transform createConcatenation(Transform transform)
Transform
getTransforms()
list,
this
transform first and the specified transform
second.createConcatenation
in class Transform
transform
- transform to be concatenated with this transformpublic Affine createInverse() throws NonInvertibleTransformException
Transform
createInverse
in class Transform
NonInvertibleTransformException
- if this transform
cannot be invertedpublic Affine clone()
Transform
public void setToTransform(Transform transform)
transform
- transform whose matrix is to be filled to this instanceNullPointerException
- if the specified transform
is nullpublic void setToTransform(double mxx, double mxy, double tx, double myx, double myy, double ty)
mxx
- the X coordinate scaling elementmxy
- the XY coordinate elementtx
- the X coordinate translation elementmyx
- the YX coordinate elementmyy
- the Y coordinate scaling elementty
- the Y coordinate translation elementpublic void setToTransform(double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)
mxx
- the X coordinate scaling elementmxy
- the XY coordinate elementmxz
- the XZ coordinate elementtx
- the X coordinate translation elementmyx
- the YX coordinate elementmyy
- the Y coordinate scaling elementmyz
- the YZ coordinate elementty
- the Y coordinate translation elementmzx
- the ZX coordinate elementmzy
- the ZY coordinate elementmzz
- the Z coordinate scaling elementtz
- the Z coordinate translation elementpublic void setToTransform(double[] matrix, MatrixType type, int offset)
matrix
- array containing the flattened transformation matrixtype
- type of matrix contained in the arrayoffset
- offset of the first element in the arrayIndexOutOfBoundsException
- if the array is too short for
the specified type
and offset
IllegalArgumentException
- if the specified matrix is not affine
(the last line of a 2D 3x3 matrix is not [0, 0, 1]
or
the last line of a 3D 4x4 matrix is not [0, 0, 0, 1]
.NullPointerException
- if the specified matrix
or type
is nullpublic void setToIdentity()
public void invert() throws NonInvertibleTransformException
NonInvertibleTransformException
- if this transform
cannot be invertedpublic void append(Transform transform)
Appends the specified transform to this instance.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding the two transforms to its
getTransforms()
list, this
transform first and the specified
transform
second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified transform.
transform
- transform to be appended to this instanceNullPointerException
- if the specified transform
is nullpublic void append(double mxx, double mxy, double tx, double myx, double myy, double ty)
Appends the 2D transform specified by the element values to this instance.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding the two transforms to its
getTransforms()
list, this
transform first and the specified
transform
second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified transform.
mxx
- the X coordinate scaling element of the transform to be
appendedmxy
- the XY coordinate element of the transform to be appendedtx
- the X coordinate translation element of the transform to be
appendedmyx
- the YX coordinate element of the transform to be appendedmyy
- the Y coordinate scaling element of the transform to be
appendedty
- the Y coordinate translation element of the transform to be
appendedpublic void append(double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)
Appends the transform specified by the element values to this instance.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding the two transforms to its
getTransforms()
list, this
transform first and the specified
transform
second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified transform.
mxx
- the X coordinate scaling element of the transform to be
appendedmxy
- the XY coordinate element of the transform to be appendedmxz
- the XZ coordinate element of the transform to be appendedtx
- the X coordinate translation element of the transform to be
appendedmyx
- the YX coordinate element of the transform to be appendedmyy
- the Y coordinate scaling element of the transform to be
appendedmyz
- the YZ coordinate element of the transform to be appendedty
- the Y coordinate translation element of the transform to be
appendedmzx
- the ZX coordinate element of the transform to be appendedmzy
- the ZY coordinate element of the transform to be appendedmzz
- the Z coordinate scaling element of the transform to be
appendedtz
- the Z coordinate translation element of the transform to be
appendedpublic void append(double[] matrix, MatrixType type, int offset)
Appends the transform specified by the array to this instance.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding the two transforms to its
getTransforms()
list, this
transform first and the specified
transform
second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified transform.
matrix
- array containing the flattened transformation matrix
to be appendedtype
- type of matrix contained in the arrayoffset
- offset of the first matrix element in the arrayIndexOutOfBoundsException
- if the array is too short for
the specified type
and offset
IllegalArgumentException
- if the specified matrix is not affine
(the last line of a 2D 3x3 matrix is not [0, 0, 1]
or
the last line of a 3D 4x4 matrix is not [0, 0, 0, 1]
.NullPointerException
- if the specified matrix
or type
is nullpublic void prepend(Transform transform)
Prepends the specified transform to this instance.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding the two transforms to its
getTransforms()
list, the specified transform
first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified transform.
transform
- transform to be prepended to this instanceNullPointerException
- if the specified transform
is nullpublic void prepend(double mxx, double mxy, double tx, double myx, double myy, double ty)
Prepends the 2D transform specified by the element values to this instance.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding the two transforms to its
getTransforms()
list, the specified transform
first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified transform.
mxx
- the X coordinate scaling element of the transform to be
prependedmxy
- the XY coordinate element of the transform to be prependedtx
- the X coordinate translation element of the transform to be
prependedmyx
- the YX coordinate element of the transform to be prependedmyy
- the Y coordinate scaling element of the transform to be
prependedty
- the Y coordinate translation element of the transform to be
prependedpublic void prepend(double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz)
Prepends the transform specified by the element values to this instance.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding the two transforms to its
getTransforms()
list, the specified transform
first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified transform.
mxx
- the X coordinate scaling element of the transform to be
prependedmxy
- the XY coordinate element of the transform to be prependedmxz
- the XZ coordinate element of the transform to be prependedtx
- the X coordinate translation element of the transform to be
prependedmyx
- the YX coordinate element of the transform to be prependedmyy
- the Y coordinate scaling element of the transform to be
prependedmyz
- the YZ coordinate element of the transform to be prependedty
- the Y coordinate translation element of the transform to be
prependedmzx
- the ZX coordinate element of the transform to be prependedmzy
- the ZY coordinate element of the transform to be prependedmzz
- the Z coordinate scaling element of the transform to be
prependedtz
- the Z coordinate translation element of the transform to be
prependedpublic void prepend(double[] matrix, MatrixType type, int offset)
Prepends the transform specified by the array to this instance.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding the two transforms to its
getTransforms()
list, the specified transform
first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified transform.
matrix
- array containing the flattened transformation matrix
to be prependedtype
- type of matrix contained in the arrayoffset
- offset of the first matrix element in the arrayIndexOutOfBoundsException
- if the array is too short for
the specified type
and offset
IllegalArgumentException
- if the specified matrix is not affine
(the last line of a 2D 3x3 matrix is not [0, 0, 1]
or
the last line of a 3D 4x4 matrix is not [0, 0, 0, 1]
.NullPointerException
- if the specified matrix
or type
is nullpublic void appendTranslation(double tx, double ty)
Appends the 2D translation to this instance.
It is equivalent to append(new Translate(tx, ty))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
translation second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified translation.
tx
- the X coordinate translationty
- the Y coordinate translationpublic void appendTranslation(double tx, double ty, double tz)
Appends the translation to this instance.
It is equivalent to append(new Translate(tx, ty, tz))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
translation second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified translation.
tx
- the X coordinate translationty
- the Y coordinate translationtz
- the Z coordinate translationpublic void prependTranslation(double tx, double ty, double tz)
Prepends the translation to this instance.
It is equivalent to prepend(new Translate(tx, ty, tz))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified translation first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified translation.
tx
- the X coordinate translationty
- the Y coordinate translationtz
- the Z coordinate translationpublic void prependTranslation(double tx, double ty)
Prepends the 2D translation to this instance.
It is equivalent to prepend(new Translate(tx, ty))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified translation first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified translation.
tx
- the X coordinate translationty
- the Y coordinate translationpublic void appendScale(double sx, double sy)
Appends the 2D scale to this instance.
It is equivalent to append(new Scale(sx, sy))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
scale second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorpublic void appendScale(double sx, double sy, double pivotX, double pivotY)
Appends the 2D scale with pivot to this instance.
It is equivalent to append(new Scale(sx, sy, pivotX, pivotY))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
scale second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorpivotX
- the X coordinate of the point about which the scale occurspivotY
- the Y coordinate of the point about which the scale occurspublic void appendScale(double sx, double sy, Point2D pivot)
Appends the 2D scale with pivot to this instance.
It is equivalent to
append(new Scale(sx, sy, pivot.getX(), pivot.getY())
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
scale second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorpivot
- the point about which the scale occursNullPointerException
- if the specified pivot
is nullpublic void appendScale(double sx, double sy, double sz)
Appends the scale to this instance.
It is equivalent to append(new Scale(sx, sy, sz))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
scale second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorsz
- the Z coordinate scale factorpublic void appendScale(double sx, double sy, double sz, double pivotX, double pivotY, double pivotZ)
Appends the scale with pivot to this instance.
It is equivalent to append(new Scale(sx, sy, sz, pivotX,
pivotY, pivotZ))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
scale second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorsz
- the Z coordinate scale factorpivotX
- the X coordinate of the point about which the scale occurspivotY
- the Y coordinate of the point about which the scale occurspivotZ
- the Z coordinate of the point about which the scale occurspublic void appendScale(double sx, double sy, double sz, Point3D pivot)
Appends the scale with pivot to this instance.
It is equivalent to append(new Scale(sx, sy, sz, pivot.getX(),
pivot.getY(), pivot.getZ()))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
scale second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorsz
- the Z coordinate scale factorpivot
- the point about which the scale occursNullPointerException
- if the specified pivot
is nullpublic void prependScale(double sx, double sy)
Prepends the 2D scale to this instance.
It is equivalent to prepend(new Scale(sx, sy))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified scale first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorpublic void prependScale(double sx, double sy, double pivotX, double pivotY)
Prepends the 2D scale with pivot to this instance.
It is equivalent to prepend(new Scale(sx, sy, pivotX, pivotY))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified scale first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorpivotX
- the X coordinate of the point about which the scale occurspivotY
- the Y coordinate of the point about which the scale occurspublic void prependScale(double sx, double sy, Point2D pivot)
Prepends the 2D scale with pivot to this instance.
It is equivalent to prepend(new Scale(sx, sy, pivot.getX(),
</p>pivot.getY()))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified scale first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorpivot
- the point about which the scale occursNullPointerException
- if the specified pivot
is nullpublic void prependScale(double sx, double sy, double sz)
Prepends the scale to this instance.
It is equivalent to prepend(new Scale(sx, sy, sz))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified scale first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorsz
- the Z coordinate scale factorpublic void prependScale(double sx, double sy, double sz, double pivotX, double pivotY, double pivotZ)
Prepends the scale with pivot to this instance.
It is equivalent to
prepend(new Scale(sx, sy, sz, pivotX, pivotY, pivotZ))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified scale first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorsz
- the Z coordinate scale factorpivotX
- the X coordinate of the point about which the scale occurspivotY
- the Y coordinate of the point about which the scale occurspivotZ
- the Z coordinate of the point about which the scale occurspublic void prependScale(double sx, double sy, double sz, Point3D pivot)
Prepends the scale with pivot to this instance.
It is equivalent to prepend(new Scale(sx, sy, sz, pivot.getX(),
pivot.getY(), pivot.getZ()))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified scale first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified scale.
sx
- the X coordinate scale factorsy
- the Y coordinate scale factorsz
- the Z coordinate scale factorpivot
- the point about which the scale occursNullPointerException
- if the specified pivot
is nullpublic void appendShear(double shx, double shy)
Appends the shear to this instance.
It is equivalent to append(new Shear(sx, sy))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
shear second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified shear.
shx
- the XY coordinate elementshy
- the YX coordinate elementpublic void appendShear(double shx, double shy, double pivotX, double pivotY)
Appends the shear with pivot to this instance.
It is equivalent to append(new Shear(sx, sy, pivotX, pivotY))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
shear second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified shear.
shx
- the XY coordinate elementshy
- the YX coordinate elementpivotX
- the X coordinate of the shear pivot pointpivotY
- the Y coordinate of the shear pivot pointpublic void appendShear(double shx, double shy, Point2D pivot)
Appends the shear with pivot to this instance.
It is equivalent to append(new Shear(sx, sy,
pivot.getX(), pivot.getY()))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
shear second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified shear.
shx
- the XY coordinate elementshy
- the YX coordinate elementpivot
- the shear pivot pointNullPointerException
- if the specified pivot
is nullpublic void prependShear(double shx, double shy)
Prepends the shear to this instance.
It is equivalent to prepend(new Shear(sx, sy))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified shear first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified shear.
shx
- the XY coordinate elementshy
- the YX coordinate elementpublic void prependShear(double shx, double shy, double pivotX, double pivotY)
Prepends the shear with pivot to this instance.
It is equivalent to prepend(new Shear(sx, sy, pivotX, pivotY))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified shear first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified shear.
shx
- the XY coordinate elementshy
- the YX coordinate elementpivotX
- the X coordinate of the shear pivot pointpivotY
- the Y coordinate of the shear pivot pointpublic void prependShear(double shx, double shy, Point2D pivot)
Prepends the shear with pivot to this instance.
It is equivalent to prepend(new Shear(sx, sy, pivot.getX(),
pivot.getY()))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified shear first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified shear.
shx
- the XY coordinate elementshy
- the YX coordinate elementpivot
- the shear pivot pointNullPointerException
- if the specified pivot
is nullpublic void appendRotation(double angle)
Appends the 2D rotation to this instance.
It is equivalent to append(new Rotate(angle))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
rotation second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespublic void appendRotation(double angle, double pivotX, double pivotY)
Appends the 2D rotation with pivot to this instance.
It is equivalent to append(new Rotate(angle, pivotX, pivotY))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
rotation second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespivotX
- the X coordinate of the rotation pivot pointpivotY
- the Y coordinate of the rotation pivot pointpublic void appendRotation(double angle, Point2D pivot)
Appends the 2D rotation with pivot to this instance.
It is equivalent to append(new Rotate(angle, pivot.getX(),
pivot.getY()))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
rotation second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespivot
- the rotation pivot pointNullPointerException
- if the specified pivot
is nullpublic void appendRotation(double angle, double pivotX, double pivotY, double pivotZ, double axisX, double axisY, double axisZ)
Appends the rotation to this instance.
It is equivalent to append(new Rotate(angle, pivotX, pivotY,
pivotZ, new Point3D(axisX, axisY, axisZ)))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
rotation second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespivotX
- the X coordinate of the rotation pivot pointpivotY
- the Y coordinate of the rotation pivot pointpivotZ
- the Z coordinate of the rotation pivot pointaxisX
- the X coordinate magnitude of the rotation axisaxisY
- the Y coordinate magnitude of the rotation axisaxisZ
- the Z coordinate magnitude of the rotation axispublic void appendRotation(double angle, double pivotX, double pivotY, double pivotZ, Point3D axis)
Appends the rotation to this instance.
It is equivalent to append(new Rotate(angle, pivotX, pivotY,
pivotZ, axis))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
rotation second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespivotX
- the X coordinate of the rotation pivot pointpivotY
- the Y coordinate of the rotation pivot pointpivotZ
- the Z coordinate of the rotation pivot pointaxis
- the rotation axisNullPointerException
- if the specified axis
is nullpublic void appendRotation(double angle, Point3D pivot, Point3D axis)
Appends the rotation to this instance.
It is equivalent to append(new Rotate(angle, pivot.getX(),
pivot.getY(), pivot.getZ(), axis))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, this
transform first and the specified
rotation second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the right by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespivot
- the rotation pivot pointaxis
- the rotation axisNullPointerException
- if the specified pivot
or axis
is nullpublic void prependRotation(double angle)
Prepends the 2D rotation to this instance.
It is equivalent to prepend(new Rotate(angle))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified rotation first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespublic void prependRotation(double angle, double pivotX, double pivotY)
Prepends the 2D rotation with pivot to this instance.
It is equivalent to prepend(new Rotate(angle, pivotX, pivotY))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified rotation first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespivotX
- the X coordinate of the rotation pivot pointpivotY
- the Y coordinate of the rotation pivot pointpublic void prependRotation(double angle, Point2D pivot)
Prepends the 2D rotation with pivot to this instance.
It is equivalent to prepend(new Rotate(angle, pivot.getX(),
pivot.getY()))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified rotation first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespivot
- the rotation pivot pointNullPointerException
- if the specified pivot
is nullpublic void prependRotation(double angle, double pivotX, double pivotY, double pivotZ, double axisX, double axisY, double axisZ)
Prepends the rotation to this instance.
It is equivalent to prepend(new Rotate(angle, pivotX, pivotY,
pivotZ, new Point3D(axisX, axisY, axisZ)))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified rotation first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespivotX
- the X coordinate of the rotation pivot pointpivotY
- the Y coordinate of the rotation pivot pointpivotZ
- the Z coordinate of the rotation pivot pointaxisX
- the X coordinate magnitude of the rotation axisaxisY
- the Y coordinate magnitude of the rotation axisaxisZ
- the Z coordinate magnitude of the rotation axispublic void prependRotation(double angle, double pivotX, double pivotY, double pivotZ, Point3D axis)
Prepends the rotation to this instance.
It is equivalent to prepend(new Rotate(angle, pivotX, pivotY,
pivotZ, axis))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified rotation first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespivotX
- the X coordinate of the rotation pivot pointpivotY
- the Y coordinate of the rotation pivot pointpivotZ
- the Z coordinate of the rotation pivot pointaxis
- the rotation axisNullPointerException
- if the specified axis
is nullpublic void prependRotation(double angle, Point3D pivot, Point3D axis)
Prepends the rotation to this instance.
It is equivalent to prepend(new Rotate(angle, pivot.getX(),
pivot.getY(), pivot.getZ(), axis))
.
The operation modifies this transform in a way that applying it to a node
has the same effect as adding two transforms to its
getTransforms()
list, the specified rotation first
and this
transform second.
From the matrix point of view, the transformation matrix of this transform is multiplied on the left by the transformation matrix of the specified rotation.
angle
- the angle of the rotation in degreespivot
- the rotation pivot pointaxis
- the rotation axisNullPointerException
- if the specified pivot
or axis
is nullpublic Point2D transform(double x, double y)
Transform
public Point3D transform(double x, double y, double z)
Transform
public Point2D deltaTransform(double x, double y)
Transform
deltaTransform
in class Transform
x
- vector magnitude in the direction of the X axisy
- vector magnitude in the direction of the Y axisPoint2D
instancepublic Point3D deltaTransform(double x, double y, double z)
Transform
deltaTransform
in class Transform
x
- vector magnitude in the direction of the X axisy
- vector magnitude in the direction of the Y axisPoint3D
instancepublic Point2D inverseTransform(double x, double y) throws NonInvertibleTransformException
Transform
inverseTransform
in class Transform
x
- the X coordinate of the pointy
- the Y coordinate of the pointNonInvertibleTransformException
- if this transform
cannot be invertedpublic Point3D inverseTransform(double x, double y, double z) throws NonInvertibleTransformException
Transform
inverseTransform
in class Transform
x
- the X coordinate of the pointy
- the Y coordinate of the pointz
- the Z coordinate of the pointNonInvertibleTransformException
- if this transform
cannot be invertedpublic Point2D inverseDeltaTransform(double x, double y) throws NonInvertibleTransformException
Transform
inverseDeltaTransform
in class Transform
x
- vector magnitude in the direction of the X axisy
- vector magnitude in the direction of the Y axisPoint2D
instanceNonInvertibleTransformException
- if this transform
cannot be invertedpublic Point3D inverseDeltaTransform(double x, double y, double z) throws NonInvertibleTransformException
Transform
inverseDeltaTransform
in class Transform
x
- vector magnitude in the direction of the X axisy
- vector magnitude in the direction of the Y axisPoint3D
instanceNonInvertibleTransformException
- if this transform
cannot be invertedpublic String toString()
Affine
object.@Deprecated public void impl_apply(Affine3D trans)
impl_apply
in class Transform
@Deprecated public BaseTransform impl_derive(BaseTransform trans)
impl_derive
in class Transform
Copyright © 2020. All rights reserved.