Point3dArrayCarrier Class
Helper object to access members of a Point3d[] in geometric calculations.
- The collection holds only a reference to the actual array.
- The actual array may be replaced by the user as needed.
- When replaced, there is no cached data to be updated.
Extends
Methods
Name | Description | |
---|---|---|
constructor(data: Point3d[]): Point3dArrayCarrier | CAPTURE caller supplied array ... | |
accumulateCrossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number, result: Vector3d): void | Compute the cross product of vectors from point at originIndex to points at indexA and indexB, and accumulate it to the result. | |
accumulateScaledXYZ(index: number, scale: number, sum: Point3d): void | Accumulate scale times the x,y,z values at index to the sum. | |
back(result?: Point3d): undefined | Point3d | Extract (copy) the final point | |
clear(): void | Remove all points. | |
crossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number, result?: Vector3d): undefined | Vector3d | Return the cross product of vectors from point at originIndex to points at indexA and indexB | |
crossProductXYAndZIndexIndex(origin: Readonly<WritableXYAndZ>, indexA: number, indexB: number, result?: Vector3d): undefined | Vector3d | Return the cross product of vectors from origin to points at indexA and indexB | |
cyclicIndex(i: number): number | Adjust index into range by modulo with the length. | |
distanceIndexIndex(index0: number, index1: number): undefined | number | Return distance between indicated points. | |
distanceSquaredIndexIndex(index0: number, index1: number): undefined | number | Return distance squared between indicated points. | |
front(result?: Point3d): undefined | Point3d | Extract (copy) the first point | |
getPoint3dAtCheckedPointIndex(index: number, result?: Point3d): undefined | Point3d | Access by index, returning strongly typed Point3d | |
getPoint3dAtUncheckedPointIndex(index: number, result?: Point3d): Point3d | Access by index, returning strongly typed Point3d | |
getVector3dAtCheckedVectorIndex(index: number, result?: Vector3d): undefined | Vector3d | Access by index, returning strongly typed Vector3d | |
getXAtUncheckedPointIndex(pointIndex: number): number | Access x of indexed point | |
getYAtUncheckedPointIndex(pointIndex: number): number | Access y of indexed point | |
getZAtUncheckedPointIndex(pointIndex: number): number | Access z of indexed point | |
isValidIndex(index: number): boolean | Test if index is a valid index into the array. |
|
pop(): void | Remove the final point. | |
push(data: Point3d): void | Push a (clone of) point onto the collection | |
pushXYZ(x?: number, y?: number, z?: number): void | Push a new point (given by coordinates) onto the collection | |
reverseInPlace(): void | Reverse the points in place | |
vectorIndexIndex(indexA: number, indexB: number, result?: Vector3d): undefined | Vector3d | Return a vector from the point at indexA to the point at indexB | |
vectorXYAndZIndex(origin: Readonly<WritableXYAndZ>, indexB: number, result?: Vector3d): undefined | Vector3d | Return a vector from given origin to point at indexB |
Inherited methods
Name | Inherited from | Description |
---|---|---|
almostEqualIndexIndex(index0: number, index1: number, tolerance: numberGeometry.smallMetricDistance): undefined | boolean Inherited | IndexedReadWriteXYZCollection | Test whether the indexed points are equal within tolerance. |
crossProductIndexIndexXYAndZ(origin: number, indexA: number, targetB: Readonly<WritableXYAndZ>, result?: Vector3d): undefined | Vector3d Inherited | IndexedReadWriteXYZCollection | Return the cross product of the vectors from origin to the point at indexA and to targetB |
distanceSquaredIndexXYAndZ(index0: number, target: Readonly<WritableXYAndZ>): undefined | number Inherited | IndexedReadWriteXYZCollection | Return distance squared between the point at index0 and target. |
dotProductIndexIndexIndex(origin: number, indexA: number, indexB: number): undefined | number Inherited | IndexedReadWriteXYZCollection | Return the dot product of the vectors from the point at origin to the points at indexA and indexB . |
dotProductIndexIndexXYAndZ(origin: number, indexA: number, targetB: Readonly<WritableXYAndZ>): undefined | number Inherited | IndexedReadWriteXYZCollection | Return the dot product of the vectors from the point at origin to the point at indexA and to targetB . |
findOrderedDuplicates(tolerance: numberGeometry.smallMetricDistance): number[] Inherited | IndexedReadWriteXYZCollection | For each run of points with indices i+1 to i+n within distance tolerance of points[i], return the indices i+1, ..., i+n. |
getArray(): Point3d[] Inherited | IndexedReadWriteXYZCollection | convert to Point3d[] |
getRange(): Range3d Inherited | IndexedReadWriteXYZCollection | Return the range of the points. |
interpolateIndexIndex(index0: number, fraction: number, index1: number, result?: Point3d): undefined | Point3d Inherited | IndexedReadWriteXYZCollection | Interpolate the points at the given indices. |
linearCombination(scales: number[], result?: Point3d | Vector3d): XYZ Inherited | IndexedReadWriteXYZCollection | Compute the linear combination s of the indexed p_i and given scales s_i. |
vectorIndexXYAndZ(indexA: number, target: Readonly<WritableXYAndZ>, result?: Vector3d): undefined | Vector3d Inherited | IndexedReadWriteXYZCollection | Return a vector from the point at indexA to target |
Properties
Name | Type | Description | |
---|---|---|---|
data | Point3d[] | Reference to array being queried. | |
length Accessor ReadOnly | number | Read-only property for number of XYZ in the collection |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
points Accessor Inherited ReadOnly | Iterable<Point3d, any, any> | IndexedReadWriteXYZCollection | Return iterator over the points in this collection. Usage:ts<br> for (const point: Point3d of collection.points) { ... }<br> |
Defined in
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.