IndexedXYCollection Class

abstract base class for access to XYZ data with indexed reference.

  • This allows algorithms to work with Point2d[] or GrowableXYZ.

** GrowableXYZArray implements these for its data. ** Point2dArrayCarrier carries a (reference to) a Point2d[] and implements the methods with calls on that array reference.

  • In addition to "point by point" accessors, there abstract members compute commonly useful vector data "between points".
  • Methods that create vectors among multiple indices allow callers to avoid creating temporaries.

Extended by

Methods

Name Description
constructor(): IndexedXYCollection    
crossProductIndexIndexIndex(origin: number, indexA: number, indexB: number): undefined | number Abstract Return the cross product of vectors from origin point at indexA to target points at indexB and indexC  
crossProductXAndYIndexIndex(origin: Readonly<WritableXAndY>, indexA: number, indexB: number): undefined | number Abstract Return the cross product of vectors from origin to points at indexA and indexB  
getPoint2dAtCheckedPointIndex(index: number, result?: Point2d): undefined | Point2d Abstract Get from index as a Point2d  
getVector2dAtCheckedVectorIndex(index: number, result?: Vector2d): undefined | Vector2d Abstract Get from index as a Vector2d  
vectorIndexIndex(indexA: number, indexB: number, result?: Vector2d): undefined | Vector2d Abstract Return a vector from the point at indexA to the point at indexB  
vectorXAndYIndex(origin: Readonly<WritableXAndY>, indexB: number, result?: Vector2d): undefined | Vector2d Abstract Return a vector from given origin to the point at indexB  

Properties

Name Type Description
length Accessor AbstractReadOnly number read-only property for number of XYZ in the collection.  

Defined in

Last Updated: 11 June, 2024