Point3D

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

Constructors

ConstructorDescription
Point3D()Initializes a new instance of the Point3D class
Point3D(double x, double y, double z, double w)Initializes a new instance of the Point3D class
Point3D(double x, double y)Initializes a new instance of the Point3D class
Point3D(double x, double y, double z)Initializes a new instance of the Point3D class
Point3D(com.aspose.foundation.rendering.ApsPoint apsPoint)Initializes a new instance of the Point3D class.

Methods

MethodDescription
getX()Gets or sets X coordinate
setX(double value)Gets or sets X coordinate
getY()Gets or sets Y coordinate
setY(double value)Gets or sets Y coordinate
getZ()Gets or sets Z coordinate
setZ(double value)Gets or sets Z coordinate
getW()Gets or sets W coordinate
setW(double value)Gets or sets W coordinate
distance(Point3D point1, Point3D point2)Gets distance between points
spherical(double r, double theta, double phi)Get point in spherical coordinates
crossProduct(Point3D point1, Point3D point2)Gets cross-product of a points
dotProduct(Point3D point1, Point3D point2)Gets dot product between two vectors.
normalVector(Point3D point1, Point3D point2, Point3D point3)Get normal vector of a plane.
transform(TransformationMatrix matrix)Applies transformation to a point
transformNormalize(TransformationMatrix matrix)Applies transformation with normalization.
op_Equality(Point3D a, Point3D b)Allows to compare 3D points.
op_Inequality(Point3D a, Point3D b)Allows to compare 3D points.
op_Subtraction(Point3D a, Point3D b)Implements the operator -.
op_Addition(Point3D a, Point3D b)Implements the operator +.
op_Multiply(Point3D point, double scale)Implements the operator *.
equals(Object obj)Allows to compare 3D points.
equalsSoft(Object obj)
equalsSoft(Object obj, double eps)Allows to compare 3D points with specified threshold.
hashCode()Return hash code for object.
copy()Creates copy of current point
normalize()Normalizes the specified origin.

Point3D()

public Point3D()

Initializes a new instance of the Point3D class

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

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

Initializes a new instance of the Point3D class

Parameters:

ParameterTypeDescription
xdoubleX value
ydoubleY value
zdoubleZ value
wdoubleW value

Point3D(double x, double y)

public Point3D(double x, double y)

Initializes a new instance of the Point3D class

Parameters:

ParameterTypeDescription
xdoubleX value
ydoubleY value

Point3D(double x, double y, double z)

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

Initializes a new instance of the Point3D class

Parameters:

ParameterTypeDescription
xdoubleX value
ydoubleY value
zdoubleZ value

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

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

Initializes a new instance of the Point3D class.

Parameters:

ParameterTypeDescription
apsPointcom.aspose.foundation.rendering.ApsPointThe cad2 d point.

getX()

public double getX()

Gets or sets X coordinate

Returns: double

setX(double value)

public void setX(double value)

Gets or sets X coordinate

getY()

public double getY()

Gets or sets Y coordinate

Returns: double

setY(double value)

public void setY(double value)

Gets or sets Y coordinate

getZ()

public double getZ()

Gets or sets Z coordinate

Returns: double

setZ(double value)

public void setZ(double value)

Gets or sets Z coordinate

getW()

public double getW()

Gets or sets W coordinate

Returns: double

setW(double value)

public void setW(double value)

Gets or sets W coordinate

distance(Point3D point1, Point3D point2)

public static double distance(Point3D point1, Point3D point2)

Gets distance between points

Parameters:

ParameterTypeDescription
point1Point3DFirst point
point2Point3DSecond point

Returns: double - Euclidean distance

spherical(double r, double theta, double phi)

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

Get point in spherical coordinates

Parameters:

ParameterTypeDescription
rdoubleR value
thetadoubleTheta value
phidoublePhi value

Returns: Point3D - Spherical coordinates point

crossProduct(Point3D point1, Point3D point2)

public static Point3D crossProduct(Point3D point1, Point3D point2)

Gets cross-product of a points

Parameters:

ParameterTypeDescription
point1Point3DFirst point
point2Point3DSecond point

Returns: Point3D - Cross product point

dotProduct(Point3D point1, Point3D point2)

public static double dotProduct(Point3D point1, Point3D point2)

Gets dot product between two vectors.

Parameters:

ParameterTypeDescription
point1Point3DFirst vector.
point2Point3DSecond vector.

Returns: double - Dor product

normalVector(Point3D point1, Point3D point2, Point3D point3)

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

Get normal vector of a plane.

Parameters:

ParameterTypeDescription
point1Point3DFirst vector of a plane.
point2Point3DSecond vector of a plane.
point3Point3DThird vector of a plane.

Returns: Point3D - Normal vector of a plane

transform(TransformationMatrix matrix)

public void transform(TransformationMatrix matrix)

Applies transformation to a point

Parameters:

ParameterTypeDescription
matrixTransformationMatrixTransformation matrix

transformNormalize(TransformationMatrix matrix)

public void transformNormalize(TransformationMatrix matrix)

Applies transformation with normalization.

Parameters:

ParameterTypeDescription
matrixTransformationMatrixMatrix to perform transformation.

op_Equality(Point3D a, Point3D b)

public static boolean op_Equality(Point3D a, Point3D b)

Allows to compare 3D points.

Parameters:

ParameterTypeDescription
aPoint3DFirst point to compare.
bPoint3DSecond point to compare.

Returns: boolean - True if points are equal.

op_Inequality(Point3D a, Point3D b)

public static boolean op_Inequality(Point3D a, Point3D b)

Allows to compare 3D points.

Parameters:

ParameterTypeDescription
aPoint3DFirst point to compare.
bPoint3DSecond point to compare.

Returns: boolean - True if points are different.

op_Subtraction(Point3D a, Point3D b)

public static Point3D op_Subtraction(Point3D a, Point3D b)

Implements the operator -.

Parameters:

ParameterTypeDescription
aPoint3Da.
bPoint3DThe b.

Returns: Point3D - The result of the operator.

op_Addition(Point3D a, Point3D b)

public static Point3D op_Addition(Point3D a, Point3D b)

Implements the operator +.

Parameters:

ParameterTypeDescription
aPoint3Da.
bPoint3DThe b.

Returns: Point3D - The result of the operator.

op_Multiply(Point3D point, double scale)

public static Point3D op_Multiply(Point3D point, double scale)

Implements the operator *.

Parameters:

ParameterTypeDescription
pointPoint3DThe point.
scaledoubleThe scale.

Returns: Point3D - The result of the operator.

equals(Object obj)

public boolean equals(Object obj)

Allows to compare 3D points.

Parameters:

ParameterTypeDescription
objObjectPoint to compare current object with.

Returns: boolean - True if points are equal.

equalsSoft(Object obj)

public final boolean equalsSoft(Object obj)

Returns: boolean

equalsSoft(Object obj, double eps)

public final boolean equalsSoft(Object obj, double eps)

Allows to compare 3D points with specified threshold.

Parameters:

ParameterTypeDescription
objObjectPoint to compare current object with.
epsdoubleEpsilon threshold.

Returns: boolean - True if points are equal.

hashCode()

public int hashCode()

Return hash code for object.

Returns: int - Hash value.

copy()

public Point3D copy()

Creates copy of current point

Returns: Point3D - Copy of a point

normalize()

public final Point3D normalize()

Normalizes the specified origin.

Returns: Point3D