Constructor
new Point3D(x, y, z)
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. |
- Source
Classes
Methods
equals(rhs) → {boolean}
Check for Point3D equality.
Name | Type | Description |
---|---|---|
rhs | Point3D | The other point to compare to. |
- Source
True if both points are equal.
- Type:
- boolean
getClosest(pointList) → {number}
Get the closest point to this in a Point3D list.
Name | Type | Description |
---|---|---|
pointList | Array.<Point3D> | The list to check. |
- Source
The index of the closest point in the input list.
- Type:
- number
getDistance(point3D) → {number}
Get the distance to another Point3D.
Name | Type | Description |
---|---|---|
point3D | Point3D | The input point. |
- Source
Ths distance to the input point.
- Type:
- number
getValues() → {Array.<number>}
Get the values of this point.
- Source
The array of values.
- Type:
- Array.<number>
getX() → {number}
Get the X position of the point.
- Source
The X position of the point.
- Type:
- number
getY() → {number}
Get the Y position of the point.
- Source
The Y position of the point.
- Type:
- number
getZ() → {number}
Get the Z position of the point.
- Source
The Z position of the point.
- Type:
- number
isSimilar(rhs, tol) → {boolean}
Check for Point3D similarity.
Name | Type | Description |
---|---|---|
rhs | Point3D | The other point to compare to. |
tol | number | Optional comparison tolerance, default to Number.EPSILON. |
- Source
True if both points are equal.
- Type:
- boolean
minus(point3D) → {Vector3D}
Get the difference to another Point3D.
Name | Type | Description |
---|---|---|
point3D | Point3D | The input point. |
- Source
The 3D vector from the input point to this one.
- Type:
- Vector3D
toString() → {string}
Get a string representation of the Point3D.
- Source
The point as a string.
- Type:
- string