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 int
TYPE_FLIP
static int
TYPE_GENERAL_ROTATION
static int
TYPE_GENERAL_SCALE
static int
TYPE_GENERAL_TRANSFORM
static int
TYPE_IDENTITY
static int
TYPE_MASK_ROTATION
static int
TYPE_MASK_SCALE
static int
TYPE_QUADRANT_ROTATION
static int
TYPE_TRANSLATION
static int
TYPE_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 AffineTransform
clone()
AffineTransform
concatenate(AffineTransform tR)
Concatenates the given matrix to this.AffineTransform
createInverse()
Path2F
createTransformedShape(Path2F src)
void
deltaTransform(float[] src, int srcOff, float[] dst, int dstOff, int length)
Vertex
deltaTransform(Vertex src, Vertex dst)
boolean
equals(Object obj)
float
getDeterminant()
void
getMatrix(float[] matrix)
float
getScaleX()
float
getScaleY()
float
getShearX()
float
getShearY()
float
getTranslateX()
float
getTranslateY()
int
getType()
int
hashCode()
void
inverseTransform(float[] src, int srcOff, float[] dst, int dstOff, int length)
Vertex
inverseTransform(Vertex src, Vertex dst)
boolean
isIdentity()
static AffineTransform
multiply(AffineTransform tL, AffineTransform tR)
Multiply matrix of two AffineTransform objects.AffineTransform
preConcatenate(AffineTransform tL)
Pre-concatenates the given matrix to this.AffineTransform
rotate(float angle, float px, float py, AffineTransform tmp)
AffineTransform
rotate(float angle, AffineTransform tmp)
AffineTransform
scale(float scx, float scy, AffineTransform tmp)
AffineTransform
setToIdentity()
AffineTransform
setToRotation(float angle)
AffineTransform
setToRotation(float angle, float px, float py)
AffineTransform
setToScale(float scx, float scy)
AffineTransform
setToShear(float shx, float shy)
AffineTransform
setToTranslation(float mx, float my)
AffineTransform
setTransform(float m00, float m10, float m01, float m11, float m02, float m12)
AffineTransform
setTransform(AffineTransform t)
AffineTransform
shear(float shx, float shy, AffineTransform tmp)
String
toString()
float[]
transform(float[] src, float[] dst)
void
transform(float[] src, int srcOff, float[] dst, int dstOff)
void
transform(float[] src, int srcOff, float[] dst, int dstOff, int length)
void
transform(Vertex[] src, int srcOff, Vertex[] dst, int dstOff, int length)
Vertex
transform(Vertex src, Vertex dst)
AABBox
transform(AABBox src, AABBox dst)
Vec2f
transform(Vec2f src, Vec2f dst)
Vec3f
transform(Vec3f src, Vec3f dst)
AffineTransform
translate(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()
-
-