Point3D

dwv.math. Point3D

new Point3D(x, y, z)

Source:

Immutable 3D point.

Parameters:
Name Type Description
x number

The X coordinate for the point.

y number

The Y coordinate for the point.

z number

The Z coordinate for the point.

Methods

equals(rhs) → {boolean}

Source:

Check for Point3D equality.

Parameters:
Name Type Description
rhs dwv.math.Point3D

The other point to compare to.

Returns:

True if both points are equal.

Type
boolean

getDistance(point3D) → {number}

Source:

Get the distance to another Point3D.

Parameters:
Name Type Description
point3D dwv.math.Point3D

The input point.

Returns:

Ths distance to the input point.

Type
number

getX() → {number}

Source:

Get the X position of the point.

Returns:

The X position of the point.

Type
number

getY() → {number}

Source:

Get the Y position of the point.

Returns:

The Y position of the point.

Type
number

getZ() → {number}

Source:

Get the Z position of the point.

Returns:

The Z position of the point.

Type
number

minus(point3D) → {dwv.math.Point3D}

Source:

Get the difference to another Point3D.

Parameters:
Name Type Description
point3D dwv.math.Point3D

The input point.

Returns:

The 3D vector from the input point to this one.

Type
dwv.math.Point3D

toString() → {string}

Source:

Get a string representation of the Point3D.

Returns:

The point as a string.

Type
string