Point2dArrayCarrier Class

Helper object to access members of a Point2d[] 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: Point2d[]): Point2dArrayCarrier CAPTURE caller supplied array ...  
crossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number): number | undefined Return the cross product of vectors from point at originIndex to points at indexA and indexB  
crossProductXAndYIndexIndex(origin: XAndY, indexA: number, indexB: number): number | undefined Return the cross product of vectors from origin to points at indexA and indexB  
getPoint2dAtCheckedPointIndex(index: number, result?: Point2d): Point2d | undefined Access by index, returning strongly typed Point2d  
getVector2dAtCheckedVectorIndex(index: number, result?: Vector2d): Vector2d | undefined Access by index, returning strongly typed Vector2d  
isValidIndex(index: number): boolean test if index is valid  
vectorIndexIndex(indexA: number, indexB: number, result?: Vector2d): Vector2d | undefined Return a vector from the point at indexA to the point at indexB  
vectorXAndYIndex(origin: XAndY, indexB: number, result?: Vector2d): Vector2d | undefined Return a vector from given origin to point at indexB  

Properties

Name Type Description
data Point2d[] reference to array being queried.  
length Accessor ReadOnly number read-only property for number of XYZ in the collection.  

Defined in

Last Updated: 13 June, 2024