public class Scale extends Transform
Affine object that scales coordinates
by the specified factors. The matrix representing the scaling transformation
is as follows:
[ x 0 0 (1-x)*pivotX ]
[ 0 y 0 (1-y)*pivotY ]
[ 0 0 z (1-z)*pivotZ ]
| Modifier and Type | Field and Description |
|---|---|
private DoubleProperty |
pivotX
Defines the X coordinate about which point the scale occurs.
|
private DoubleProperty |
pivotY
Defines the Y coordinate about which point the scale occurs.
|
private DoubleProperty |
pivotZ
Defines the Z coordinate about which point the scale occurs.
|
private DoubleProperty |
x
Defines the factor by which coordinates are scaled
along the X axis direction.
|
private DoubleProperty |
y
Defines the factor by which coordinates are scaled
along the Y axis direction.
|
private DoubleProperty |
z
Defines the factor by which coordinates are scaled
along the Z axis direction.
|
| Constructor and Description |
|---|
Scale()
Creates a default Scale (identity).
|
Scale(double x,
double y)
Creates a two-dimensional Scale.
|
Scale(double x,
double y,
double z)
Creates a three-dimensional Scale.
|
Scale(double x,
double y,
double pivotX,
double pivotY)
Creates a two-dimensional Scale with pivot.
|
Scale(double x,
double y,
double z,
double pivotX,
double pivotY,
double pivotZ)
Creates a three-dimensional Scale with pivot.
|
| 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. |
Scale |
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.
|
Scale |
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.
|
(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 |
getMxx()
Gets the X coordinate scaling element of the 3x4 matrix.
|
double |
getMyy()
Gets the Y coordinate scaling element of the 3x4 matrix.
|
double |
getMzz()
Gets the Z coordinate scaling element of the 3x4 matrix.
|
double |
getPivotX() |
double |
getPivotY() |
double |
getPivotZ() |
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() |
double |
getY() |
double |
getZ() |
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.
|
(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.
|
DoubleProperty |
pivotXProperty() |
DoubleProperty |
pivotYProperty() |
DoubleProperty |
pivotZProperty() |
(package private) void |
prependTo(Affine a)
Visitor from
Affine class which provides an efficient
prepend operation for the subclasses. |
void |
setPivotX(double value) |
void |
setPivotY(double value) |
void |
setPivotZ(double value) |
void |
setX(double value) |
void |
setY(double value) |
void |
setZ(double value) |
java.lang.String |
toString()
Returns a string representation of this
Scale 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() |
DoubleProperty |
yProperty() |
DoubleProperty |
zProperty() |
addEventFilter, addEventHandler, affine, affine, buildEventDispatchChain, checkRequestedMAT, clearInverseCache, column, column, deltaTransform, deltaTransform, determinant, ensureCanTransform2DPoint, getElement, getMxy, getMxz, getMyx, getMyz, getMzx, getMzy, 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, type2DPropertyprivate DoubleProperty x
1.0.private DoubleProperty y
1.0.private DoubleProperty z
1.0.private DoubleProperty pivotX
private DoubleProperty pivotY
private DoubleProperty pivotZ
public Scale()
public Scale(double x,
double y)
x - the factor by which coordinates are scaled along the X axisy - the factor by which coordinates are scaled along the Y axispublic Scale(double x,
double y,
double pivotX,
double pivotY)
x - the factor by which coordinates are scaled along the X axisy - the factor by which coordinates are scaled along the Y axispivotX - the X coordinate about which point the scale occurspivotY - the Y coordinate about which point the scale occurspublic Scale(double x,
double y,
double z)
x - the factor by which coordinates are scaled along the X axisy - the factor by which coordinates are scaled along the Y axisz - the factor by which coordinates are scaled along the Z axispublic Scale(double x,
double y,
double z,
double pivotX,
double pivotY,
double pivotZ)
x - the factor by which coordinates are scaled along the X axisy - the factor by which coordinates are scaled along the Y axisz - the factor by which coordinates are scaled along the Z axispivotX - the X coordinate about which point the scale occurspivotY - the Y coordinate about which point the scale occurspivotZ - the Z coordinate about which point the scale occurspublic final void setX(double value)
public final double getX()
public final DoubleProperty xProperty()
public final void setY(double value)
public final double getY()
public final DoubleProperty yProperty()
public final void setZ(double value)
public final double getZ()
public final DoubleProperty zProperty()
public final void setPivotX(double value)
public final double getPivotX()
public final DoubleProperty pivotXProperty()
public final void setPivotY(double value)
public final double getPivotY()
public final DoubleProperty pivotYProperty()
public final void setPivotZ(double value)
public final double getPivotZ()
public final DoubleProperty pivotZProperty()
public double getMxx()
Transformpublic double getMyy()
Transformpublic double getMzz()
Transformpublic double getTx()
Transformpublic double getTy()
Transformpublic double getTz()
Transformboolean computeIs2D()
TransformcomputeIs2D in class Transformboolean computeIsIdentity()
TransformcomputeIsIdentity in class Transformvoid fill2DArray(double[] array)
Transformfill2DArray in class Transformarray - array to be filled with the 6 2D elementsvoid fill3DArray(double[] array)
Transformfill3DArray in class Transformarray - array to be filled with the 12 3D elementspublic Transform createConcatenation(Transform transform)
TransformgetTransforms() list,
this transform first and the specified transform second.createConcatenation in class Transformtransform - transform to be concatenated with this transformpublic Scale createInverse() throws NonInvertibleTransformException
TransformcreateInverse in class TransformNonInvertibleTransformException - if this transform
cannot be invertedpublic Scale clone()
Transformpublic Point2D transform(double x, double y)
Transformpublic Point3D transform(double x, double y, double z)
Transformvoid transform2DPointsImpl(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transformtransform2DPointsImpl in class Transformvoid transform3DPointsImpl(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transformtransform3DPointsImpl in class Transformpublic Point2D deltaTransform(double x, double y)
TransformdeltaTransform in class Transformx - 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)
TransformdeltaTransform in class Transformx - 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
TransforminverseTransform in class Transformx - 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
TransforminverseTransform in class Transformx - the X coordinate of the pointy - the Y coordinate of the pointz - the Z coordinate of the pointNonInvertibleTransformException - if this transform
cannot be invertedvoid inverseTransform2DPointsImpl(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
throws NonInvertibleTransformException
TransforminverseTransform2DPointsImpl in class TransformNonInvertibleTransformExceptionvoid inverseTransform3DPointsImpl(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
throws NonInvertibleTransformException
TransforminverseTransform3DPointsImpl in class TransformNonInvertibleTransformExceptionpublic Point2D inverseDeltaTransform(double x, double y) throws NonInvertibleTransformException
TransforminverseDeltaTransform in class Transformx - 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
TransforminverseDeltaTransform in class Transformx - 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 java.lang.String toString()
Scale object.toString in class java.lang.ObjectScale object.@Deprecated public void impl_apply(Affine3D trans)
impl_apply in class Transform@Deprecated public BaseTransform impl_derive(BaseTransform trans)
impl_derive in class Transformvoid validate()
Transformvoid appendTo(Affine a)
TransformAffine class which provides an efficient
append operation for the subclasses.