Package com.jogamp.graph.geom.plane
Class AffineTransform
- java.lang.Object
-
- com.jogamp.graph.geom.plane.AffineTransform
-
-
Field Summary
Fields Modifier and Type Field Description static intTYPE_FLIPstatic intTYPE_GENERAL_ROTATIONstatic intTYPE_GENERAL_SCALEstatic intTYPE_GENERAL_TRANSFORMstatic intTYPE_IDENTITYstatic intTYPE_MASK_ROTATIONstatic intTYPE_MASK_SCALEstatic intTYPE_QUADRANT_ROTATIONstatic intTYPE_TRANSLATIONstatic intTYPE_UNIFORM_SCALE
-
Constructor Summary
Constructors Constructor Description AffineTransform()AffineTransform(float[] matrix)AffineTransform(float m00, float m10, float m01, float m11, float m02, float m12)AffineTransform(AffineTransform t)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AffineTransformclone()AffineTransformconcatenate(AffineTransform tR)Concatenates the given matrix to this.AffineTransformcreateInverse()Path2FcreateTransformedShape(Path2F src)voiddeltaTransform(float[] src, int srcOff, float[] dst, int dstOff, int length)VertexdeltaTransform(Vertex src, Vertex dst)booleanequals(Object obj)floatgetDeterminant()voidgetMatrix(float[] matrix)floatgetScaleX()floatgetScaleY()floatgetShearX()floatgetShearY()floatgetTranslateX()floatgetTranslateY()intgetType()inthashCode()voidinverseTransform(float[] src, int srcOff, float[] dst, int dstOff, int length)VertexinverseTransform(Vertex src, Vertex dst)booleanisIdentity()static AffineTransformmultiply(AffineTransform tL, AffineTransform tR)Multiply matrix of two AffineTransform objects.AffineTransformpreConcatenate(AffineTransform tL)Pre-concatenates the given matrix to this.AffineTransformrotate(float angle, float px, float py, AffineTransform tmp)AffineTransformrotate(float angle, AffineTransform tmp)AffineTransformscale(float scx, float scy, AffineTransform tmp)AffineTransformsetToIdentity()AffineTransformsetToRotation(float angle)AffineTransformsetToRotation(float angle, float px, float py)AffineTransformsetToScale(float scx, float scy)AffineTransformsetToShear(float shx, float shy)AffineTransformsetToTranslation(float mx, float my)AffineTransformsetTransform(float m00, float m10, float m01, float m11, float m02, float m12)AffineTransformsetTransform(AffineTransform t)AffineTransformshear(float shx, float shy, AffineTransform tmp)StringtoString()float[]transform(float[] src, float[] dst)voidtransform(float[] src, int srcOff, float[] dst, int dstOff)voidtransform(float[] src, int srcOff, float[] dst, int dstOff, int length)voidtransform(Vertex[] src, int srcOff, Vertex[] dst, int dstOff, int length)Vertextransform(Vertex src, Vertex dst)AABBoxtransform(AABBox src, AABBox dst)Vec2ftransform(Vec2f src, Vec2f dst)Vec3ftransform(Vec3f src, Vec3f dst)AffineTransformtranslate(float mx, float my, AffineTransform tmp)
-
-
-
Field Detail
-
TYPE_IDENTITY
public static final int TYPE_IDENTITY
- See Also:
- Constant Field Values
-
TYPE_TRANSLATION
public static final int TYPE_TRANSLATION
- See Also:
- Constant Field Values
-
TYPE_UNIFORM_SCALE
public static final int TYPE_UNIFORM_SCALE
- See Also:
- Constant Field Values
-
TYPE_GENERAL_SCALE
public static final int TYPE_GENERAL_SCALE
- See Also:
- Constant Field Values
-
TYPE_QUADRANT_ROTATION
public static final int TYPE_QUADRANT_ROTATION
- See Also:
- Constant Field Values
-
TYPE_GENERAL_ROTATION
public static final int TYPE_GENERAL_ROTATION
- See Also:
- Constant Field Values
-
TYPE_GENERAL_TRANSFORM
public static final int TYPE_GENERAL_TRANSFORM
- See Also:
- Constant Field Values
-
TYPE_FLIP
public static final int TYPE_FLIP
- See Also:
- Constant Field Values
-
TYPE_MASK_SCALE
public static final int TYPE_MASK_SCALE
- See Also:
- Constant Field Values
-
TYPE_MASK_ROTATION
public static final int TYPE_MASK_ROTATION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AffineTransform
public AffineTransform()
-
AffineTransform
public AffineTransform(AffineTransform t)
-
AffineTransform
public AffineTransform(float m00, float m10, float m01, float m11, float m02, float m12)
-
AffineTransform
public AffineTransform(float[] matrix)
-
-
Method Detail
-
getType
public int getType()
-
getScaleX
public final float getScaleX()
-
getScaleY
public final float getScaleY()
-
getShearX
public final float getShearX()
-
getShearY
public final float getShearY()
-
getTranslateX
public final float getTranslateX()
-
getTranslateY
public final float getTranslateY()
-
isIdentity
public final boolean isIdentity()
-
getMatrix
public final void getMatrix(float[] matrix)
-
getDeterminant
public final float getDeterminant()
-
setTransform
public final AffineTransform setTransform(float m00, float m10, float m01, float m11, float m02, float m12)
-
setTransform
public final AffineTransform setTransform(AffineTransform t)
-
setToIdentity
public final AffineTransform setToIdentity()
-
setToTranslation
public final AffineTransform setToTranslation(float mx, float my)
-
setToScale
public final AffineTransform setToScale(float scx, float scy)
-
setToShear
public final AffineTransform setToShear(float shx, float shy)
-
setToRotation
public final AffineTransform setToRotation(float angle)
-
setToRotation
public final AffineTransform setToRotation(float angle, float px, float py)
-
translate
public final AffineTransform translate(float mx, float my, AffineTransform tmp)
-
scale
public final AffineTransform scale(float scx, float scy, AffineTransform tmp)
-
shear
public final AffineTransform shear(float shx, float shy, AffineTransform tmp)
-
rotate
public final AffineTransform rotate(float angle, AffineTransform tmp)
-
rotate
public final AffineTransform rotate(float angle, float px, float py, AffineTransform tmp)
-
multiply
public static final AffineTransform multiply(AffineTransform tL, AffineTransform tR)
Multiply matrix of two AffineTransform objects.- Parameters:
tL- - the AffineTransform object is a multiplicand (left argument)tR- - the AffineTransform object is a multiplier (right argument)- Returns:
- A new AffineTransform object containing the result of [tL] X [tR].
-
concatenate
public final AffineTransform concatenate(AffineTransform tR)
Concatenates the given matrix to this.Implementations performs the matrix multiplication:
[this] = [this] X [tR]
- Parameters:
tR- the right-argument of the matrix multiplication- Returns:
- this transform for chaining
-
preConcatenate
public final AffineTransform preConcatenate(AffineTransform tL)
Pre-concatenates the given matrix to this.Implementations performs the matrix multiplication:
[this] = [tL] X [this]
- Parameters:
tL- the left-argument of the matrix multiplication- Returns:
- this transform for chaining
-
createInverse
public final AffineTransform createInverse() throws NoninvertibleTransformException
- Throws:
NoninvertibleTransformException
-
transform
public final AABBox transform(AABBox src, AABBox dst)
- Parameters:
src-dst-- Returns:
- dst for chaining
-
transform
public final Vertex transform(Vertex src, Vertex dst)
- Parameters:
src-dst-- Returns:
- dst for chaining
-
transform
public final void transform(Vertex[] src, int srcOff, Vertex[] dst, int dstOff, int length)
-
transform
public final float[] transform(float[] src, float[] dst)- Parameters:
src- float[2] source of transformationdst- float[2] destination of transformation, maybe be equal tosrc- Returns:
- dst for chaining
-
transform
public final void transform(float[] src, int srcOff, float[] dst, int dstOff)
-
transform
public final void transform(float[] src, int srcOff, float[] dst, int dstOff, int length)
-
transform
public final Vec2f transform(Vec2f src, Vec2f dst)
- Parameters:
src- source of transformationdst- destination of transformation, maybe be equal tosrc- Returns:
- dst for chaining
-
transform
public final Vec3f transform(Vec3f src, Vec3f dst)
- Parameters:
src- source of transformationdst- destination of transformation, maybe be equal tosrc- Returns:
- dst for chaining
-
deltaTransform
public final Vertex deltaTransform(Vertex src, Vertex dst)
- Parameters:
src-dst-- Returns:
- return dst for chaining
-
deltaTransform
public final void deltaTransform(float[] src, int srcOff, float[] dst, int dstOff, int length)
-
inverseTransform
public final Vertex inverseTransform(Vertex src, Vertex dst) throws NoninvertibleTransformException
- Parameters:
src-dst-- Returns:
- return dst for chaining
- Throws:
NoninvertibleTransformException
-
inverseTransform
public final void inverseTransform(float[] src, int srcOff, float[] dst, int dstOff, int length) throws NoninvertibleTransformException- Throws:
NoninvertibleTransformException
-
clone
public final AffineTransform clone()
-
-