|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmath.geom2d.transform.AbstractAffineTransform2D
public abstract class AbstractAffineTransform2D
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.
To implement an affine transform, use either
GenericAffineTransform2D, or a specialized class like
Translation2D, Rotation2D, Homothecy2D...
| Nested Class Summary | |
|---|---|
static class |
AbstractAffineTransform2D.Identity2D
|
| Constructor Summary | |
|---|---|
AbstractAffineTransform2D()
|
|
| Method Summary | |
|---|---|
AffineTransform2D |
compose(AffineTransform2D that)
Return the composition of this affine transform with the given affine transform. |
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 |
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(java.lang.Object obj)
|
boolean |
isDirect()
Check if the transform is direct, i.e. it preserves the orientation of transformed shapes. |
static boolean |
isDirect(AffineTransform2D trans)
Check if the transform is direct, i.e. it preserves the orientation of transformed shapes. |
boolean |
isIdentity()
Check if the transform is equivalent to the identity transform. |
static boolean |
isIdentity(AffineTransform2D trans)
|
boolean |
isIsometry()
Check if the transform is an isometry, i.e. a compound of translation, rotation and reflection. |
static boolean |
isIsometry(AffineTransform2D trans)
Check if the transform is an isometry, i.e. a compound of translation, rotation and reflection. |
boolean |
isMotion()
Check if the transform is a motion, i.e. a compound of translations and rotation. |
static boolean |
isMotion(AffineTransform2D trans)
Check if the transform is a motion, i.e. a compound of translations and rotation. |
boolean |
isSimilarity()
|
static boolean |
isSimilarity(AffineTransform2D trans)
Check if the transform is an similarity, i.e. transformation which keeps unchanged the global shape, up to a scaling factor. |
Point2D |
transform(java.awt.geom.Point2D src)
Transforms a point |
Point2D[] |
transform(java.awt.geom.Point2D[] src,
Point2D[] dst)
Transforms an array of points, and returns the transformed points. |
Point2D |
transform(java.awt.geom.Point2D src,
Point2D dst)
Transforms a point, share memory |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface math.geom2d.transform.AffineTransform2D |
|---|
getAffineMatrix, getCoefficients |
| Methods inherited from interface math.geom2d.transform.Bijection2D |
|---|
getInverseTransform |
| Constructor Detail |
|---|
public AbstractAffineTransform2D()
| Method Detail |
|---|
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 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 AffineTransform2D compose(AffineTransform2D that)
AffineTransform2Dthis
and that, the result can be represented by matrix
this*that.
compose in interface AffineTransform2Dthat - the transform to compose with
public boolean isSimilarity()
isSimilarity in interface AffineTransform2Dpublic boolean isMotion()
AffineTransform2D
isMotion in interface AffineTransform2Dpublic boolean isIsometry()
AffineTransform2D
isIsometry in interface AffineTransform2Dpublic boolean isDirect()
AffineTransform2D
isDirect in interface AffineTransform2Dpublic boolean isIdentity()
AffineTransform2D
isIdentity in interface AffineTransform2D
public Point2D[] transform(java.awt.geom.Point2D[] src,
Point2D[] dst)
Transform2D
transform in interface Transform2Dpublic Point2D transform(java.awt.geom.Point2D src)
Transform2D
transform in interface Transform2D
public Point2D transform(java.awt.geom.Point2D src,
Point2D dst)
Transform2D
transform in interface Transform2Dpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||