Cad3DPoint

Inheritance: java.lang.Object, Cad2DPoint

The Cad point.

Constructors

ConstructorDescription
Cad3DPoint()Initializes a new instance of the Cad3DPoint class.
Cad3DPoint(double x, double y, double z)Initializes a new instance of the Cad3DPoint class.
Cad3DPoint(double x, double y)Initializes a new instance of the Cad3DPoint class.

Methods

MethodDescription
getZ()Gets or sets the z.
setZ(double value)Gets or sets the z.
angleBetween3Points(Cad3DPoint a, Cad3DPoint b, Cad3DPoint c)Angles the between3 points.
rotatePoint(Cad3DPoint pointToRotate, Cad3DPoint centerPoint, double angleInRadians)Rotates one point arount another one
distance(Cad3DPoint destination)The distance.
length()The length.
cross(Cad3DPoint vc1, Cad3DPoint vc2)The cross product of two vectors.
dot(Cad3DPoint vc1, Cad3DPoint vc2)The dot product of two vectors.
min(Cad3DPoint pt1, Cad3DPoint pt2)The minimum of two points.
max(Cad3DPoint pt1, Cad3DPoint pt2)The maximum of two points.
inverse()Inverses this instance.
op_Addition(Cad3DPoint pt1, Cad3DPoint pt2)Sum of two points
op_Subtraction(Cad3DPoint pt1, Cad3DPoint pt2)Diff of two points
op_Multiply(Cad3DPoint pt, double sc)Multiplication of a point and a scalar

Cad3DPoint()

public Cad3DPoint()

Initializes a new instance of the Cad3DPoint class.

Cad3DPoint(double x, double y, double z)

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

Initializes a new instance of the Cad3DPoint class.

Parameters:

ParameterTypeDescription
xdoubleThe x ordinate.
ydoubleThe y ordinate.
zdoubleThe z ordinate.

Cad3DPoint(double x, double y)

public Cad3DPoint(double x, double y)

Initializes a new instance of the Cad3DPoint class.

Parameters:

ParameterTypeDescription
xdoubleThe pointX.
ydoubleThe point Y.

getZ()

public final double getZ()

Gets or sets the z.

Returns: double

setZ(double value)

public final void setZ(double value)

Gets or sets the z.

angleBetween3Points(Cad3DPoint a, Cad3DPoint b, Cad3DPoint c)

public static double angleBetween3Points(Cad3DPoint a, Cad3DPoint b, Cad3DPoint c)

Angles the between3 points.

Parameters:

ParameterTypeDescription
aCad3DPointFirst Point
bCad3DPointsecond point
cCad3DPointthird point

Returns: double - Angle between 3 points

rotatePoint(Cad3DPoint pointToRotate, Cad3DPoint centerPoint, double angleInRadians)

public static Cad3DPoint rotatePoint(Cad3DPoint pointToRotate, Cad3DPoint centerPoint, double angleInRadians)

Rotates one point arount another one

Parameters:

ParameterTypeDescription
pointToRotateCad3DPointthe point to rotate
centerPointCad3DPointthe centre point of rotation
angleInRadiansdoubleThe angle In Radians.

Returns: Cad3DPoint - Rotated point

distance(Cad3DPoint destination)

public final double distance(Cad3DPoint destination)

The distance.

Parameters:

ParameterTypeDescription
destinationCad3DPointThe destination.

Returns: double - The double .

length()

public final double length()

The length.

Returns: double - The double .

cross(Cad3DPoint vc1, Cad3DPoint vc2)

public static Cad3DPoint cross(Cad3DPoint vc1, Cad3DPoint vc2)

The cross product of two vectors.

Parameters:

ParameterTypeDescription
vc1Cad3DPointThe first vector
vc2Cad3DPointThe second vector

Returns: Cad3DPoint - Result of cross

dot(Cad3DPoint vc1, Cad3DPoint vc2)

public static double dot(Cad3DPoint vc1, Cad3DPoint vc2)

The dot product of two vectors.

Parameters:

ParameterTypeDescription
vc1Cad3DPointThe first vector
vc2Cad3DPointThe second vector

Returns: double - Result of dot

min(Cad3DPoint pt1, Cad3DPoint pt2)

public static Cad3DPoint min(Cad3DPoint pt1, Cad3DPoint pt2)

The minimum of two points.

Parameters:

ParameterTypeDescription
pt1Cad3DPointThe first point
pt2Cad3DPointThe second point

Returns: Cad3DPoint - Result of Min

max(Cad3DPoint pt1, Cad3DPoint pt2)

public static Cad3DPoint max(Cad3DPoint pt1, Cad3DPoint pt2)

The maximum of two points.

Parameters:

ParameterTypeDescription
pt1Cad3DPointThe first point
pt2Cad3DPointThe second point

Returns: Cad3DPoint - Result of Max

inverse()

public final Cad3DPoint inverse()

Inverses this instance.

Returns: Cad3DPoint - Result of Inverses

op_Addition(Cad3DPoint pt1, Cad3DPoint pt2)

public static Cad3DPoint op_Addition(Cad3DPoint pt1, Cad3DPoint pt2)

Sum of two points

Parameters:

ParameterTypeDescription
pt1Cad3DPointThe first point
pt2Cad3DPointThe second point

Returns: Cad3DPoint - Returns the sum

op_Subtraction(Cad3DPoint pt1, Cad3DPoint pt2)

public static Cad3DPoint op_Subtraction(Cad3DPoint pt1, Cad3DPoint pt2)

Diff of two points

Parameters:

ParameterTypeDescription
pt1Cad3DPointThe first point
pt2Cad3DPointThe second point

Returns: Cad3DPoint - Returns the diff

op_Multiply(Cad3DPoint pt, double sc)

public static Cad3DPoint op_Multiply(Cad3DPoint pt, double sc)

Multiplication of a point and a scalar

Parameters:

ParameterTypeDescription
ptCad3DPointThe point
scdoubleThe scalar

Returns: Cad3DPoint - Returns the sum