Class Line.LineTransform
- java.lang.Object
-
- org.apache.commons.math3.geometry.euclidean.twod.Line.LineTransform
-
- All Implemented Interfaces:
Transform<Euclidean2D,Euclidean1D>
- Enclosing class:
- Line
private static class Line.LineTransform extends java.lang.Object implements Transform<Euclidean2D,Euclidean1D>
Class embedding an affine transform.This class is used in order to apply an affine transform to a line. Using a specific object allow to perform some computations on the transform only once even if the same transform is to be applied to a large number of lines (for example to a large polygon)./
-
-
Field Summary
Fields Modifier and Type Field Description private double
c11
cXX * cYY - cYX * cXY.private double
c1X
cXX * cY1 - cYX * cX1.private double
c1Y
cXY * cY1 - cYY * cX1.private double
cX1
Transform addendum for output abscissa.private double
cXX
Transform factor between input abscissa and output abscissa.private double
cXY
Transform factor between input ordinate and output abscissa.private double
cY1
Transform addendum for output ordinate.private double
cYX
Transform factor between input abscissa and output ordinate.private double
cYY
Transform factor between input ordinate and output ordinate.
-
Constructor Summary
Constructors Constructor Description LineTransform(double cXX, double cYX, double cXY, double cYY, double cX1, double cY1)
Build an affine line transform from a nAffineTransform
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Line
apply(Hyperplane<Euclidean2D> hyperplane)
Transform an hyperplane of a space.SubHyperplane<Euclidean1D>
apply(SubHyperplane<Euclidean1D> sub, Hyperplane<Euclidean2D> original, Hyperplane<Euclidean2D> transformed)
Transform a sub-hyperplane embedded in an hyperplane.Vector2D
apply(Point<Euclidean2D> point)
Transform a point of a space.
-
-
-
Field Detail
-
cXX
private double cXX
Transform factor between input abscissa and output abscissa.
-
cYX
private double cYX
Transform factor between input abscissa and output ordinate.
-
cXY
private double cXY
Transform factor between input ordinate and output abscissa.
-
cYY
private double cYY
Transform factor between input ordinate and output ordinate.
-
cX1
private double cX1
Transform addendum for output abscissa.
-
cY1
private double cY1
Transform addendum for output ordinate.
-
c1Y
private double c1Y
cXY * cY1 - cYY * cX1.
-
c1X
private double c1X
cXX * cY1 - cYX * cX1.
-
c11
private double c11
cXX * cYY - cYX * cXY.
-
-
Constructor Detail
-
LineTransform
LineTransform(double cXX, double cYX, double cXY, double cYY, double cX1, double cY1) throws MathIllegalArgumentException
Build an affine line transform from a nAffineTransform
.- Parameters:
cXX
- transform factor between input abscissa and output abscissacYX
- transform factor between input abscissa and output ordinatecXY
- transform factor between input ordinate and output abscissacYY
- transform factor between input ordinate and output ordinatecX1
- transform addendum for output abscissacY1
- transform addendum for output ordinate- Throws:
MathIllegalArgumentException
- if the transform is non invertible- Since:
- 3.6
-
-
Method Detail
-
apply
public Vector2D apply(Point<Euclidean2D> point)
Transform a point of a space.- Specified by:
apply
in interfaceTransform<Euclidean2D,Euclidean1D>
- Parameters:
point
- point to transform- Returns:
- a new object representing the transformed point
-
apply
public Line apply(Hyperplane<Euclidean2D> hyperplane)
Transform an hyperplane of a space.- Specified by:
apply
in interfaceTransform<Euclidean2D,Euclidean1D>
- Parameters:
hyperplane
- hyperplane to transform- Returns:
- a new object representing the transformed hyperplane
-
apply
public SubHyperplane<Euclidean1D> apply(SubHyperplane<Euclidean1D> sub, Hyperplane<Euclidean2D> original, Hyperplane<Euclidean2D> transformed)
Transform a sub-hyperplane embedded in an hyperplane.- Specified by:
apply
in interfaceTransform<Euclidean2D,Euclidean1D>
- Parameters:
sub
- sub-hyperplane to transformoriginal
- hyperplane in which the sub-hyperplane is defined (this is the original hyperplane, the transform has not been applied to it)transformed
- hyperplane in which the sub-hyperplane is defined (this is the transformed hyperplane, the transform has been applied to it)- Returns:
- a new object representing the transformed sub-hyperplane
-
-