math.geom2d.transform
Class Homothecy2D
java.lang.Object
math.geom2d.transform.AbstractAffineTransform2D
math.geom2d.transform.Homothecy2D
- All Implemented Interfaces:
- AffineTransform2D, Bijection2D, Similarity2D, Transform2D
- Direct Known Subclasses:
- LinearHomothecy2D, PointSymmetry2D
public class Homothecy2D
- extends AbstractAffineTransform2D
- implements Similarity2D
Defines a homothetic transform.
|
Field Summary |
protected double |
k
|
protected double |
x0
|
protected double |
y0
|
|
Constructor Summary |
Homothecy2D(double k)
Defines a homothetie with factor k centered at the origin. |
Homothecy2D(double xp,
double yp,
double k)
|
Homothecy2D(java.awt.geom.Point2D point,
double k)
|
| Methods inherited from class math.geom2d.transform.AbstractAffineTransform2D |
compose, createRotation, createRotation, createRotation, createScaling, createScaling, createTranslation, createTranslation, equals, isDirect, isDirect, isIdentity, isIdentity, isIsometry, isIsometry, isMotion, isSimilarity, isSimilarity, transform, transform, transform |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
x0
protected double x0
y0
protected double y0
k
protected double k
Homothecy2D
public Homothecy2D(double k)
- Defines a homothetie with factor k centered at the origin.
Homothecy2D
public Homothecy2D(java.awt.geom.Point2D point,
double k)
Homothecy2D
public Homothecy2D(double xp,
double yp,
double k)
isMotion
public boolean isMotion()
- The homothety is a motion if the dilation factor is equal to 1.
- Specified by:
isMotion in interface AffineTransform2D- Overrides:
isMotion in class AbstractAffineTransform2D
- Returns:
- true in case of motion.
getCoefficients
public double[] getCoefficients()
- Description copied from interface:
AffineTransform2D
- return coefficients of the transform. Result is an array of 6 double.
- Specified by:
getCoefficients in interface AffineTransform2D
getAffineMatrix
public double[][] getAffineMatrix()
- Description copied from interface:
AffineTransform2D
- return matrix of the transform coefficients. Result is a 2x3 array of double.
- Specified by:
getAffineMatrix in interface AffineTransform2D
getInverseTransform
public Homothecy2D getInverseTransform()
- Specified by:
getInverseTransform in interface Bijection2D
getScalingFactor
public double getScalingFactor()
- Description copied from interface:
Similarity2D
- Returns the scaling factor of the transform. The scaling factor is
positive for direct transforms.
- Specified by:
getScalingFactor in interface Similarity2D
- Returns:
- the scaling factor of the transform.
getLinearPart
public LinearHomothecy2D getLinearPart()
- Specified by:
getLinearPart in interface Similarity2D
- Returns:
- the linear part of the transform.
getTranslationPart
public Translation2D getTranslationPart()
- Specified by:
getTranslationPart in interface Similarity2D
- Returns:
- the translation part of the transform.