Packages

 

com.aspose.cad.exporters.cadapsentitiesexporter.cadaps3d

Class Point3D

  • java.lang.Object
    • com.aspose.cad.exporters.cadapsentitiesexporter.cadaps3d.Point3D


  • public class Point3D
    extends Object

    Represents class to work with 3D point and special operations for it.

    • Constructor Detail

      • Point3D

        public Point3D()

        Initializes a new instance of the Point3D class

      • Point3D

        public Point3D(double x,
                       double y,
                       double z,
                       double w)

        Initializes a new instance of the Point3D class

        Parameters:
        x - X value
        y - Y value
        z - Z value
        w - W value
      • Point3D

        public Point3D(double x,
                       double y)

        Initializes a new instance of the Point3D class

        Parameters:
        x - X value
        y - Y value
      • Point3D

        public Point3D(double x,
                       double y,
                       double z)

        Initializes a new instance of the Point3D class

        Parameters:
        x - X value
        y - Y value
        z - Z value
      • Point3D

        public Point3D(com.aspose.foundation.rendering.ApsPoint apsPoint)

        Initializes a new instance of the Point3D class.

        Parameters:
        apsPoint - The cad2 d point.
    • Method Detail

      • getX

        public double getX()

        Gets or sets X coordinate

      • setX

        public void setX(double value)

        Gets or sets X coordinate

      • getY

        public double getY()

        Gets or sets Y coordinate

      • setY

        public void setY(double value)

        Gets or sets Y coordinate

      • getZ

        public double getZ()

        Gets or sets Z coordinate

      • setZ

        public void setZ(double value)

        Gets or sets Z coordinate

      • getW

        public double getW()

        Gets or sets W coordinate

      • setW

        public void setW(double value)

        Gets or sets W coordinate

      • distance

        public static double distance(Point3D point1,
                                      Point3D point2)

        Gets distance between points

        Parameters:
        point1 - First point
        point2 - Second point
        Returns:
        Euclidean distance
      • spherical

        public static Point3D spherical(double r,
                                        double theta,
                                        double phi)

        Get point in spherical coordinates

        Parameters:
        r - R value
        theta - Theta value
        phi - Phi value
        Returns:
        Spherical coordinates point
      • crossProduct

        public static Point3D crossProduct(Point3D point1,
                                           Point3D point2)

        Gets cross-product of a points

        Parameters:
        point1 - First point
        point2 - Second point
        Returns:
        Cross product point
      • dotProduct

        public static double dotProduct(Point3D point1,
                                        Point3D point2)

        Gets dot product between two vectors.

        Parameters:
        point1 - First vector.
        point2 - Second vector.
        Returns:
        Dor product
      • normalVector

        public static Point3D normalVector(Point3D point1,
                                           Point3D point2,
                                           Point3D point3)

        Get normal vector of a plane.

        Parameters:
        point1 - First vector of a plane.
        point2 - Second vector of a plane.
        point3 - Third vector of a plane.
        Returns:
        Normal vector of a plane
      • transform

        public void transform(TransformationMatrix matrix)

        Applies transformation to a point

        Parameters:
        matrix - Transformation matrix
      • transformNormalize

        public void transformNormalize(TransformationMatrix matrix)

        Applies transformation with normalization.

        Parameters:
        matrix - Matrix to perform transformation.
      • op_Equality

        public static boolean op_Equality(Point3D a,
                                          Point3D b)

        Allows to compare 3D points.

        Parameters:
        a - First point to compare.
        b - Second point to compare.
        Returns:
        True if points are equal.
      • op_Inequality

        public static boolean op_Inequality(Point3D a,
                                            Point3D b)

        Allows to compare 3D points.

        Parameters:
        a - First point to compare.
        b - Second point to compare.
        Returns:
        True if points are different.
      • op_Subtraction

        public static Point3D op_Subtraction(Point3D a,
                                             Point3D b)

        Implements the operator -.

        Parameters:
        a - a.
        b - The b.
        Returns:
        The result of the operator.
      • op_Addition

        public static Point3D op_Addition(Point3D a,
                                          Point3D b)

        Implements the operator +.

        Parameters:
        a - a.
        b - The b.
        Returns:
        The result of the operator.
      • op_Multiply

        public static Point3D op_Multiply(Point3D point,
                                          double scale)

        Implements the operator *.

        Parameters:
        point - The point.
        scale - The scale.
        Returns:
        The result of the operator.
      • equals

        public boolean equals(Object obj)

        Allows to compare 3D points.

        Overrides:
        equals in class Object
        Parameters:
        obj - Point to compare current object with.
        Returns:
        True if points are equal.
      • equalsSoft

        public final boolean equalsSoft(Object obj)
      • equalsSoft

        public final boolean equalsSoft(Object obj,
                                        double eps)

        Allows to compare 3D points with specified threshold.

        Parameters:
        obj - Point to compare current object with.
        eps - Epsilon threshold.
        Returns:
        True if points are equal.
      • hashCode

        public int hashCode()

        Return hash code for object.

        Overrides:
        hashCode in class Object
        Returns:
        Hash value.
      • copy

        public Point3D copy()

        Creates copy of current point

        Returns:
        Copy of a point
      • normalize

        public final Point3D normalize()

        Normalizes the specified origin.

        Returns: