Top Fields Constructors Methods
jogamp.graph.geom.plane

public Class AffineTransform

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
com.jogamp.graph.geom.Vertex, com.jogamp.opengl.math.FloatUtil, com.jogamp.opengl.math.geom.AABBox

Field Summary

Modifier and TypeField and Description
pack-priv static final String
pack-priv float
m00

The values of transformation matrix

pack-priv float
pack-priv float
pack-priv float
pack-priv float
pack-priv float
pack-priv transient int
type

The transformation type

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
pack-priv static final int
TYPE_UNKNOWN

The TYPE_UNKNOWN is an initial type value

pack-priv static final float
ZERO

The min value equivalent to zero.

Constructor Summary

AccessConstructor and Description
public
public
public
AffineTransform(final float m00, final float m10, final float m01, final float m11, final float m02, final float m12)

public
AffineTransform(final float[] matrix)

Method Summary

Modifier and TypeMethod and Description
public final AffineTransform
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.
public final AffineTransform

Returns:

this transform for chaining
concatenate
(final AffineTransform
the right-argument of the matrix multiplication
tR
)

Concatenates the given matrix to this.

public final AffineTransform
public final Path2D
public final Vertex

Returns:

return dst for chaining
deltaTransform
(final Vertex src, final Vertex dst)

public final void
deltaTransform(final float[] src, int srcOff, final float[] dst, int dstOff, int length)

public final boolean
equals(final Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public final float
public final void
getMatrix(final float[] matrix)

public final float
public final float
public final float
public final float
public final float
public final float
public int
public final int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
public final Vertex

Returns:

return dst for chaining
inverseTransform
(final Vertex src, final Vertex dst)

public final void
inverseTransform(final float[] src, int srcOff, final float[] dst, int dstOff, int length)

public final boolean
public static final AffineTransform

Returns:

A new AffineTransform object containing the result of [tL] X [tR].
multiply
(final AffineTransform
- the AffineTransform object is a multiplicand (left argument)
tL
,
final AffineTransform
- the AffineTransform object is a multiplier (right argument)
tR
)

Multiply matrix of two AffineTransform objects.

public final AffineTransform

Returns:

this transform for chaining
preConcatenate
(final AffineTransform
the left-argument of the matrix multiplication
tL
)

Pre-concatenates the given matrix to this.

public final AffineTransform
rotate(final float angle, final AffineTransform tmp)

public final AffineTransform
rotate(final float angle, final float px, final float py, final AffineTransform tmp)

public final AffineTransform
scale(final float scx, final float scy, final AffineTransform tmp)

public final AffineTransform
public final AffineTransform
setToRotation(final float angle)

public final AffineTransform
setToRotation(final float angle, final float px, final float py)

public final AffineTransform
setToScale(final float scx, final float scy)

public final AffineTransform
setToShear(final float shx, final float shy)

public final AffineTransform
setToTranslation(final float mx, final float my)

public final AffineTransform
setTransform(final float m00, final float m10, final float m01, final float m11, final float m02, final float m12)

public final AffineTransform
public final AffineTransform
shear(final float shx, final float shy, final AffineTransform tmp)

public final String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public final AABBox

Returns:

dst for chaining
transform
(final AABBox src, final AABBox dst)

public final Vertex

Returns:

dst for chaining
transform
(final Vertex src, final Vertex dst)

public final void
transform(final Vertex[] src, int srcOff, final Vertex[] dst, int dstOff, int length)

public final float[]

Returns:

dst for chaining
transform
(final float[]
float[2] source of transformation
src
,
final float[]
float[2] destination of transformation, maybe be equal to src
dst
)

public final void
transform(final float[] src, final int srcOff, final float[] dst, final int dstOff)

public final void
transform(final float[] src, int srcOff, final float[] dst, int dstOff, int length)

public final AffineTransform
translate(final float mx, final float my, final AffineTransform tmp)

Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

determinantIsZeroback to summary
pack-priv static final String determinantIsZero
m00back to summary
pack-priv float m00

The values of transformation matrix

m01back to summary
pack-priv float m01
m02back to summary
pack-priv float m02
m10back to summary
pack-priv float m10
m11back to summary
pack-priv float m11
m12back to summary
pack-priv float m12
typeback to summary
pack-priv transient int type

The transformation type

TYPE_FLIPback to summary
public static final int TYPE_FLIP
TYPE_GENERAL_ROTATIONback to summary
public static final int TYPE_GENERAL_ROTATION
TYPE_GENERAL_SCALEback to summary
public static final int TYPE_GENERAL_SCALE
TYPE_GENERAL_TRANSFORMback to summary
public static final int TYPE_GENERAL_TRANSFORM
TYPE_IDENTITYback to summary
public static final int TYPE_IDENTITY
TYPE_MASK_ROTATIONback to summary
public static final int TYPE_MASK_ROTATION
TYPE_MASK_SCALEback to summary
public static final int TYPE_MASK_SCALE
TYPE_QUADRANT_ROTATIONback to summary
public static final int TYPE_QUADRANT_ROTATION
TYPE_TRANSLATIONback to summary
public static final int TYPE_TRANSLATION
TYPE_UNIFORM_SCALEback to summary
public static final int TYPE_UNIFORM_SCALE
TYPE_UNKNOWNback to summary
pack-priv static final int TYPE_UNKNOWN

The TYPE_UNKNOWN is an initial type value

ZEROback to summary
pack-priv static final float ZERO

The min value equivalent to zero. If absolute value less then ZERO it considered as zero.

Constructor Detail

AffineTransformback to summary
public AffineTransform()
AffineTransformback to summary
public AffineTransform(final AffineTransform t)
AffineTransformback to summary
public AffineTransform(final float m00, final float m10, final float m01, final float m11, final float m02, final float m12)
AffineTransformback to summary
public AffineTransform(final float[] matrix)

Method Detail

cloneback to summary
public final AffineTransform clone()

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:AffineTransform

a clone of this instance.

Annotations
@Override
concatenateback to summary
public final AffineTransform concatenate(final AffineTransform tR)

Concatenates the given matrix to this.

Implementations performs the matrix multiplication:

  [this] = [this] X [tR]

Parameters
tR:AffineTransform

the right-argument of the matrix multiplication

Returns:AffineTransform

this transform for chaining

createInverseback to summary
public final AffineTransform createInverse() throws NoninvertibleTransformException
createTransformedShapeback to summary
public final Path2D createTransformedShape(final Path2D src)
deltaTransformback to summary
public final Vertex deltaTransform(final Vertex src, final Vertex dst)
Returns:Vertex

return dst for chaining

deltaTransformback to summary
public final void deltaTransform(final float[] src, int srcOff, final float[] dst, int dstOff, int length)
equalsback to summary
public final boolean equals(final Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getDeterminantback to summary
public final float getDeterminant()
getMatrixback to summary
public final void getMatrix(final float[] matrix)
getScaleXback to summary
public final float getScaleX()
getScaleYback to summary
public final float getScaleY()
getShearXback to summary
public final float getShearX()
getShearYback to summary
public final float getShearY()
getTranslateXback to summary
public final float getTranslateX()
getTranslateYback to summary
public final float getTranslateY()
getTypeback to summary
public int getType()
hashCodeback to summary
public final int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
inverseTransformback to summary
public final Vertex inverseTransform(final Vertex src, final Vertex dst) throws NoninvertibleTransformException
Returns:Vertex

return dst for chaining

inverseTransformback to summary
public final void inverseTransform(final float[] src, int srcOff, final float[] dst, int dstOff, int length) throws NoninvertibleTransformException
isIdentityback to summary
public final boolean isIdentity()
multiplyback to summary
public static final AffineTransform multiply(final AffineTransform tL, final AffineTransform tR)

Multiply matrix of two AffineTransform objects.

Parameters
tL:AffineTransform

- the AffineTransform object is a multiplicand (left argument)

tR:AffineTransform

- the AffineTransform object is a multiplier (right argument)

Returns:AffineTransform

A new AffineTransform object containing the result of [tL] X [tR].

preConcatenateback to summary
public final AffineTransform preConcatenate(final AffineTransform tL)

Pre-concatenates the given matrix to this.

Implementations performs the matrix multiplication:

  [this] = [tL] X [this]

Parameters
tL:AffineTransform

the left-argument of the matrix multiplication

Returns:AffineTransform

this transform for chaining

rotateback to summary
public final AffineTransform rotate(final float angle, final AffineTransform tmp)
rotateback to summary
public final AffineTransform rotate(final float angle, final float px, final float py, final AffineTransform tmp)
scaleback to summary
public final AffineTransform scale(final float scx, final float scy, final AffineTransform tmp)
setToIdentityback to summary
public final AffineTransform setToIdentity()
setToRotationback to summary
public final AffineTransform setToRotation(final float angle)
setToRotationback to summary
public final AffineTransform setToRotation(final float angle, final float px, final float py)
setToScaleback to summary
public final AffineTransform setToScale(final float scx, final float scy)
setToShearback to summary
public final AffineTransform setToShear(final float shx, final float shy)
setToTranslationback to summary
public final AffineTransform setToTranslation(final float mx, final float my)
setTransformback to summary
public final AffineTransform setTransform(final float m00, final float m10, final float m01, final float m11, final float m02, final float m12)
setTransformback to summary
public final AffineTransform setTransform(final AffineTransform t)
shearback to summary
public final AffineTransform shear(final float shx, final float shy, final AffineTransform tmp)
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
transformback to summary
public final AABBox transform(final AABBox src, final AABBox dst)
Returns:AABBox

dst for chaining

transformback to summary
public final Vertex transform(final Vertex src, final Vertex dst)
Returns:Vertex

dst for chaining

transformback to summary
public final void transform(final Vertex[] src, int srcOff, final Vertex[] dst, int dstOff, int length)
transformback to summary
public final float[] transform(final float[] src, final float[] dst)
Parameters
src:float[]

float[2] source of transformation

dst:float[]

float[2] destination of transformation, maybe be equal to src

Returns:float[]

dst for chaining

transformback to summary
public final void transform(final float[] src, final int srcOff, final float[] dst, final int dstOff)
transformback to summary
public final void transform(final float[] src, int srcOff, final float[] dst, int dstOff, int length)
translateback to summary
public final AffineTransform translate(final float mx, final float my, final AffineTransform tmp)