pythagoras.d

## Class IdentityTransform

• All Implemented Interfaces:
Transform

```public class IdentityTransform
extends AbstractTransform```
Implements the identity transform.
• ### Field Summary

Fields
Modifier and Type Field and Description
`static int` `GENERALITY`
Identifies the identity transform in `generality()`.
• ### Constructor Summary

Constructors
Constructor and Description
`IdentityTransform()`
• ### Method Summary

All Methods
Modifier and Type Method and Description
`Transform` `concatenate(Transform other)`
Returns a new transform comprised of the concatenation of `other` to this transform (i.e.
`IdentityTransform` `copy()`
Returns a copy of this transform.
`int` `generality()`
Returns an integer that increases monotonically with the generality of the transform implementation.
`void` `get(double[] matrix)`
Copies the affine transform matrix into the supplied array.
`Point` ```inverseTransform(IPoint p, Point into)```
Inverse transforms the supplied point, writing the result into `into`.
`Vector` ```inverseTransform(IVector v, Vector into)```
Inverse transforms the supplied vector, writing the result into `into`.
`Transform` `invert()`
Returns a new transform that represents the inverse of this transform.
`Transform` ```lerp(Transform other, double t)```
Returns a new transform comprised of the linear interpolation between this transform and the specified other.
`Transform` `preConcatenate(Transform other)`
Returns a new transform comprised of the concatenation of this transform to `other` (i.e.
`double` `rotation()`
Returns the rotation applied by this transform.
`double` `scaleX()`
Returns the x-component of the scale applied by this transform.
`double` `scaleY()`
Returns the y-component of the scale applied by this transform.
`String` `toString()`
`void` ```transform(double[] src, int srcOff, double[] dst, int dstOff, int count)```
Transforms the supplied points.
`void` ```transform(IPoint[] src, int srcOff, Point[] dst, int dstOff, int count)```
Transforms the supplied points.
`Point` ```transform(IPoint p, Point into)```
Transforms the supplied point, writing the result into `into`.
`Vector` ```transform(IVector v, Vector into)```
Transforms the supplied vector, writing the result into `into`.
`Vector` ```transformPoint(IVector v, Vector into)```
Transforms the supplied vector as a point (accounting for translation), writing the result into `into`.
`double` `tx()`
Returns the x-coordinate of the translation component.
`double` `ty()`
Returns the y-coordinate of the translation component.
`double` `uniformScale()`
Returns the uniform scale applied by this transform.
• ### Methods inherited from class pythagoras.d.AbstractTransform

`clone, rotate, scale, scale, scaleX, scaleY, setRotation, setScale, setScaleX, setScaleY, setTransform, setTranslation, setTx, setTy, setUniformScale, shear, shearX, shearY, translate, translateX, translateY, translation, uniformScale`
• ### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`
• ### Constructor Detail

• #### IdentityTransform

`public IdentityTransform()`
• ### Method Detail

• #### uniformScale

`public double uniformScale()`
Description copied from interface: `Transform`
Returns the uniform scale applied by this transform. The uniform scale will be approximated for non-uniform transforms.
• #### scaleX

`public double scaleX()`
Description copied from interface: `Transform`
Returns the x-component of the scale applied by this transform. Note that this will be extracted and therefore approximate for affine transforms.
• #### scaleY

`public double scaleY()`
Description copied from interface: `Transform`
Returns the y-component of the scale applied by this transform. Note that this will be extracted and therefore approximate for affine transforms.
• #### rotation

`public double rotation()`
Description copied from interface: `Transform`
Returns the rotation applied by this transform. Note that the rotation is extracted and therefore approximate for affine transforms.
• #### tx

`public double tx()`
Description copied from interface: `Transform`
Returns the x-coordinate of the translation component.
• #### ty

`public double ty()`
Description copied from interface: `Transform`
Returns the y-coordinate of the translation component.
• #### get

`public void get(double[] matrix)`
Description copied from interface: `Transform`
Copies the affine transform matrix into the supplied array.
Parameters:
`matrix` - the array which receives `m00, m01, m10, m11, tx, ty`.
• #### invert

`public Transform invert()`
Description copied from interface: `Transform`
Returns a new transform that represents the inverse of this transform.
• #### concatenate

`public Transform concatenate(Transform other)`
Description copied from interface: `Transform`
Returns a new transform comprised of the concatenation of `other` to this transform (i.e. `this x other`).
• #### preConcatenate

`public Transform preConcatenate(Transform other)`
Description copied from interface: `Transform`
Returns a new transform comprised of the concatenation of this transform to `other` (i.e. `other x this`).
• #### lerp

```public Transform lerp(Transform other,
double t)```
Description copied from interface: `Transform`
Returns a new transform comprised of the linear interpolation between this transform and the specified other.
• #### transform

```public Point transform(IPoint p,
Point into)```
Description copied from interface: `Transform`
Transforms the supplied point, writing the result into `into`.
`into` - a point into which to store the result, may be the same object as `p`.
Returns:
`into` for chaining.
• #### transform

```public void transform(IPoint[] src,
int srcOff,
Point[] dst,
int dstOff,
int count)```
Description copied from interface: `Transform`
Transforms the supplied points.
Parameters:
`src` - the points to be transformed.
`srcOff` - the offset into the `src` array at which to start.
`dst` - the points into which to store the transformed points. May be `src`.
`dstOff` - the offset into the `dst` array at which to start.
`count` - the number of points to transform.
• #### transform

```public void transform(double[] src,
int srcOff,
double[] dst,
int dstOff,
int count)```
Description copied from interface: `Transform`
Transforms the supplied points.
Parameters:
`src` - the points to be transformed (as `[x, y, x, y, ...]`).
`srcOff` - the offset into the `src` array at which to start.
`dst` - the points into which to store the transformed points. May be `src`.
`dstOff` - the offset into the `dst` array at which to start.
`count` - the number of points to transform.
• #### inverseTransform

```public Point inverseTransform(IPoint p,
Point into)```
Description copied from interface: `Transform`
Inverse transforms the supplied point, writing the result into `into`.
`into` - a point into which to store the result, may be the same object as `p`.
Returns:
`into`, for chaining.
• #### transformPoint

```public Vector transformPoint(IVector v,
Vector into)```
Description copied from interface: `Transform`
Transforms the supplied vector as a point (accounting for translation), writing the result into `into`.
`into` - a vector into which to store the result, may be the same object as `v`.
Returns:
`into`, for chaining.
• #### transform

```public Vector transform(IVector v,
Vector into)```
Description copied from interface: `Transform`
Transforms the supplied vector, writing the result into `into`.
`into` - a vector into which to store the result, may be the same object as `v`.
Returns:
`into`, for chaining.
• #### inverseTransform

```public Vector inverseTransform(IVector v,
Vector into)```
Description copied from interface: `Transform`
Inverse transforms the supplied vector, writing the result into `into`.
`into` - a vector into which to store the result, may be the same object as `v`.
Returns:
`into`, for chaining.
• #### copy

`public IdentityTransform copy()`
Description copied from interface: `Transform`
Returns a copy of this transform.
Specified by:
`copy` in interface `Transform`
Specified by:
`copy` in class `AbstractTransform`
• #### generality

`public int generality()`
Description copied from interface: `Transform`
Returns an integer that increases monotonically with the generality of the transform implementation. Used internally when combining transforms.
• #### toString

`public String toString()`
Overrides:
`toString` in class `Object`