|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object math.geom2d.AffineTransform2D
public class AffineTransform2D
Base class for generic affine transforms in the plane. They include rotations, translations, shears, homotheties, and combinations of these. Such transformations can be constructed by using coefficients specification, or by creating specialized instances, by using static methods.
Field Summary | |
---|---|
protected double |
m00
|
protected double |
m01
|
protected double |
m02
|
protected double |
m10
|
protected double |
m11
|
protected double |
m12
|
Constructor Summary | |
---|---|
AffineTransform2D()
Main constructor |
|
AffineTransform2D(AffineTransform2D trans)
constructor by copy of an existing transform |
|
AffineTransform2D(double[] coefs)
|
|
AffineTransform2D(double xx,
double yx,
double tx,
double xy,
double yy,
double ty)
|
Method Summary | |
---|---|
AffineTransform2D |
chain(AffineTransform2D that)
Return the affine transform created by applying first this affine transform, then the affine transform given by that . |
AffineTransform2D |
clone()
|
AffineTransform2D |
compose(AffineTransform2D that)
Deprecated. replaced by concatenate() method (0.6.3) |
AffineTransform2D |
concatenate(AffineTransform2D that)
Return the affine transform created by applying first the affine transform given by that , then this affine transform. |
static AffineTransform2D |
create(AffineTransform2D trans)
Creates a new affine transform by copying coefficients. |
static AffineTransform2D |
create(double[] coefs)
|
static AffineTransform2D |
create(double xx,
double yx,
double tx,
double xy,
double yy,
double ty)
|
static AffineTransform2D |
createGlideReflection(LinearShape2D line,
double distance)
|
static AffineTransform2D |
createHomothecy(Point2D center,
double k)
|
static AffineTransform2D |
createIdentity()
|
static AffineTransform2D |
createLineReflection(LinearShape2D line)
|
static AffineTransform2D |
createPointReflection(Point2D center)
Return a point reflection centered on a point. |
static AffineTransform2D |
createQuadrantRotation(int numQuadrant)
|
static AffineTransform2D |
createRotation(double angle)
Return a rotation around the origin, with angle in radians. |
static AffineTransform2D |
createRotation(double cx,
double cy,
double angle)
Return a rotation around the specified point, with angle in radians. |
static AffineTransform2D |
createRotation(Point2D center,
double angle)
Return a rotation around the specified point, with angle in radians. |
static AffineTransform2D |
createScaling(double sx,
double sy)
Return a scaling by the given coefficients, centered on the origin. |
static AffineTransform2D |
createScaling(Point2D center,
double sx,
double sy)
Return a scaling by the given coefficients, centered on the given point. |
static AffineTransform2D |
createShear(double shx,
double shy)
Creates a Shear transform, using the classical Java notation. |
static AffineTransform2D |
createTranslation(double dx,
double dy)
Return a translation by the given vector. |
static AffineTransform2D |
createTranslation(Vector2D vect)
Return a translation by the given vector. |
boolean |
equals(Object obj)
|
double[][] |
getAffineMatrix()
Returns the 3x3 square matrix representing the transform. |
double[] |
getCoefficients()
Returns coefficients of the transform in a linear array of 6 double. |
AffineTransform2D |
getInverseTransform()
Deprecated. use invert() method instead (0.6.3) |
AffineTransform2D |
invert()
Return the inverse transform. |
boolean |
isDirect()
|
static boolean |
isDirect(AffineTransform2D trans)
Checks if the transform is direct, i.e. |
boolean |
isIdentity()
|
static boolean |
isIdentity(AffineTransform2D trans)
Checks if the given transform is the identity transform. |
boolean |
isIsometry()
|
static boolean |
isIsometry(AffineTransform2D trans)
Checks if the transform is an isometry, i.e. |
boolean |
isMotion()
|
static boolean |
isMotion(AffineTransform2D trans)
Checks if the transform is a motion, i.e. |
boolean |
isSimilarity()
|
static boolean |
isSimilarity(AffineTransform2D trans)
Checks if the transform is an similarity, i.e. |
AffineTransform2D |
preConcatenate(AffineTransform2D that)
Return the affine transform created by applying first this affine transform, then the affine transform given by that . |
String |
toString()
Displays the coefficients of the transform, row by row. |
Point2D |
transform(Point2D src)
Transforms a point |
Point2D[] |
transform(Point2D[] src,
Point2D[] dst)
Transforms an array of points, and returns the transformed points. |
Point2D |
transform(Point2D src,
Point2D dst)
Deprecated. use point.transform() instead. (0.7.0) |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double m00
protected double m01
protected double m02
protected double m10
protected double m11
protected double m12
Constructor Detail |
---|
public AffineTransform2D()
public AffineTransform2D(AffineTransform2D trans)
public AffineTransform2D(double[] coefs)
public AffineTransform2D(double xx, double yx, double tx, double xy, double yy, double ty)
Method Detail |
---|
public static final AffineTransform2D createIdentity()
public static final AffineTransform2D create(AffineTransform2D trans)
public static final AffineTransform2D create(double[] coefs)
public static final AffineTransform2D create(double xx, double yx, double tx, double xy, double yy, double ty)
public static final AffineTransform2D createGlideReflection(LinearShape2D line, double distance)
public static final AffineTransform2D createHomothecy(Point2D center, double k)
public static final AffineTransform2D createLineReflection(LinearShape2D line)
public static final AffineTransform2D createPointReflection(Point2D center)
center
- the center of the reflection
public static final AffineTransform2D createQuadrantRotation(int numQuadrant)
public static final AffineTransform2D createRotation(double angle)
public static final AffineTransform2D createRotation(Point2D center, double angle)
public static final AffineTransform2D createRotation(double cx, double cy, double angle)
public static final AffineTransform2D createScaling(double sx, double sy)
public static final AffineTransform2D createScaling(Point2D center, double sx, double sy)
public static final AffineTransform2D createShear(double shx, double shy)
shx
- shear in x-axisshy
- shear in y-axis
public static final AffineTransform2D createTranslation(Vector2D vect)
public static final AffineTransform2D createTranslation(double dx, double dy)
public static final boolean isIdentity(AffineTransform2D trans)
public static final boolean isDirect(AffineTransform2D trans)
public static final boolean isIsometry(AffineTransform2D trans)
public static final boolean isMotion(AffineTransform2D trans)
public static final boolean isSimilarity(AffineTransform2D trans)
public double[] getCoefficients()
public double[][] getAffineMatrix()
@Deprecated public AffineTransform2D compose(AffineTransform2D that)
that
, then this affine transform.
that
- the transform to apply first
public AffineTransform2D concatenate(AffineTransform2D that)
that
, then this affine transform. This
the equivalent method of the 'concatenate' method in
java.awt.geom.AffineTransform.
that
- the transform to apply first
public AffineTransform2D chain(AffineTransform2D that)
that
. This
the equivalent method of the 'preConcatenate' method in
java.awt.geom.AffineTransform.
shape = shape.transform(T1.chain(T2).chain(T3));
is equivalent to the sequence:
shape = shape.transform(T1);
shape = shape.transform(T2);
shape = shape.transform(T3);
that
- the transform to apply in a second step
public AffineTransform2D preConcatenate(AffineTransform2D that)
that
. This
the equivalent method of the 'preConcatenate' method in
java.awt.geom.AffineTransform.
that
- the transform to apply in a second step
public boolean isSimilarity()
public boolean isMotion()
public boolean isIsometry()
public boolean isDirect()
public boolean isIdentity()
public AffineTransform2D invert()
@Deprecated public AffineTransform2D getInverseTransform()
getInverseTransform
in interface Bijection2D
public Point2D[] transform(Point2D[] src, Point2D[] dst)
Transform2D
transform
in interface Transform2D
public Point2D transform(Point2D src)
Transform2D
transform
in interface Transform2D
@Deprecated public Point2D transform(Point2D src, Point2D dst)
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public AffineTransform2D clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |