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 | * compute the cross product from indexed origin t indexed targets targetAIndex and targetB index. | |
| back(result?: Point3d): Point3d | undefined | extract (copy) the final point | |
| clear(): void | remove all points. | |
| crossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number, result?: Vector3d): Vector3d | undefined | Return the cross product of vectors from point at originIndex to points at indexA and indexB | |
| crossProductXYAndZIndexIndex(origin: XYAndZ, indexA: number, indexB: number, result?: Vector3d): Vector3d | undefined | 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): number | undefined | Return distance between indicated points. | |
| distanceSquaredIndexIndex(index0: number, index1: number): number | undefined | Return distance squared between indicated points. | |
| front(result?: Point3d): Point3d | undefined | extract (copy) the first point | |
| getPoint3dAtCheckedPointIndex(index: number, result?: Point3d): Point3d | undefined | Access by index, returning strongly typed Point3d | |
| getPoint3dAtUncheckedPointIndex(index: number, result?: Point3d): Point3d | Access by index, returning strongly typed Point3d * This returns the xyz value but NOT reference to the point in the "carried" array. |
|
| getVector3dAtCheckedVectorIndex(index: number, result?: Vector3d): Vector3d | undefined | 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 * point itself is not pushed -- xyz data is extracted into the native form of 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): Vector3d | undefined | Return a vector from the point at indexA to the point at indexB | |
| vectorXYAndZIndex(origin: XYAndZ, indexB: number, result?: Vector3d): Vector3d | undefined | Return a vector from given origin to point at indexB |
Inherited methods
| Name | Inherited from | Description |
|---|---|---|
| getRange(): Range3d | IndexedXYZCollection | Return the range of the points. |
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 ReadOnly | Iterable<Point3d> | IndexedXYZCollection | Return iterator over the points in this collection. Usage:typescript<br> for (const point: Point3d of collection.points) { ... }<br> |
Defined in
Last Updated: 08 January, 2020