resize Method
- If pointCount is less than current length, just reset current length to pointCount, effectively trimming active points but preserving original capacity.
- If pointCount is greater than current length, reallocate to exactly pointCount, copy existing points, and optionally pad excess with zero.
resize(pointCount: number, padWithZero?: boolean): void
Parameter | Type | Description |
---|---|---|
pointCount | number | new number of active points in array |
padWithZero | boolean | when increasing point count, whether to zero out new points (default false) |
Returns - void
Defined in
- geometry3d/GrowableXYZArray.ts Line 115
Last Updated: 20 June, 2023