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): 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
getArray(): Point3d[] IndexedReadWriteXYZCollection convert to Point3d[]
getRange(): Range3d IndexedReadWriteXYZCollection 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> IndexedReadWriteXYZCollection Return iterator over the points in this collection. Usage:
ts<br> for (const point: Point3d of collection.points) { ... }<br>

Defined in

Last Updated: 12 June, 2024