public class Translate extends Transform
Affine
object that translates coordinates
by the specified factors. The matrix representing the translating
transformation by distances x
, y
and z
is as follows:
[ 1 0 0 x ] [ 0 1 0 y ] [ 0 0 1 z ]
Type | Property and Description |
---|---|
DoubleProperty |
x
Defines the distance by which coordinates are translated in the
X axis direction
|
DoubleProperty |
y
Defines the distance by which coordinates are translated in the
Y axis direction
|
DoubleProperty |
z
Defines the distance by which coordinates are translated in the
Z axis direction
|
identityProperty, onTransformChangedProperty, type2DProperty
Transform.ImmutableTransform
Modifier and Type | Field and Description |
---|---|
private DoubleProperty |
x
Defines the distance by which coordinates are translated in the
X axis direction
|
private DoubleProperty |
y
Defines the distance by which coordinates are translated in the
Y axis direction
|
private DoubleProperty |
z
Defines the distance by which coordinates are translated in the
Z axis direction
|
Constructor and Description |
---|
Translate()
Creates a default Translate (identity).
|
Translate(double x,
double y)
Creates a two-dimensional Translate.
|
Translate(double x,
double y,
double z)
Creates a three-dimensional Translate.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
appendTo(Affine a)
Visitor from
Affine class which provides an efficient
append operation for the subclasses. |
(package private) void |
apply(Affine3D trans) |
Translate |
clone()
Returns a deep copy of this transform.
|
(package private) boolean |
computeIs2D()
Computes if this transform is currently a 2D transform (has no effect
in the direction of Z axis).
|
(package private) boolean |
computeIsIdentity()
Computes if this transform is currently an identity (has
no effect in any direction).
|
Transform |
createConcatenation(Transform transform)
Returns the concatenation of this transform and the specified transform.
|
Translate |
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.
|
Point2D |
deltaTransform(Point2D point)
Transforms the relative magnitude vector represented by the specified
Point3D instance by this transform. |
Point3D |
deltaTransform(Point3D point)
Transforms the relative magnitude vector represented by the specified
Point3D instance by this transform. |
(package private) BaseTransform |
derive(BaseTransform trans) |
(package private) void |
fill2DArray(double[] array)
Core of the toArray implementation for the 2D case.
|
(package private) void |
fill3DArray(double[] array)
Core of the toArray implementation for the 3D case.
|
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.
|
double |
getX()
Gets the value of the property x.
|
double |
getY()
Gets the value of the property y.
|
double |
getZ()
Gets the value of the property z.
|
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 |
inverseDeltaTransform(Point2D point)
Transforms the relative magnitude vector represented by the specified
Point3D instance by the inverse of this transform. |
Point3D |
inverseDeltaTransform(Point3D point)
Transforms the relative magnitude vector represented by the specified
Point3D instance 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.
|
(package private) void |
inverseTransform2DPointsImpl(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Core of the inverseTransform2DPoints method.
|
(package private) void |
inverseTransform3DPointsImpl(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Core of the inverseTransform3DPoints method.
|
(package private) void |
prependTo(Affine a)
Visitor from
Affine class which provides an efficient
prepend operation for the subclasses. |
void |
setX(double value)
Sets the value of the property x.
|
void |
setY(double value)
Sets the value of the property y.
|
void |
setZ(double value)
Sets the value of the property z.
|
java.lang.String |
toString()
Returns a string representation of this
Translate 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.
|
(package private) void |
transform2DPointsImpl(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Core of the transform2DPoints method.
|
(package private) void |
transform3DPointsImpl(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Core of the transform3DPoints method.
|
(package private) void |
validate()
Needed for the proper delivery of the TransformChangedEvent.
|
DoubleProperty |
xProperty()
Defines the distance by which coordinates are translated in the
X axis direction
|
DoubleProperty |
yProperty()
Defines the distance by which coordinates are translated in the
Y axis direction
|
DoubleProperty |
zProperty()
Defines the distance by which coordinates are translated in the
Z axis direction
|
add, addEventFilter, addEventHandler, affine, affine, buildEventDispatchChain, checkRequestedMAT, clearInverseCache, column, column, createImmutableTransform, createImmutableTransform, createImmutableTransform, createImmutableTransform, determinant, ensureCanTransform2DPoint, getElement, getMxx, getMxy, getMxz, getMyx, getMyy, getMyz, getMzx, getMzy, getMzz, getOnTransformChanged, identityProperty, inverseTransform, inverseTransform, inverseTransform, inverseTransform2DPoints, inverseTransform3DPoints, isIdentity, isType2D, onTransformChangedProperty, remove, removeEventFilter, removeEventHandler, rotate, row, row, scale, scale, setOnTransformChanged, shear, shear, similarTo, toArray, toArray, transform, transform, transform, transform2DPoints, transform3DPoints, transformChanged, translate, type2DProperty
public final DoubleProperty xProperty
getX()
,
setX(double)
public final DoubleProperty yProperty
getY()
,
setY(double)
public final DoubleProperty zProperty
getZ()
,
setZ(double)
private DoubleProperty x
private DoubleProperty y
private DoubleProperty z
public Translate()
public Translate(double x, double y)
x
- the distance by which coordinates are translated in the
X axis directiony
- the distance by which coordinates are translated in the
Y axis directionpublic Translate(double x, double y, double z)
x
- the distance by which coordinates are translated in the
X axis directiony
- the distance by which coordinates are translated in the
Y axis directionz
- the distance by which coordinates are translated in the
Z axis directionpublic final void setX(double value)
public final double getX()
public final DoubleProperty xProperty()
getX()
,
setX(double)
public final void setY(double value)
public final double getY()
public final DoubleProperty yProperty()
getY()
,
setY(double)
public final void setZ(double value)
public final double getZ()
public final DoubleProperty zProperty()
getZ()
,
setZ(double)
public double getTx()
Transform
public double getTy()
Transform
public double getTz()
Transform
boolean computeIs2D()
Transform
computeIs2D
in class Transform
boolean computeIsIdentity()
Transform
computeIsIdentity
in class Transform
void fill2DArray(double[] array)
Transform
fill2DArray
in class Transform
array
- array to be filled with the 6 2D elementsvoid fill3DArray(double[] array)
Transform
fill3DArray
in class Transform
array
- array to be filled with the 12 3D elementspublic 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 Translate createInverse()
Transform
createInverse
in class Transform
public Translate clone()
Transform
public Point2D transform(double x, double y)
Transform
public Point3D transform(double x, double y, double z)
Transform
void transform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Transform
transform2DPointsImpl
in class Transform
void transform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Transform
transform3DPointsImpl
in class 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 Point2D deltaTransform(Point2D point)
Transform
Point3D
instance by this transform.
The vector is transformed without applying the translation components
of the affine transformation matrix.deltaTransform
in class Transform
point
- the relative magnitude vectorPoint3D
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 axisz
- vector magnitude in the direction of the Z axisPoint3D
instancepublic Point3D deltaTransform(Point3D point)
Transform
Point3D
instance by this transform.
The vector is transformed without applying the translation components
of the affine transformation matrix.deltaTransform
in class Transform
point
- the relative magnitude vectorPoint3D
instancepublic Point2D inverseTransform(double x, double y)
Transform
inverseTransform
in class Transform
x
- the X coordinate of the pointy
- the Y coordinate of the pointpublic Point3D inverseTransform(double x, double y, double z)
Transform
inverseTransform
in class Transform
x
- the X coordinate of the pointy
- the Y coordinate of the pointz
- the Z coordinate of the pointvoid inverseTransform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Transform
inverseTransform2DPointsImpl
in class Transform
void inverseTransform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Transform
inverseTransform3DPointsImpl
in class Transform
public Point2D inverseDeltaTransform(double x, double y)
Transform
inverseDeltaTransform
in class Transform
x
- vector magnitude in the direction of the X axisy
- vector magnitude in the direction of the Y axisPoint2D
instancepublic Point2D inverseDeltaTransform(Point2D point)
Transform
Point3D
instance by the inverse of this transform.
The vector is transformed without applying the translation components
of the affine transformation matrix.inverseDeltaTransform
in class Transform
point
- the relative magnitude vectorPoint3D
instancepublic Point3D inverseDeltaTransform(double x, double y, double z)
Transform
inverseDeltaTransform
in class Transform
x
- vector magnitude in the direction of the X axisy
- vector magnitude in the direction of the Y axisz
- vector magnitude in the direction of the Z axisPoint3D
instancepublic Point3D inverseDeltaTransform(Point3D point)
Transform
Point3D
instance by the inverse of this transform.
The vector is transformed without applying the translation components
of the affine transformation matrix.inverseDeltaTransform
in class Transform
point
- the relative magnitude vectorPoint3D
instancepublic java.lang.String toString()
Translate
object.toString
in class java.lang.Object
Translate
object.void validate()
Transform
void appendTo(Affine a)
Transform
Affine
class which provides an efficient
append
operation for the subclasses.