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 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
FieldsModifier and TypeFieldDescriptionprivate double
cXX * cYY - cYX * cXY.private double
cXX * cY1 - cYX * cX1.private double
cXY * cY1 - cYY * cX1.private double
Transform addendum for output abscissa.private double
Transform factor between input abscissa and output abscissa.private double
Transform factor between input ordinate and output abscissa.private double
Transform addendum for output ordinate.private double
Transform factor between input abscissa and output ordinate.private double
Transform factor between input ordinate and output ordinate. -
Constructor Summary
ConstructorsConstructorDescriptionLineTransform
(double cXX, double cYX, double cXY, double cYY, double cX1, double cY1) Build an affine line transform from a nAffineTransform
. -
Method Summary
Modifier and TypeMethodDescriptionapply
(Hyperplane<Euclidean2D> hyperplane) Transform an hyperplane of a space.apply
(SubHyperplane<Euclidean1D> sub, Hyperplane<Euclidean2D> original, Hyperplane<Euclidean2D> transformed) Transform a sub-hyperplane embedded in an hyperplane.apply
(Point<Euclidean2D> point) Transform a point of a space.
-
Field Details
-
cXX
private double cXXTransform factor between input abscissa and output abscissa. -
cYX
private double cYXTransform factor between input abscissa and output ordinate. -
cXY
private double cXYTransform factor between input ordinate and output abscissa. -
cYY
private double cYYTransform factor between input ordinate and output ordinate. -
cX1
private double cX1Transform addendum for output abscissa. -
cY1
private double cY1Transform addendum for output ordinate. -
c1Y
private double c1YcXY * cY1 - cYY * cX1. -
c1X
private double c1XcXX * cY1 - cYX * cX1. -
c11
private double c11cXX * cYY - cYX * cXY.
-
-
Constructor Details
-
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 Details
-
apply
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
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
-