IndexedXYCollection Class
abstract base class for access to XY data with indexed reference.
- This allows algorithms to work with Point2d[] or GrowableXY.
- GrowableXYArray 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, other 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 |
|
| getXAtUncheckedPointIndex(pointIndex: number): number | access x of indexed point | |
| getYAtUncheckedPointIndex(pointIndex: number): number | access y of indexed point | |
| linearCombination(scales: number[], result?: Vector2d | Point2d): XY | Compute the linear combination s of the indexed p_i and given scales s_i. | |
| 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 Abstract ReadOnly | number | read-only property for number of XY in the collection. |
Defined in
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.