Packages

 

com.aspose.cad.exporters.cadapsentitiesexporter.cadaps3d

Class TransformationMatrix

  • java.lang.Object
    • com.aspose.cad.exporters.cadapsentitiesexporter.cadaps3d.TransformationMatrix
  • All Implemented Interfaces:
    com.aspose.ms.System.ICloneable


    public class TransformationMatrix
    extends Object
    implements com.aspose.ms.System.ICloneable

    Represents 3d transformation matrix

    • Constructor Detail

      • TransformationMatrix

        public TransformationMatrix()

        Initializes a new instance of the TransformationMatrix class

      • TransformationMatrix

        public TransformationMatrix(double[] items,
                                    boolean inverseRowCol)

        Initializes a new instance of the TransformationMatrix class.

        Parameters:
        items - The items.
        inverseRowCol - if set to true [inverse row col].
    • Method Detail

      • getMatrix

        public double[][] getMatrix()

        Gets or sets transformation matrix.

      • setMatrix

        public void setMatrix(double[][] value)

        Gets or sets transformation matrix.

      • copy

        public static TransformationMatrix copy(TransformationMatrix matrix)

        Performs copy of one TransformationMatrix into other.

        Parameters:
        matrix - Matrix to copy values from.
        Returns:
        Copy matrix.
      • scale

        public static TransformationMatrix scale(double sx,
                                                 double sy,
                                                 double sz)

        Scaling of a matrix

        Parameters:
        sx - X scale value
        sy - Y scale value
        sz - Z scale value
        Returns:
        Scaling matrix
      • rotateX

        public static TransformationMatrix rotateX(double theta)

        Rotation matrix around X

        Parameters:
        theta - Angle of rotation
        Returns:
        Rotation matrix
      • rotateY

        public static TransformationMatrix rotateY(double theta)

        Rotation matrix around Y

        Parameters:
        theta - Angle of rotation
        Returns:
        Rotation matrix
      • rotateZ

        public static TransformationMatrix rotateZ(double theta)

        Rotation matrix around Z

        Parameters:
        theta - Angle of rotation
        Returns:
        Rotation matrix
      • frontView

        public static TransformationMatrix frontView()

        FrontView matrix

        Returns:
        Front view matrix
      • sideView

        public static TransformationMatrix sideView()

        SideView matrix

        Returns:
        Side view matrix
      • op_Multiply

        public static TransformationMatrix op_Multiply(TransformationMatrix matrix,
                                                       double value)

        Multiplies matrix by value.

        Parameters:
        matrix - Matrix to multiply.
        value - Value to multiply matrix on.
        Returns:
        Matrix multiplied by a factor.
      • perspective

        public static TransformationMatrix perspective(double fov,
                                                       double aspect,
                                                       double near,
                                                       double far,
                                                       double distance)

        Creates perspective matrix.

        Parameters:
        fov - Field of view value.
        aspect - Aspect ratio.
        near - Near Z value.
        far - Far Z value.
        distance - Distance to object.
        Returns:
        Perspective transformation matrix.
      • transpose

        public static TransformationMatrix transpose(TransformationMatrix initialMatrix)

        Performs transposing of matrix.

        Parameters:
        initialMatrix - Matrix to transpose.
        Returns:
        Transposed matrix.
      • axonometric

        public static TransformationMatrix axonometric(double alpha,
                                                       double beta)

        Axonometric projection

        Parameters:
        alpha - Alpha angle
        beta - Beta angle
        Returns:
        Axonometric matrix
      • translate

        public static TransformationMatrix translate(double dx,
                                                     double dy,
                                                     double dz)

        Translation matrix

        Parameters:
        dx - X shift value
        dy - Y shift value
        dz - Z shift value
        Returns:
        Shift matrix
      • vectorMultiply

        public double[] vectorMultiply(double[] point)

        Applies transformation to point

        Parameters:
        point - Point to transform
        Returns:
        Transformed point
      • getWCS

        public static TransformationMatrix getWCS(Point3D normalVector)

        WCSs the specified normal vector.

        Parameters:
        normalVector - The normal vector.
        Returns:
      • oCStoWCS

        public static TransformationMatrix oCStoWCS(Point3D normalVector)

        Transforms OCS coordinates to WSC

        Parameters:
        normalVector - Normal vector.
        Returns:
        Transformatuon matrix.
      • invert

        public TransformationMatrix invert()

        Given an nXn matrix A, solve n linear equations to find the inverse of A.

        Returns:
        Inverted matrix
      • deepClone

        public Object deepClone()
        Specified by:
        deepClone in interface com.aspose.ms.System.ICloneable
      • determinant

        public double determinant()

        Estimates determinant of a matrix.

        Returns:
        Determinant value.