Package com.irurueta.geometry
Class Transformation3D
java.lang.Object
com.irurueta.geometry.Transformation3D
- Direct Known Subclasses:
AffineTransformation3D,EuclideanTransformation3D,ProjectiveTransformation3D
This class performs transformations on 3D space.
Transformations can be applied to any 3D geometric figure.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract com.irurueta.algebra.MatrixasMatrix()Represents this transformation as a 4x4 matrix.abstract voidasMatrix(com.irurueta.algebra.Matrix m) Represents this transformation as a 4x4 matrix and stores the result in provided instance.voidtransform(DualQuadric dualQuadric) Transforms and updates a dual quadric using this transformation.abstract voidtransform(DualQuadric inputDualQuadric, DualQuadric outputDualQuadric) Transforms a dual quadric using this transformation and stores the result into provided output dual quadric.voidTransforms and updates provided line using this transformation.voidTransforms provided input line using this transformation and stores the result into provided output line instance.voidtransform(PinholeCamera camera) Transforms and updates provided camera using this transformation.abstract voidtransform(PinholeCamera inputCamera, PinholeCamera outputCamera) Transforms a camera using this transformation and stores the result into provided output camera.voidTransforms and updates provided plane using this transformation.abstract voidTransforms provided input plane using this transformation and stores the result into provided output plane instance.voidTransforms and updates provided point.abstract voidTransforms input point using this transformation and stores the result in provided output points.voidTransforms and updates provided polygon using this transformation.voidTransforms provided input polygon using this transformation and stores the result into provided output polygon instance.voidTransforms and updates provided quadric.abstract voidTransforms a quadric using this transformation and stores the result into provided output quadric.voidtransform(Triangle3D triangle) Transforms and updates provided input triangle using this transformation.voidtransform(Triangle3D inputTriangle, Triangle3D outputTriangle) Transforms provided input triangle using this transformation and stores the result into provided output triangle instance.voidtransformAndOverwriteLines(List<Line3D> lines) Transforms provided list of lines using this transformation and overwriting their previous values.voidtransformAndOverwritePlanes(List<Plane> planes) Transforms provided list of planes using this transformation and overwriting their previous values.voidtransformAndOverwritePoints(List<Point3D> points) Transforms provided list of points using this transformation and overwriting their previous values.transformAndReturnNew(DualQuadric inputDualQuadric) Transforms a dual quadric using this transformation and returns a new one.transformAndReturnNew(Line3D inputLine) Transforms provided line using this transformation and returns a new one.transformAndReturnNew(PinholeCamera camera) Transforms a camera using this transformation.transformAndReturnNew(Plane inputPlane) Transforms provided plane using this transformation and returns a new one.transformAndReturnNew(Point3D inputPoint) Transforms provided point using this transformation and returns a new one.transformAndReturnNew(Polygon3D inputPolygon) Transforms provided polygon using this transformation and returns a new one.transformAndReturnNew(Quadric inputQuadric) Transforms a quadric using this transformation and returns a new one.transformAndReturnNew(Triangle3D inputTriangle) Transforms provided triangle using this transformation and returns a new one.transformLines(List<Line3D> inputLines) Transforms provided list of lines using this transformation.voidtransformLines(List<Line3D> inputLines, List<Line3D> outputLines) Transforms provided list of lines using this transformation and stores the result in provided output list of lines.voidtransformPlanes(List<Plane> inputPlanes, List<Plane> outputPlanes) Transforms provided list of planes using this transformation and stores the result in provided output list of planes.transformPlanesAndReturnNew(List<Plane> inputPlanes) Transforms provided list of planes using this transformation.voidtransformPoints(List<Point3D> inputPoints, List<Point3D> outputPoints) Transforms provided list of points using this transformation and stores the result in provided output list of points.transformPointsAndReturnNew(List<Point3D> inputPoints) Transforms provided list of points using this transformation.
-
Constructor Details
-
Transformation3D
protected Transformation3D()Empty constructor.
-
-
Method Details
-
transformAndReturnNew
Transforms provided point using this transformation and returns a new one.- Parameters:
inputPoint- point to be transformed.- Returns:
- a new transformed point.
-
transform
Transforms and updates provided point.- Parameters:
point- point to be transformed and updated.
-
transform
Transforms input point using this transformation and stores the result in provided output points.- Parameters:
inputPoint- point to be transformed.outputPoint- instance where transformed point data will be stored.
-
transformPointsAndReturnNew
Transforms provided list of points using this transformation.- Parameters:
inputPoints- points to be transformed.- Returns:
- new transformed points.
-
transformPoints
Transforms provided list of points using this transformation and stores the result in provided output list of points. Notice that any previous content in output list will be removed when calling this method.- Parameters:
inputPoints- points to be transformed.outputPoints- transformed points.
-
transformAndOverwritePoints
Transforms provided list of points using this transformation and overwriting their previous values.- Parameters:
points- points to be transformed and overwritten.
-
transformAndReturnNew
public Quadric transformAndReturnNew(Quadric inputQuadric) throws NonSymmetricMatrixException, com.irurueta.algebra.AlgebraException Transforms a quadric using this transformation and returns a new one.- Parameters:
inputQuadric- quadric to be transformed.- Returns:
- a new transformed quadric.
- Throws:
NonSymmetricMatrixException- raised if due to numerical precision the resulting output quadric matrix is not considered to be symmetric.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transform
public void transform(Quadric quadric) throws NonSymmetricMatrixException, com.irurueta.algebra.AlgebraException Transforms and updates provided quadric.- Parameters:
quadric- quadric to be transformed.- Throws:
NonSymmetricMatrixException- raised if due to numerical precision the resulting quadric matrix is not considered to be symmetric.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transform
public abstract void transform(Quadric inputQuadric, Quadric outputQuadric) throws NonSymmetricMatrixException, com.irurueta.algebra.AlgebraException Transforms a quadric using this transformation and stores the result into provided output quadric.- Parameters:
inputQuadric- quadric to be transformed.outputQuadric- instance where data of transformed quadric will be stored.- Throws:
NonSymmetricMatrixException- raised if due to numerical precision the resulting output quadric matrix is not considered to be symmetric.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transformAndReturnNew
public DualQuadric transformAndReturnNew(DualQuadric inputDualQuadric) throws NonSymmetricMatrixException, com.irurueta.algebra.AlgebraException Transforms a dual quadric using this transformation and returns a new one.- Parameters:
inputDualQuadric- dual quadric to be transformed.- Returns:
- a new transformed dual quadric.
- Throws:
NonSymmetricMatrixException- raised if due to numerical precision the resulting output dual quadric matrix is not considered to be symmetric.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transform
public void transform(DualQuadric dualQuadric) throws NonSymmetricMatrixException, com.irurueta.algebra.AlgebraException Transforms and updates a dual quadric using this transformation.- Parameters:
dualQuadric- dual quadric to be transformed.- Throws:
NonSymmetricMatrixException- raised if due to numerical precision the resulting output dual quadric matrix is not considered to be symmetric.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transform
public abstract void transform(DualQuadric inputDualQuadric, DualQuadric outputDualQuadric) throws NonSymmetricMatrixException, com.irurueta.algebra.AlgebraException Transforms a dual quadric using this transformation and stores the result into provided output dual quadric.- Parameters:
inputDualQuadric- dual quadric to be transformed.outputDualQuadric- instance where data of transformed dual quadric will be stored.- Throws:
NonSymmetricMatrixException- Raised if due to numerical precision the resulting output dual quadric matrix is not considered to be symmetric.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transformAndReturnNew
Transforms provided plane using this transformation and returns a new one.- Parameters:
inputPlane- plane to be transformed.- Returns:
- a new transformed plane.
- Throws:
com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transform
Transforms and updates provided plane using this transformation.- Parameters:
plane- plane to be transformed.- Throws:
com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transform
public abstract void transform(Plane inputPlane, Plane outputPlane) throws com.irurueta.algebra.AlgebraException Transforms provided input plane using this transformation and stores the result into provided output plane instance.- Parameters:
inputPlane- plane to be transformed.outputPlane- instance where data of transformed plane will be stored.- Throws:
com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transformPlanesAndReturnNew
public List<Plane> transformPlanesAndReturnNew(List<Plane> inputPlanes) throws com.irurueta.algebra.AlgebraException Transforms provided list of planes using this transformation.- Parameters:
inputPlanes- planes to be transformed.- Returns:
- transformed planes.
- Throws:
com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transformPlanes
public void transformPlanes(List<Plane> inputPlanes, List<Plane> outputPlanes) throws com.irurueta.algebra.AlgebraException Transforms provided list of planes using this transformation and stores the result in provided output list of planes. Notice that any previous content in output list will be removed when calling this method.- Parameters:
inputPlanes- planes to be transformed.outputPlanes- transformed planes.- Throws:
com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transformAndOverwritePlanes
public void transformAndOverwritePlanes(List<Plane> planes) throws com.irurueta.algebra.AlgebraException Transforms provided list of planes using this transformation and overwriting their previous values.- Parameters:
planes- planes to be transformed and overwritten.- Throws:
com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transformAndReturnNew
public Line3D transformAndReturnNew(Line3D inputLine) throws CoincidentPlanesException, com.irurueta.algebra.AlgebraException Transforms provided line using this transformation and returns a new one.- Parameters:
inputLine- line to be transformed.- Returns:
- transformed line.
- Throws:
CoincidentPlanesException- raised if transformation is degenerate and results in planes forming a line being coincident.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transform
public void transform(Line3D line) throws CoincidentPlanesException, com.irurueta.algebra.AlgebraException Transforms and updates provided line using this transformation.- Parameters:
line- line to be transformed.- Throws:
CoincidentPlanesException- raised if transformation is degenerate and results in planes forming a line being coincident.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transform
public void transform(Line3D inputLine, Line3D outputLine) throws CoincidentPlanesException, com.irurueta.algebra.AlgebraException Transforms provided input line using this transformation and stores the result into provided output line instance.- Parameters:
inputLine- line to be transformed.outputLine- instance where data of transformed line will be stored.- Throws:
CoincidentPlanesException- Raised if transformation is degenerate and results in planes forming a line being coincident.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transformLines
public List<Line3D> transformLines(List<Line3D> inputLines) throws CoincidentPlanesException, com.irurueta.algebra.AlgebraException Transforms provided list of lines using this transformation.- Parameters:
inputLines- lines to be transformed.- Returns:
- transformed lines.
- Throws:
CoincidentPlanesException- raised if transformation is degenerate and results in planes forming a line being coincident.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transformLines
public void transformLines(List<Line3D> inputLines, List<Line3D> outputLines) throws CoincidentPlanesException, com.irurueta.algebra.AlgebraException Transforms provided list of lines using this transformation and stores the result in provided output list of lines. Notice that any previous content in output list will be removed when calling this method.- Parameters:
inputLines- lines to be transformed.outputLines- transformed lines.- Throws:
CoincidentPlanesException- raised if transformation is degenerate and results in planes forming a line being coincident.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transformAndOverwriteLines
public void transformAndOverwriteLines(List<Line3D> lines) throws CoincidentPlanesException, com.irurueta.algebra.AlgebraException Transforms provided list of lines using this transformation and overwriting their previous values.- Parameters:
lines- lines to be transformed and overwritten.- Throws:
CoincidentPlanesException- raised if transformation is degenerate and results in planes forming a line being coincident.com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transformAndReturnNew
Transforms provided polygon using this transformation and returns a new one.- Parameters:
inputPolygon- polygon to be transformed.- Returns:
- a new transformed polygon.
-
transform
Transforms and updates provided polygon using this transformation.- Parameters:
polygon- polygon to be transformed.
-
transform
Transforms provided input polygon using this transformation and stores the result into provided output polygon instance.- Parameters:
inputPolygon- polygon to be transformed.outputPolygon- Instance where transformed polygon data will be stored.
-
transformAndReturnNew
Transforms provided triangle using this transformation and returns a new one.- Parameters:
inputTriangle- triangle to be transformed.- Returns:
- a new transformed triangle.
-
transform
Transforms and updates provided input triangle using this transformation.- Parameters:
triangle- triangle to be transformed.
-
transform
Transforms provided input triangle using this transformation and stores the result into provided output triangle instance.- Parameters:
inputTriangle- triangle to be transformed.outputTriangle- instance where transformed triangle data will be stored.
-
asMatrix
public abstract com.irurueta.algebra.Matrix asMatrix()Represents this transformation as a 4x4 matrix. A point can be transformed as T * p, where T is the transformation matrix and p is a point expressed as an homogeneous vector.- Returns:
- this transformation in matrix form.
-
asMatrix
public abstract void asMatrix(com.irurueta.algebra.Matrix m) Represents this transformation as a 4x4 matrix and stores the result in provided instance.- Parameters:
m- instance where transformation matrix will be stored.- Throws:
IllegalArgumentException- raised if provided instance is not a 3x3 matrix.
-
transformAndReturnNew
public PinholeCamera transformAndReturnNew(PinholeCamera camera) throws com.irurueta.algebra.AlgebraException Transforms a camera using this transformation.- Parameters:
camera- camera to be transformed.- Returns:
- transformed quadric.
- Throws:
com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transform
Transforms and updates provided camera using this transformation.- Parameters:
camera- camera to be transformed.- Throws:
com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-
transform
public abstract void transform(PinholeCamera inputCamera, PinholeCamera outputCamera) throws com.irurueta.algebra.AlgebraException Transforms a camera using this transformation and stores the result into provided output camera.- Parameters:
inputCamera- camera to be transformed.outputCamera- instance where data of transformed camera will be stored.- Throws:
com.irurueta.algebra.AlgebraException- raised if transform cannot be computed because of numerical instabilities.
-