Class Transformation3D

java.lang.Object
com.irurueta.geometry.Transformation3D
Direct Known Subclasses:
AffineTransformation3D, EuclideanTransformation3D, ProjectiveTransformation3D

public abstract class Transformation3D extends Object
This class performs transformations on 3D space. Transformations can be applied to any 3D geometric figure.
  • Constructor Details

    • Transformation3D

      protected Transformation3D()
      Empty constructor.
  • Method Details

    • transformAndReturnNew

      public Point3D transformAndReturnNew(Point3D inputPoint)
      Transforms provided point using this transformation and returns a new one.
      Parameters:
      inputPoint - point to be transformed.
      Returns:
      a new transformed point.
    • transform

      public void transform(Point3D point)
      Transforms and updates provided point.
      Parameters:
      point - point to be transformed and updated.
    • transform

      public abstract void transform(Point3D inputPoint, Point3D outputPoint)
      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

      public List<Point3D> transformPointsAndReturnNew(List<Point3D> inputPoints)
      Transforms provided list of points using this transformation.
      Parameters:
      inputPoints - points to be transformed.
      Returns:
      new transformed points.
    • transformPoints

      public void transformPoints(List<Point3D> inputPoints, List<Point3D> outputPoints)
      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

      public void transformAndOverwritePoints(List<Point3D> points)
      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

      public Plane transformAndReturnNew(Plane inputPlane) throws com.irurueta.algebra.AlgebraException
      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

      public void transform(Plane plane) throws com.irurueta.algebra.AlgebraException
      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

      public Polygon3D transformAndReturnNew(Polygon3D inputPolygon)
      Transforms provided polygon using this transformation and returns a new one.
      Parameters:
      inputPolygon - polygon to be transformed.
      Returns:
      a new transformed polygon.
    • transform

      public void transform(Polygon3D polygon)
      Transforms and updates provided polygon using this transformation.
      Parameters:
      polygon - polygon to be transformed.
    • transform

      public void transform(Polygon3D inputPolygon, Polygon3D outputPolygon)
      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

      public Triangle3D transformAndReturnNew(Triangle3D inputTriangle)
      Transforms provided triangle using this transformation and returns a new one.
      Parameters:
      inputTriangle - triangle to be transformed.
      Returns:
      a new transformed triangle.
    • transform

      public void transform(Triangle3D triangle)
      Transforms and updates provided input triangle using this transformation.
      Parameters:
      triangle - triangle to be transformed.
    • transform

      public void transform(Triangle3D inputTriangle, Triangle3D outputTriangle)
      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

      public void transform(PinholeCamera camera) throws com.irurueta.algebra.AlgebraException
      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.