@itwin/core-geometry 5.3.0-dev.9 → 5.4.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -1
- package/lib/cjs/curve/Arc3d.d.ts +15 -1
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +31 -2
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +25 -8
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +51 -55
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.d.ts +10 -13
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js +23 -22
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/ClothoidSeries.d.ts +10 -6
- package/lib/cjs/curve/spiral/ClothoidSeries.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/ClothoidSeries.js +36 -19
- package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/cjs/curve/spiral/CubicEvaluator.d.ts +7 -6
- package/lib/cjs/curve/spiral/CubicEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/CubicEvaluator.js +29 -14
- package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.d.ts +34 -44
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js +47 -53
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.d.ts +2 -2
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js +17 -7
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts +112 -104
- package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js +143 -117
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts +71 -53
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +99 -66
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.d.ts +8 -12
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +11 -13
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/NormalizedTransition.d.ts +36 -29
- package/lib/cjs/curve/spiral/NormalizedTransition.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/NormalizedTransition.js +62 -40
- package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.d.ts +13 -18
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js +21 -24
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.d.ts +41 -27
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.js +50 -33
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts +45 -34
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js +56 -38
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.d.ts +27 -21
- package/lib/cjs/curve/spiral/XYCurveEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js +23 -18
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts +96 -98
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js +121 -110
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +135 -142
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +165 -160
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.d.ts +51 -34
- package/lib/cjs/geometry3d/IndexedXYCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.js +16 -6
- package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +78 -77
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js +38 -35
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +27 -7
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +30 -9
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +15 -1
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +31 -2
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +25 -8
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +51 -55
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.d.ts +10 -13
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js +23 -22
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/ClothoidSeries.d.ts +10 -6
- package/lib/esm/curve/spiral/ClothoidSeries.d.ts.map +1 -1
- package/lib/esm/curve/spiral/ClothoidSeries.js +36 -19
- package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/esm/curve/spiral/CubicEvaluator.d.ts +7 -6
- package/lib/esm/curve/spiral/CubicEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/CubicEvaluator.js +29 -14
- package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.d.ts +34 -44
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.js +47 -53
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.d.ts +2 -2
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js +17 -7
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.d.ts +112 -104
- package/lib/esm/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js +143 -117
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts +71 -53
- package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js +99 -66
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.d.ts +8 -12
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +11 -13
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/NormalizedTransition.d.ts +36 -29
- package/lib/esm/curve/spiral/NormalizedTransition.d.ts.map +1 -1
- package/lib/esm/curve/spiral/NormalizedTransition.js +62 -40
- package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.d.ts +13 -18
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js +21 -24
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.d.ts +41 -27
- package/lib/esm/curve/spiral/TransitionConditionalProperties.d.ts.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.js +50 -33
- package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts +45 -34
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js +56 -38
- package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.d.ts +27 -21
- package/lib/esm/curve/spiral/XYCurveEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js +23 -18
- package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.d.ts +96 -98
- package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js +122 -111
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts +135 -142
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +165 -160
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.d.ts +51 -34
- package/lib/esm/geometry3d/IndexedXYCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.js +14 -5
- package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +78 -77
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js +38 -35
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +27 -7
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +30 -9
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GrowableXYZArray } from "./GrowableXYZArray";
|
|
2
|
-
import {
|
|
2
|
+
import { IndexedReadWriteXYCollection } from "./IndexedXYCollection";
|
|
3
3
|
import { MultiLineStringDataVariant } from "./IndexedXYZCollection";
|
|
4
4
|
import { Matrix3d } from "./Matrix3d";
|
|
5
5
|
import { Point2d, Vector2d } from "./Point2dVector2d";
|
|
@@ -7,36 +7,32 @@ import { Point3d } from "./Point3dVector3d";
|
|
|
7
7
|
import { Range2d } from "./Range";
|
|
8
8
|
import { Transform } from "./Transform";
|
|
9
9
|
import { XAndY, XYAndZ } from "./XYZProps";
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* `GrowableXYArray` manages a (possibly growing) Float64Array to pack xy coordinates.
|
|
11
12
|
* @public
|
|
12
13
|
*/
|
|
13
|
-
export declare class GrowableXYArray extends
|
|
14
|
-
/**
|
|
15
|
-
* array of packed xy xy xy components
|
|
16
|
-
*/
|
|
14
|
+
export declare class GrowableXYArray extends IndexedReadWriteXYCollection {
|
|
15
|
+
/** Array of packed xy xy xy components. */
|
|
17
16
|
private _data;
|
|
18
|
-
/**
|
|
19
|
-
* Number of xy tuples (not floats) in the array
|
|
20
|
-
*/
|
|
17
|
+
/** Number of xy tuples (not floats) in the array. */
|
|
21
18
|
private _xyInUse;
|
|
22
|
-
/**
|
|
23
|
-
* capacity in xy tuples. (not floats)
|
|
24
|
-
*/
|
|
19
|
+
/** Capacity in xy tuples. (not floats). */
|
|
25
20
|
private _xyCapacity;
|
|
26
|
-
/**
|
|
27
|
-
* multiplier used by ensureCapacity to expand requested reallocation size
|
|
28
|
-
*/
|
|
21
|
+
/** Multiplier used by ensureCapacity to expand requested reallocation size. */
|
|
29
22
|
private _growthFactor;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @param
|
|
23
|
+
/**
|
|
24
|
+
* Construct a new GrowablePoint2d array.
|
|
25
|
+
* @param numPoints initial capacity in xy tuples (default 8).
|
|
26
|
+
* @param growthFactor used by ensureCapacity to expand requested reallocation size (default 1.5).
|
|
27
|
+
* @param data optional pre-existing Float64Array to use as the backing memory. If supplied, numPoints is ignored.
|
|
33
28
|
*/
|
|
34
|
-
constructor(numPoints?: number, growthFactor?: number);
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @
|
|
29
|
+
constructor(numPoints?: number, growthFactor?: number, data?: Float64Array);
|
|
30
|
+
/**
|
|
31
|
+
* Copy xy points from source array. Does not reallocate or change active point count.
|
|
32
|
+
* @param source array to copy from.
|
|
33
|
+
* @param sourceCount copy the first sourceCount points; all points if undefined.
|
|
34
|
+
* @param destOffset copy to instance array starting at this point index; zero if undefined.
|
|
35
|
+
* @return count and offset of points copied.
|
|
40
36
|
*/
|
|
41
37
|
protected copyData(source: Float64Array | number[], sourceCount?: number, destOffset?: number): {
|
|
42
38
|
count: number;
|
|
@@ -47,23 +43,24 @@ export declare class GrowableXYArray extends IndexedXYCollection {
|
|
|
47
43
|
set length(newLength: number);
|
|
48
44
|
/** Return the number of float64 in use. */
|
|
49
45
|
get float64Length(): number;
|
|
50
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Return the raw packed data.
|
|
51
48
|
* * Note that the length of the returned Float64Array is a count of doubles, and includes the excess capacity
|
|
52
49
|
*/
|
|
53
50
|
float64Data(): Float64Array;
|
|
54
|
-
/** If necessary, increase the capacity to a new pointCount.
|
|
51
|
+
/** If necessary, increase the capacity to a new pointCount. Current coordinates and point count (length) are unchanged. */
|
|
55
52
|
ensureCapacity(pointCapacity: number, applyGrowthFactor?: boolean): void;
|
|
56
53
|
/**
|
|
57
|
-
*
|
|
58
|
-
* * If pointCount is
|
|
59
|
-
*
|
|
60
|
-
*
|
|
54
|
+
* Resize the internal storage to hold a new number of points.
|
|
55
|
+
* * If pointCount is less than current length, just reset current length to pointCount, effectively trimming active
|
|
56
|
+
* points but preserving original capacity.
|
|
57
|
+
* * If pointCount is greater than current length, reallocate to exactly pointCount, copy existing points, and
|
|
58
|
+
* optionally pad excess with zero.
|
|
59
|
+
* @param pointCount new number of active points in array.
|
|
60
|
+
* @param padWithZero when increasing point count, whether to zero out new points (default false).
|
|
61
61
|
*/
|
|
62
62
|
resize(pointCount: number, padWithZero?: boolean): void;
|
|
63
|
-
/**
|
|
64
|
-
* Make a copy of the (active) points in this array.
|
|
65
|
-
* (The clone does NOT get excess capacity)
|
|
66
|
-
*/
|
|
63
|
+
/** Make a copy of the (active) points in this array (the clone does NOT get excess capacity). */
|
|
67
64
|
clone(): GrowableXYArray;
|
|
68
65
|
/**
|
|
69
66
|
* Create an array by copying data from various point formats.
|
|
@@ -76,20 +73,30 @@ export declare class GrowableXYArray extends IndexedXYCollection {
|
|
|
76
73
|
* * A GrowableXYArray
|
|
77
74
|
* * Any json object satisfying Point3d.isXAndY
|
|
78
75
|
* * A Float64Array of doubles, interpreted as xyxy
|
|
79
|
-
* * An array of any of the above
|
|
76
|
+
* * An array of any of the above.
|
|
77
|
+
* @param data source points.
|
|
78
|
+
* @param result optional pre-allocated GrowableXYArray to clear and fill.
|
|
80
79
|
*/
|
|
81
80
|
static create(data: any, result?: GrowableXYArray): GrowableXYArray;
|
|
82
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Create a new GrowableXYArray capturing the provided data. The data is not copied, just referenced.
|
|
83
|
+
* @param data source data to capture.
|
|
84
|
+
* @returns a new GrowableXYArray object that references the provided data.
|
|
85
|
+
*/
|
|
86
|
+
static createCapture(data: Float64Array): GrowableXYArray;
|
|
87
|
+
/**
|
|
88
|
+
* Restructure MultiLineStringDataVariant as array of GrowableXYZArray
|
|
83
89
|
* @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Moved to GrowableXYZArray class.
|
|
84
90
|
*/
|
|
85
91
|
static createArrayOfGrowableXYZArray(data: MultiLineStringDataVariant): GrowableXYZArray[] | undefined;
|
|
86
|
-
/**
|
|
92
|
+
/** Push a point to the end of the array. */
|
|
87
93
|
push(toPush: XAndY): void;
|
|
88
|
-
/**
|
|
94
|
+
/** Push all points of an array. */
|
|
89
95
|
pushAll(points: XAndY[]): void;
|
|
90
|
-
/**
|
|
96
|
+
/** Push all points of an array. */
|
|
91
97
|
pushAllXYAndZ(points: XYAndZ[] | GrowableXYZArray): void;
|
|
92
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Push copies of points from variant sources.
|
|
93
100
|
* Valid inputs are:
|
|
94
101
|
* * Point2d
|
|
95
102
|
* * Point3d
|
|
@@ -98,134 +105,125 @@ export declare class GrowableXYArray extends IndexedXYCollection {
|
|
|
98
105
|
* * A GrowableXYZArray
|
|
99
106
|
* * Any json object satisfying Point3d.isXAndY
|
|
100
107
|
* * A Float64Array of doubles, interpreted as xyxy
|
|
101
|
-
* * An array of any of the above
|
|
108
|
+
* * An array of any of the above.
|
|
102
109
|
*/
|
|
103
110
|
pushFrom(p: any): void;
|
|
104
111
|
/**
|
|
105
112
|
* Replicate numWrap xy values from the front of the array as new values at the end.
|
|
106
|
-
* @param numWrap number of xy values to replicate
|
|
113
|
+
* @param numWrap number of xy values to replicate.
|
|
107
114
|
*/
|
|
108
115
|
pushWrap(numWrap: number): void;
|
|
109
116
|
/** push a point given by x,y coordinates */
|
|
110
117
|
pushXY(x: number, y: number): void;
|
|
111
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* Remove one point from the back.
|
|
112
120
|
* * NOTE that (in the manner of std::vector native) this is "just" removing the point -- no point is NOT returned.
|
|
113
|
-
* * Use `back ()` to get the last x,y assembled into a `Point2d
|
|
121
|
+
* * Use `back ()` to get the last x,y assembled into a `Point2d`.
|
|
114
122
|
*/
|
|
115
123
|
pop(): void;
|
|
116
124
|
/**
|
|
117
|
-
* Test if index is valid for an xy (point or vector) within this array
|
|
125
|
+
* Test if index is valid for an xy (point or vector) within this array.
|
|
118
126
|
* @param index xy index to test.
|
|
119
127
|
*/
|
|
120
128
|
isIndexValid(index: number): boolean;
|
|
121
|
-
/**
|
|
122
|
-
* Clear all xy data, but leave capacity unchanged.
|
|
123
|
-
*/
|
|
129
|
+
/** Clear all xy data, but leave capacity unchanged. */
|
|
124
130
|
clear(): void;
|
|
125
131
|
/**
|
|
126
|
-
* Get a point by index, strongly typed as a Point2d
|
|
127
|
-
* @param pointIndex index to access
|
|
128
|
-
* @param result optional result
|
|
132
|
+
* Get a point by index, strongly typed as a `Point2d`. This is unchecked. Use atPoint2dIndex to have validity test.
|
|
133
|
+
* @param pointIndex index to access.
|
|
134
|
+
* @param result optional result.
|
|
129
135
|
*/
|
|
130
136
|
getPoint2dAtUncheckedPointIndex(pointIndex: number, result?: Point2d): Point2d;
|
|
131
137
|
/**
|
|
132
|
-
* Get x coordinate by point index, with no index checking
|
|
133
|
-
* @param pointIndex index to access
|
|
138
|
+
* Get x coordinate by point index, with no index checking.
|
|
139
|
+
* @param pointIndex index to access.
|
|
134
140
|
*/
|
|
135
141
|
getXAtUncheckedPointIndex(pointIndex: number): number;
|
|
136
142
|
/**
|
|
137
|
-
* Get y coordinate by point index, with no index checking
|
|
138
|
-
* @param pointIndex index to access
|
|
143
|
+
* Get y coordinate by point index, with no index checking.
|
|
144
|
+
* @param pointIndex index to access.
|
|
139
145
|
*/
|
|
140
146
|
getYAtUncheckedPointIndex(pointIndex: number): number;
|
|
141
|
-
/**
|
|
142
|
-
* Gather all points as a Point2d[]
|
|
143
|
-
*/
|
|
147
|
+
/** Gather all points as a Point2d[]. */
|
|
144
148
|
getPoint2dArray(): Point2d[];
|
|
145
|
-
/**
|
|
149
|
+
/** Copy xy into strongly typed Point2d. */
|
|
146
150
|
getPoint2dAtCheckedPointIndex(pointIndex: number, result?: Point2d): Point2d | undefined;
|
|
147
|
-
/**
|
|
151
|
+
/** Copy xy into strongly typed Vector2d. */
|
|
148
152
|
getVector2dAtCheckedVectorIndex(vectorIndex: number, result?: Vector2d): Vector2d | undefined;
|
|
149
153
|
/**
|
|
150
154
|
* Read coordinates from source array, place them at index within this array.
|
|
151
|
-
* @param destIndex point index where coordinates are to be placed in this array
|
|
152
|
-
* @param source source array
|
|
153
|
-
* @param sourceIndex point index in source array
|
|
155
|
+
* @param destIndex point index where coordinates are to be placed in this array.
|
|
156
|
+
* @param source source array.
|
|
157
|
+
* @param sourceIndex point index in source array.
|
|
154
158
|
* @returns true if destIndex and sourceIndex are both valid.
|
|
155
159
|
*/
|
|
156
160
|
transferFromGrowableXYArray(destIndex: number, source: GrowableXYArray, sourceIndex: number): boolean;
|
|
157
161
|
/**
|
|
158
|
-
*
|
|
159
|
-
* @param source source array
|
|
160
|
-
* @param sourceIndex xy index within the source. If undefined, push entire contents of source
|
|
162
|
+
* Push coordinates from the source array to the end of this array.
|
|
163
|
+
* @param source source array.
|
|
164
|
+
* @param sourceIndex xy index within the source. If undefined, push entire contents of source.
|
|
161
165
|
* @returns number of points pushed.
|
|
162
166
|
*/
|
|
163
167
|
pushFromGrowableXYArray(source: GrowableXYArray, sourceIndex?: number): number;
|
|
164
168
|
/**
|
|
165
|
-
* * Compute a point at fractional coordinate between points i and j of source
|
|
166
|
-
* *
|
|
169
|
+
* * Compute a point at fractional coordinate between points i and j of source.
|
|
170
|
+
* * Push onto this array.
|
|
167
171
|
*/
|
|
168
172
|
pushInterpolatedFromGrowableXYArray(source: GrowableXYArray, i: number, fraction: number, j: number): void;
|
|
169
173
|
/**
|
|
170
174
|
* Create an array of xy points from source xyz points.
|
|
171
|
-
* @param source source array of xyz
|
|
175
|
+
* @param source source array of xyz.
|
|
172
176
|
* @param transform optional transform to apply to xyz points.
|
|
173
177
|
* @param dest optional result.
|
|
174
178
|
*/
|
|
175
179
|
static createFromGrowableXYZArray(source: GrowableXYZArray, transform?: Transform, dest?: GrowableXYArray): GrowableXYArray;
|
|
176
|
-
/**
|
|
177
|
-
* Return the first point, or undefined if the array is empty.
|
|
178
|
-
*/
|
|
180
|
+
/** Return the first point, or undefined if the array is empty. */
|
|
179
181
|
front(result?: Point2d): Point2d | undefined;
|
|
180
|
-
/**
|
|
181
|
-
* Return the last point, or undefined if the array is empty.
|
|
182
|
-
*/
|
|
182
|
+
/** Return the last point, or undefined if the array is empty. */
|
|
183
183
|
back(result?: Point2d): Point2d | undefined;
|
|
184
184
|
/**
|
|
185
185
|
* Set the coordinates of a single point.
|
|
186
|
-
* @param pointIndex index of point to set
|
|
187
|
-
* @param value coordinates to set
|
|
186
|
+
* @param pointIndex index of point to set.
|
|
187
|
+
* @param value coordinates to set.
|
|
188
188
|
*/
|
|
189
189
|
setAtCheckedPointIndex(pointIndex: number, value: XAndY): boolean;
|
|
190
190
|
/**
|
|
191
191
|
* Set the coordinates of a single point given as coordinates.
|
|
192
|
-
* @param pointIndex index of point to set
|
|
193
|
-
* @param x x coordinate
|
|
194
|
-
* @param y y coordinate
|
|
192
|
+
* @param pointIndex index of point to set.
|
|
193
|
+
* @param x x coordinate.
|
|
194
|
+
* @param y y coordinate.
|
|
195
195
|
*/
|
|
196
196
|
setXYAtCheckedPointIndex(pointIndex: number, x: number, y: number): boolean;
|
|
197
|
-
/**
|
|
198
|
-
* Copy all points into a simple array of Point3d with given z.
|
|
199
|
-
*/
|
|
197
|
+
/** Copy all points into a simple array of Point3d with given z. */
|
|
200
198
|
getPoint3dArray(z?: number): Point3d[];
|
|
201
|
-
/**
|
|
199
|
+
/** Reverse the order of points. */
|
|
202
200
|
reverseInPlace(): void;
|
|
203
|
-
/**
|
|
201
|
+
/** Multiply each point by the transform, replace values. */
|
|
204
202
|
multiplyTransformInPlace(transform: Transform): void;
|
|
205
|
-
/**
|
|
203
|
+
/** Multiply each xy (as a vector) by matrix, replace values. */
|
|
206
204
|
multiplyMatrix3dInPlace(matrix: Matrix3d): void;
|
|
207
|
-
/**
|
|
205
|
+
/** Multiply each point by the transform, replace values. */
|
|
208
206
|
tryTransformInverseInPlace(transform: Transform): boolean;
|
|
209
207
|
/** Extend a `Range2d`, optionally transforming the points. */
|
|
210
208
|
extendRange(rangeToExtend: Range2d, transform?: Transform): void;
|
|
211
|
-
/**
|
|
209
|
+
/** Sum the lengths of segments between points. */
|
|
212
210
|
sumLengths(): number;
|
|
213
211
|
/**
|
|
214
212
|
* Multiply each x,y by the scale factor.
|
|
215
|
-
* @param factor
|
|
213
|
+
* @param factor scale factor.
|
|
216
214
|
*/
|
|
217
215
|
scaleInPlace(factor: number): void;
|
|
218
|
-
/** Compute a point at fractional coordinate between points i and j */
|
|
216
|
+
/** Compute a point at fractional coordinate between points i and j. */
|
|
219
217
|
interpolate(i: number, fraction: number, j: number, result?: Point2d): Point2d | undefined;
|
|
220
|
-
/** Sum the signed areas of the projection to xy plane */
|
|
218
|
+
/** Sum the signed areas of the projection to xy plane. */
|
|
221
219
|
areaXY(): number;
|
|
222
|
-
/** Compute a vector from index origin i to indexed target j
|
|
220
|
+
/** Compute a vector from index origin i to indexed target j. */
|
|
223
221
|
vectorIndexIndex(i: number, j: number, result?: Vector2d): Vector2d | undefined;
|
|
224
|
-
/** Compute a vector from origin to indexed target j */
|
|
222
|
+
/** Compute a vector from origin to indexed target j. */
|
|
225
223
|
vectorXAndYIndex(origin: XAndY, j: number, result?: Vector2d): Vector2d | undefined;
|
|
226
|
-
/** Compute the cross product of vectors from from indexed origin to indexed targets i and j */
|
|
224
|
+
/** Compute the cross product of vectors from from indexed origin to indexed targets i and j. */
|
|
227
225
|
crossProductIndexIndexIndex(originIndex: number, targetAIndex: number, targetBIndex: number): number | undefined;
|
|
228
|
-
/** Compute the cross product of vectors from from origin to indexed targets i and j */
|
|
226
|
+
/** Compute the cross product of vectors from from origin to indexed targets i and j. */
|
|
229
227
|
crossProductXAndYIndexIndex(origin: XAndY, targetAIndex: number, targetBIndex: number): number | undefined;
|
|
230
228
|
/** Return the distance between two points in the array. */
|
|
231
229
|
distance(i: number, j: number): number | undefined;
|
|
@@ -233,13 +231,13 @@ export declare class GrowableXYArray extends IndexedXYCollection {
|
|
|
233
231
|
distanceIndexToPoint(i: number, spacePoint: Point2d): number | undefined;
|
|
234
232
|
/** Test for nearly equal arrays. */
|
|
235
233
|
static isAlmostEqual(dataA: GrowableXYArray | undefined, dataB: GrowableXYArray | undefined): boolean;
|
|
236
|
-
/** Return an array of block indices sorted per compareLexicalBlock function */
|
|
234
|
+
/** Return an array of block indices sorted per compareLexicalBlock function. */
|
|
237
235
|
sortIndicesLexical(): Uint32Array;
|
|
238
236
|
/** compare two blocks in simple lexical order. */
|
|
239
237
|
compareLexicalBlock(ia: number, ib: number): number;
|
|
240
|
-
/** Access a single double at offset within a block.
|
|
238
|
+
/** Access a single double at offset within a block. This has no index checking. */
|
|
241
239
|
component(pointIndex: number, componentIndex: number): number;
|
|
242
|
-
/** Toleranced equality test */
|
|
240
|
+
/** Toleranced equality test. */
|
|
243
241
|
isAlmostEqual(other: GrowableXYArray, tolerance?: number): boolean;
|
|
244
242
|
}
|
|
245
243
|
//# sourceMappingURL=GrowableXYArray.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GrowableXYArray.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/GrowableXYArray.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GrowableXYArray.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/GrowableXYArray.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,4BAA4B,EAAuB,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAE3C;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,4BAA4B;IAC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