Class Transformation3D


  • public final class Transformation3D
    extends java.lang.Object
    The 3D affine transformation class. We use matrices for transformations of the vectors as rows. That means the math expressions on the Geometry matrix operations should be writen like this: v' = v * M1 * M2 * M3 = ( (v * M1) * M2 ) * M3, where v is a vector, Mn are the matrices. This is equivalent to the following line of code: ResultVector = (M1.Mul(M2).Mul(M3)).Transform(Vector)
    • Field Detail

      • xx

        public double xx
      • yx

        public double yx
      • zx

        public double zx
      • xd

        public double xd
      • xy

        public double xy
      • yy

        public double yy
      • zy

        public double zy
      • yd

        public double yd
      • xz

        public double xz
      • yz

        public double yz
      • zz

        public double zz
      • zd

        public double zd
    • Constructor Detail

      • Transformation3D

        public Transformation3D()
    • Method Detail

      • setZero

        public void setZero()
        Sets all elements to 0, thus producing and invalid transformation.
      • setScale

        public void setScale​(double scaleX,
                             double scaleY,
                             double scaleZ)
      • setTranslate

        public void setTranslate​(double deltax,
                                 double deltay,
                                 double deltaz)
      • translate

        public void translate​(double deltax,
                              double deltay,
                              double deltaz)
      • transform

        public Envelope3D transform​(Envelope3D env)
        Transforms an envelope. The result is the bounding box of the transformed envelope.
      • transform

        public void transform​(Point3D[] pointsIn,
                              int count,
                              Point3D[] pointsOut)
      • transform

        public void transform​(Point3D[] points,
                              int start,
                              int count)
      • multiply

        public static void multiply​(Transformation3D a,
                                    Transformation3D b,
                                    Transformation3D result)
        Performs multiplication of matrices a and b and places result into result. The a, b, and result could point to same objects.
        Equivalent to result = a * b.
      • inverse

        public static void inverse​(Transformation3D src,
                                   Transformation3D result)
        Calculates the Inverse transformation.
        Parameters:
        src - The input transformation.
        result - The inverse of the input transformation. Throws the GeometryException("math singularity") exception if the Inverse can not be calculated.