@itwin/core-geometry 3.3.0-dev.72 → 3.3.0-dev.77
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/lib/cjs/curve/spiral/DirectSpiral3d.js +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.d.ts +32 -3
- package/lib/cjs/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js +63 -14
- package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts +24 -8
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js +72 -54
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts +51 -26
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js +136 -116
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +35 -21
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +124 -137
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.d.ts +32 -3
- package/lib/esm/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js +63 -14
- package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts +24 -8
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js +72 -54
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.d.ts +51 -26
- package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js +136 -116
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts +35 -21
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +124 -137
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/package.json +4 -4
|
@@ -15,20 +15,53 @@ exports.GrowableFloat64Array = void 0;
|
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
17
|
class GrowableFloat64Array {
|
|
18
|
-
|
|
18
|
+
/** Construct a GrowableFloat64Array.
|
|
19
|
+
* @param initialCapacity initial capacity (default 8)
|
|
20
|
+
* @param growthFactor used by ensureCapacity to expand requested reallocation size (default 1.5)
|
|
21
|
+
*/
|
|
22
|
+
constructor(initialCapacity = 8, growthFactor) {
|
|
19
23
|
this._data = new Float64Array(initialCapacity);
|
|
20
24
|
this._inUse = 0;
|
|
25
|
+
this._growthFactor = (undefined !== growthFactor && growthFactor >= 1.0) ? growthFactor : 1.5;
|
|
26
|
+
}
|
|
27
|
+
/** Copy data from source array. Does not reallocate or change active entry count.
|
|
28
|
+
* @param source array to copy from
|
|
29
|
+
* @param sourceCount copy the first sourceCount entries; all entries if undefined
|
|
30
|
+
* @param destOffset copy to instance array starting at this index; zero if undefined
|
|
31
|
+
* @return count and offset of entries copied
|
|
32
|
+
*/
|
|
33
|
+
copyData(source, sourceCount, destOffset) {
|
|
34
|
+
let myOffset = destOffset !== null && destOffset !== void 0 ? destOffset : 0;
|
|
35
|
+
if (myOffset < 0)
|
|
36
|
+
myOffset = 0;
|
|
37
|
+
if (myOffset >= this._data.length)
|
|
38
|
+
return { count: 0, offset: 0 };
|
|
39
|
+
let myCount = sourceCount !== null && sourceCount !== void 0 ? sourceCount : source.length;
|
|
40
|
+
if (myCount > 0) {
|
|
41
|
+
if (myCount > source.length)
|
|
42
|
+
myCount = source.length;
|
|
43
|
+
if (myOffset + myCount > this._data.length)
|
|
44
|
+
myCount = this._data.length - myOffset;
|
|
45
|
+
}
|
|
46
|
+
if (myCount <= 0)
|
|
47
|
+
return { count: 0, offset: 0 };
|
|
48
|
+
if (myCount === source.length)
|
|
49
|
+
this._data.set(source, myOffset);
|
|
50
|
+
else if (source instanceof Float64Array)
|
|
51
|
+
this._data.set(source.subarray(0, myCount), myOffset);
|
|
52
|
+
else
|
|
53
|
+
this._data.set(source.slice(0, myCount), myOffset);
|
|
54
|
+
return { count: myCount, offset: myOffset };
|
|
21
55
|
}
|
|
22
56
|
/**
|
|
23
57
|
* Create a GrowableFloat64Array with given contents.
|
|
24
58
|
* @param contents data to copy into the array
|
|
25
59
|
*/
|
|
26
60
|
static create(contents) {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return result;
|
|
61
|
+
const out = new GrowableFloat64Array(contents.length);
|
|
62
|
+
out.copyData(contents);
|
|
63
|
+
out._inUse = contents.length;
|
|
64
|
+
return out;
|
|
32
65
|
}
|
|
33
66
|
/** sort-compatible comparison.
|
|
34
67
|
* * Returns `(a-b)` which is
|
|
@@ -44,11 +77,9 @@ class GrowableFloat64Array {
|
|
|
44
77
|
* * optionally trimmed capacity to the active length or replicate the capacity and unused space.
|
|
45
78
|
*/
|
|
46
79
|
clone(maintainExcessCapacity = false) {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
for (let i = 0; i < n; i++)
|
|
51
|
-
out.push(data[i]);
|
|
80
|
+
const out = new GrowableFloat64Array(maintainExcessCapacity ? this.capacity() : this._inUse);
|
|
81
|
+
out.copyData(this._data, this._inUse);
|
|
82
|
+
out._inUse = this._inUse;
|
|
52
83
|
return out;
|
|
53
84
|
}
|
|
54
85
|
/**
|
|
@@ -89,41 +120,30 @@ class GrowableFloat64Array {
|
|
|
89
120
|
* @param toPush value to append to the active array.
|
|
90
121
|
*/
|
|
91
122
|
push(toPush) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
// Make new array (double size), copy values, then push toPush
|
|
98
|
-
const newData = new Float64Array(4 + this._inUse * 2);
|
|
99
|
-
for (let i = 0; i < this._inUse; i++) {
|
|
100
|
-
newData[i] = this._data[i];
|
|
101
|
-
}
|
|
102
|
-
this._data = newData;
|
|
103
|
-
this._data[this._inUse] = toPush;
|
|
104
|
-
this._inUse++;
|
|
105
|
-
}
|
|
123
|
+
this.ensureCapacity(this._inUse + 1);
|
|
124
|
+
this._data[this._inUse] = toPush;
|
|
125
|
+
this._inUse++;
|
|
106
126
|
}
|
|
107
127
|
/**
|
|
108
128
|
* Push each value from an array.
|
|
109
129
|
* @param data array of values to push
|
|
110
130
|
*/
|
|
111
131
|
pushArray(data) {
|
|
112
|
-
|
|
113
|
-
|
|
132
|
+
this.ensureCapacity(this._inUse + data.length);
|
|
133
|
+
this.copyData(data, data.length, this._inUse);
|
|
134
|
+
this._inUse += data.length;
|
|
114
135
|
}
|
|
115
|
-
/** Push
|
|
136
|
+
/** Push `numToCopy` consecutive values starting at `copyFromIndex`. */
|
|
116
137
|
pushBlockCopy(copyFromIndex, numToCopy) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
138
|
+
if (copyFromIndex >= 0 && copyFromIndex < this._inUse && numToCopy > 0 && copyFromIndex + numToCopy <= this._inUse) {
|
|
139
|
+
this.ensureCapacity(this._inUse + numToCopy);
|
|
140
|
+
this._data.copyWithin(this._inUse, copyFromIndex, copyFromIndex + numToCopy);
|
|
141
|
+
this._inUse += numToCopy;
|
|
142
|
+
}
|
|
122
143
|
}
|
|
123
144
|
/** Clear the array to 0 length. The underlying memory remains allocated for reuse. */
|
|
124
145
|
clear() {
|
|
125
|
-
|
|
126
|
-
this.pop();
|
|
146
|
+
this._inUse = 0;
|
|
127
147
|
}
|
|
128
148
|
/**
|
|
129
149
|
* Returns the number of entries in the supporting Float64Array buffer.
|
|
@@ -133,36 +153,34 @@ class GrowableFloat64Array {
|
|
|
133
153
|
return this._data.length;
|
|
134
154
|
}
|
|
135
155
|
/**
|
|
136
|
-
* * If the capacity (Float64Array length) is less than or equal to the requested newCapacity, do nothing
|
|
137
|
-
* * If the requested newCapacity is larger than the existing capacity, reallocate
|
|
138
|
-
* @param newCapacity
|
|
156
|
+
* * If the capacity (Float64Array length) is less than or equal to the requested newCapacity, do nothing.
|
|
157
|
+
* * If the requested newCapacity is larger than the existing capacity, reallocate to larger capacity, and copy existing values.
|
|
158
|
+
* @param newCapacity size of new array
|
|
159
|
+
* @param applyGrowthFactor whether to apply the growth factor to newCapacity when reallocating
|
|
139
160
|
*/
|
|
140
|
-
ensureCapacity(newCapacity) {
|
|
161
|
+
ensureCapacity(newCapacity, applyGrowthFactor = true) {
|
|
141
162
|
if (newCapacity > this.capacity()) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
this.
|
|
163
|
+
if (applyGrowthFactor)
|
|
164
|
+
newCapacity *= this._growthFactor;
|
|
165
|
+
const prevData = this._data;
|
|
166
|
+
this._data = new Float64Array(newCapacity);
|
|
167
|
+
this.copyData(prevData, this._inUse);
|
|
147
168
|
}
|
|
148
169
|
}
|
|
149
170
|
/**
|
|
150
|
-
* * If newLength is less than current
|
|
151
|
-
* * If newLength is greater,
|
|
171
|
+
* * If newLength is less than current length, just reset current length to newLength, effectively trimming active entries but preserving original capacity.
|
|
172
|
+
* * If newLength is greater than current length, reallocate to (exactly) newLength, copy existing entries, and pad with padValue up to newLength.
|
|
152
173
|
* @param newLength new data count
|
|
153
174
|
* @param padValue value to use for padding if the length increases.
|
|
154
175
|
*/
|
|
155
176
|
resize(newLength, padValue = 0) {
|
|
156
|
-
|
|
157
|
-
|
|
177
|
+
if (newLength >= 0 && newLength < this._inUse)
|
|
178
|
+
this._inUse = newLength;
|
|
179
|
+
else if (newLength > this._inUse) {
|
|
180
|
+
this.ensureCapacity(newLength, false);
|
|
181
|
+
this._data.fill(padValue, this._inUse);
|
|
158
182
|
this._inUse = newLength;
|
|
159
|
-
return;
|
|
160
183
|
}
|
|
161
|
-
const oldLength = this._inUse;
|
|
162
|
-
this.ensureCapacity(newLength);
|
|
163
|
-
for (let i = oldLength; i < newLength; i++)
|
|
164
|
-
this._data[i] = padValue;
|
|
165
|
-
this._inUse = newLength;
|
|
166
184
|
}
|
|
167
185
|
/**
|
|
168
186
|
* * Reduce the length by one.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GrowableFloat64Array.js","sourceRoot":"","sources":["../../../src/geometry3d/GrowableFloat64Array.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAgB/F;;;;;;;;GAQG;AACH,MAAa,oBAAoB;IAG/B,YAAY,kBAA0B,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,eAAe,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,CAAC;IACD;;;OAGG;IACI,MAAM,CAAC,MAAM,CAAC,QAAiC;QACpD,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACzD,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE;YACxB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAChB;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD;;;;;OAKG;IACI,MAAM,CAAC,OAAO,CAAC,CAAM,EAAE,CAAM;QAClC,OAAO,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IACD;;;OAGG;IACI,KAAK,CAAC,yBAAkC,KAAK;QACl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,CAAC,CAAC,CAAC,CAAC;YACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAClB,IAAI,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC;SACzB;QACD,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,0BAA0B,CAAC,YAAoB,GAAG;QACvD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC;YACT,OAAO;QAET,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,IAAI,CAAC,CAAC;QACN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAC1B,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACZ,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,EAAE;gBAC/B,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;gBACxB,CAAC,GAAG,CAAC,CAAC;aACP;SACF;QACD,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC;IAC5B,CAAC;CAEF;AAjPD,oDAiPC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module ArraysAndInterfaces\r\n */\r\n\r\n/**\r\n * Type for a OptionalGrowableFloat64Array or undefined.\r\n * @public\r\n */\r\nexport type OptionalGrowableFloat64Array = GrowableFloat64Array | undefined;\r\n/**\r\n * Signature for a function which does lexical comparison of `blockSize` consecutive values as 2 starting indices.\r\n * @public\r\n */\r\nexport type BlockComparisonFunction = (data: Float64Array, blockSize: number, index0: number, index1: number) => number;\r\n/**\r\n * A `GrowableFloat64Array` is Float64Array accompanied by a count of how many of the array's entries are considered in use.\r\n * * In C++ terms, this is like an std::vector\r\n * * As entries are added to the array, the buffer is reallocated as needed to accommodate.\r\n * * The reallocations leave unused space to accept further additional entries without reallocation.\r\n * * The `length` property returns the number of entries in use.\r\n * * the `capacity` property returns the (usually larger) length of the (over-allocated) Float64Array.\r\n * @public\r\n */\r\nexport class GrowableFloat64Array {\r\n private _data: Float64Array;\r\n private _inUse: number;\r\n constructor(initialCapacity: number = 8) {\r\n this._data = new Float64Array(initialCapacity);\r\n this._inUse = 0;\r\n }\r\n /**\r\n * Create a GrowableFloat64Array with given contents.\r\n * @param contents data to copy into the array\r\n */\r\n public static create(contents: Float64Array | number[]): GrowableFloat64Array {\r\n const result = new GrowableFloat64Array(contents.length);\r\n for (const a of contents) {\r\n result.push(a);\r\n }\r\n return result;\r\n }\r\n /** sort-compatible comparison.\r\n * * Returns `(a-b)` which is\r\n * * negative if `a<b`\r\n * * zero if `a === b` (with exact equality)\r\n * * positive if `a>b`\r\n */\r\n public static compare(a: any, b: any): number {\r\n return a - b;\r\n }\r\n /** Return a new array with\r\n * * All active entries copied from this instance\r\n * * optionally trimmed capacity to the active length or replicate the capacity and unused space.\r\n */\r\n public clone(maintainExcessCapacity: boolean = false): GrowableFloat64Array {\r\n const n = this._inUse;\r\n const data = this._data;\r\n const out = new GrowableFloat64Array(maintainExcessCapacity ? this.capacity() : n);\r\n for (let i = 0; i < n; i++)\r\n out.push(data[i]);\r\n return out;\r\n }\r\n /**\r\n * Returns the number of entries in use.\r\n * * Note that this is typically smaller than the length of the length of the supporting `Float64Array`\r\n */\r\n public get length() {\r\n return this._inUse;\r\n }\r\n /**\r\n * Set the value at specified index.\r\n * @param index index of entry to set\r\n * @param value value to set\r\n */\r\n public setAtUncheckedIndex(index: number, value: number) {\r\n this._data[index] = value;\r\n }\r\n\r\n /**\r\n * Move the value at index i to index j.\r\n * @param i source index\r\n * @param j destination index.\r\n */\r\n public move(i: number, j: number) {\r\n this._data[j] = this._data[i];\r\n }\r\n /**\r\n * swap the values at indices i and j\r\n * @param i first index\r\n * @param j second index\r\n */\r\n public swap(i: number, j: number) {\r\n const a = this._data[i];\r\n this._data[i] = this._data[j];\r\n this._data[j] = a;\r\n }\r\n\r\n /**\r\n * append a single value to the array.\r\n * @param toPush value to append to the active array.\r\n */\r\n public push(toPush: number) {\r\n if (this._inUse + 1 <= this._data.length) {\r\n this._data[this._inUse] = toPush;\r\n this._inUse++;\r\n } else {\r\n // Make new array (double size), copy values, then push toPush\r\n const newData = new Float64Array(4 + this._inUse * 2);\r\n for (let i = 0; i < this._inUse; i++) {\r\n newData[i] = this._data[i];\r\n }\r\n this._data = newData;\r\n this._data[this._inUse] = toPush;\r\n this._inUse++;\r\n }\r\n }\r\n /**\r\n * Push each value from an array.\r\n * @param data array of values to push\r\n */\r\n public pushArray(data: Float64Array | number[]) {\r\n for (const a of data) this.push(a);\r\n }\r\n /** Push a `numToCopy` consecutive values starting at `copyFromIndex` to the end of the array. */\r\n public pushBlockCopy(copyFromIndex: number, numToCopy: number) {\r\n const newLength = this._inUse + numToCopy;\r\n this.ensureCapacity(newLength);\r\n const limit = copyFromIndex + numToCopy;\r\n for (let i = copyFromIndex; i < limit; i++)\r\n this._data[this._inUse++] = this._data[i];\r\n }\r\n /** Clear the array to 0 length. The underlying memory remains allocated for reuse. */\r\n public clear() {\r\n while (this._inUse > 0)\r\n this.pop();\r\n }\r\n /**\r\n * Returns the number of entries in the supporting Float64Array buffer.\r\n * * This number can be larger than the `length` property.\r\n */\r\n public capacity() {\r\n return this._data.length;\r\n }\r\n /**\r\n * * If the capacity (Float64Array length) is less than or equal to the requested newCapacity, do nothing\r\n * * If the requested newCapacity is larger than the existing capacity, reallocate (and copy existing values) with the larger capacity.\r\n * @param newCapacity\r\n */\r\n public ensureCapacity(newCapacity: number) {\r\n if (newCapacity > this.capacity()) {\r\n const oldInUse = this._inUse;\r\n const newData = new Float64Array(newCapacity);\r\n for (let i = 0; i < oldInUse; i++)\r\n newData[i] = this._data[i];\r\n this._data = newData;\r\n }\r\n }\r\n /**\r\n * * If newLength is less than current (active) length, just set (active) length.\r\n * * If newLength is greater, ensureCapacity (newSize) and pad with padValue up to newSize;\r\n * @param newLength new data count\r\n * @param padValue value to use for padding if the length increases.\r\n */\r\n public resize(newLength: number, padValue: number = 0) {\r\n // quick out for easy case ...\r\n if (newLength <= this._inUse) {\r\n this._inUse = newLength;\r\n return;\r\n }\r\n const oldLength = this._inUse;\r\n this.ensureCapacity(newLength);\r\n for (let i = oldLength; i < newLength; i++)\r\n this._data[i] = padValue;\r\n this._inUse = newLength;\r\n }\r\n /**\r\n * * Reduce the length by one.\r\n * * Note that there is no method return value -- use `back` to get that value before `pop()`\r\n * * (As with std::vector, separating the `pop` from the value access eliminates error testing from `pop` call)\r\n */\r\n public pop() {\r\n // Could technically access outside of array, if filled and then reduced using pop (similar to C\r\n // and accessing out of bounds), but with adjusted inUse counter, that data will eventually be overwritten\r\n if (this._inUse > 0) {\r\n this._inUse--;\r\n }\r\n }\r\n /** Access by index, without bounds check */\r\n public atUncheckedIndex(index: number): number {\r\n return this._data[index];\r\n }\r\n /** Access the 0-index member, without bounds check */\r\n public front() {\r\n return this._data[0];\r\n }\r\n /** Access the final member, without bounds check */\r\n public back() {\r\n return this._data[this._inUse - 1];\r\n }\r\n /** set a value by index */\r\n public reassign(index: number, value: number) {\r\n this._data[index] = value;\r\n }\r\n\r\n /**\r\n * * Sort the array entries.\r\n * * Uses insertion sort -- fine for small arrays (less than 30), slow for larger arrays\r\n * @param compareMethod comparison method\r\n */\r\n public sort(compareMethod: (a: any, b: any) => number = GrowableFloat64Array.compare) {\r\n for (let i = 0; i < this._inUse; i++) {\r\n for (let j = i + 1; j < this._inUse; j++) {\r\n const tempI = this._data[i];\r\n const tempJ = this._data[j];\r\n if (compareMethod(tempI, tempJ) > 0) {\r\n this._data[i] = tempJ;\r\n this._data[j] = tempI;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * * compress out values not within the [a,b] interval.\r\n * * Note that if a is greater than b all values are rejected.\r\n * @param a low value for accepted interval\r\n * @param b high value for accepted interval\r\n */\r\n public restrictToInterval(a: number, b: number) {\r\n const data = this._data;\r\n const n = data.length;\r\n let numAccept = 0;\r\n let q = 0;\r\n for (let i = 0; i < n; i++) {\r\n q = data[i];\r\n if (q >= a && q <= b)\r\n data[numAccept++] = q;\r\n }\r\n this._inUse = numAccept;\r\n }\r\n\r\n /**\r\n * * compress out multiple copies of values.\r\n * * this is done in the current order of the array.\r\n */\r\n public compressAdjacentDuplicates(tolerance: number = 0.0) {\r\n const data = this._data;\r\n const n = this._inUse;\r\n if (n === 0)\r\n return;\r\n\r\n let numAccepted = 1;\r\n let a = data[0];\r\n let b;\r\n for (let i = 1; i < n; i++) {\r\n b = data[i];\r\n if (Math.abs(b - a) > tolerance) {\r\n data[numAccepted++] = b;\r\n a = b;\r\n }\r\n }\r\n this._inUse = numAccepted;\r\n }\r\n\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"GrowableFloat64Array.js","sourceRoot":"","sources":["../../../src/geometry3d/GrowableFloat64Array.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAgB/F;;;;;;;;GAQG;AACH,MAAa,oBAAoB;IAK/B;;;OAGG;IACH,YAAY,kBAA0B,CAAC,EAAE,YAAqB;QAC5D,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,eAAe,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,aAAa,GAAG,CAAC,SAAS,KAAK,YAAY,IAAI,YAAY,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC;IAChG,CAAC;IAED;;;;;OAKG;IACO,QAAQ,CAAC,MAA+B,EAAE,WAAoB,EA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CAAC,GAAG,CAAC,CAAC;SACzB;QACD,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,0BAA0B,CAAC,YAAoB,GAAG;QACvD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC;YACT,OAAO;QAET,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,IAAI,CAAC,CAAC;QACN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAC1B,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACZ,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,EAAE;gBAC/B,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;gBACxB,CAAC,GAAG,CAAC,CAAC;aACP;SACF;QACD,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC;IAC5B,CAAC;CAEF;AAzQD,oDAyQC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module ArraysAndInterfaces\r\n */\r\n\r\n/**\r\n * Type for a OptionalGrowableFloat64Array or undefined.\r\n * @public\r\n */\r\nexport type OptionalGrowableFloat64Array = GrowableFloat64Array | undefined;\r\n/**\r\n * Signature for a function which does lexical comparison of `blockSize` consecutive values as 2 starting indices.\r\n * @public\r\n */\r\nexport type BlockComparisonFunction = (data: Float64Array, blockSize: number, index0: number, index1: number) => number;\r\n/**\r\n * A `GrowableFloat64Array` is Float64Array accompanied by a count of how many of the array's entries are considered in use.\r\n * * In C++ terms, this is like an std::vector\r\n * * As entries are added to the array, the buffer is reallocated as needed to accommodate.\r\n * * The reallocations leave unused space to accept further additional entries without reallocation.\r\n * * The `length` property returns the number of entries in use.\r\n * * the `capacity` property returns the (usually larger) length of the (over-allocated) Float64Array.\r\n * @public\r\n */\r\nexport class GrowableFloat64Array {\r\n private _data: Float64Array;\r\n private _inUse: number;\r\n private _growthFactor: number;\r\n\r\n /** Construct a GrowableFloat64Array.\r\n * @param initialCapacity initial capacity (default 8)\r\n * @param growthFactor used by ensureCapacity to expand requested reallocation size (default 1.5)\r\n */\r\n constructor(initialCapacity: number = 8, growthFactor?: number) {\r\n this._data = new Float64Array(initialCapacity);\r\n this._inUse = 0;\r\n this._growthFactor = (undefined !== growthFactor && growthFactor >= 1.0) ? growthFactor : 1.5;\r\n }\r\n\r\n /** Copy data from source array. Does not reallocate or change active entry count.\r\n * @param source array to copy from\r\n * @param sourceCount copy the first sourceCount entries; all entries if undefined\r\n * @param destOffset copy to instance array starting at this index; zero if undefined\r\n * @return count and offset of entries copied\r\n */\r\n protected copyData(source: Float64Array | number[], sourceCount?: number, destOffset?: number): {count: number, offset: number} {\r\n let myOffset = destOffset ?? 0;\r\n if (myOffset < 0)\r\n myOffset = 0;\r\n if (myOffset >= this._data.length)\r\n return {count: 0, offset: 0};\r\n let myCount = sourceCount ?? source.length;\r\n if (myCount > 0) {\r\n if (myCount > source.length)\r\n myCount = source.length;\r\n if (myOffset + myCount > this._data.length)\r\n myCount = this._data.length - myOffset;\r\n }\r\n if (myCount <= 0)\r\n return {count: 0, offset: 0};\r\n if (myCount === source.length)\r\n this._data.set(source, myOffset);\r\n else if (source instanceof Float64Array)\r\n this._data.set(source.subarray(0, myCount), myOffset);\r\n else\r\n this._data.set(source.slice(0, myCount), myOffset);\r\n return {count: myCount, offset: myOffset};\r\n }\r\n\r\n /**\r\n * Create a GrowableFloat64Array with given contents.\r\n * @param contents data to copy into the array\r\n */\r\n public static create(contents: Float64Array | number[]): GrowableFloat64Array {\r\n const out = new GrowableFloat64Array(contents.length);\r\n out.copyData(contents);\r\n out._inUse = contents.length;\r\n return out;\r\n }\r\n /** sort-compatible comparison.\r\n * * Returns `(a-b)` which is\r\n * * negative if `a<b`\r\n * * zero if `a === b` (with exact equality)\r\n * * positive if `a>b`\r\n */\r\n public static compare(a: any, b: any): number {\r\n return a - b;\r\n }\r\n /** Return a new array with\r\n * * All active entries copied from this instance\r\n * * optionally trimmed capacity to the active length or replicate the capacity and unused space.\r\n */\r\n public clone(maintainExcessCapacity: boolean = false): GrowableFloat64Array {\r\n const out = new GrowableFloat64Array(maintainExcessCapacity ? this.capacity() : this._inUse);\r\n out.copyData(this._data, this._inUse);\r\n out._inUse = this._inUse;\r\n return out;\r\n }\r\n /**\r\n * Returns the number of entries in use.\r\n * * Note that this is typically smaller than the length of the length of the supporting `Float64Array`\r\n */\r\n public get length() {\r\n return this._inUse;\r\n }\r\n /**\r\n * Set the value at specified index.\r\n * @param index index of entry to set\r\n * @param value value to set\r\n */\r\n public setAtUncheckedIndex(index: number, value: number) {\r\n this._data[index] = value;\r\n }\r\n\r\n /**\r\n * Move the value at index i to index j.\r\n * @param i source index\r\n * @param j destination index.\r\n */\r\n public move(i: number, j: number) {\r\n this._data[j] = this._data[i];\r\n }\r\n /**\r\n * swap the values at indices i and j\r\n * @param i first index\r\n * @param j second index\r\n */\r\n public swap(i: number, j: number) {\r\n const a = this._data[i];\r\n this._data[i] = this._data[j];\r\n this._data[j] = a;\r\n }\r\n\r\n /**\r\n * append a single value to the array.\r\n * @param toPush value to append to the active array.\r\n */\r\n public push(toPush: number) {\r\n this.ensureCapacity(this._inUse + 1);\r\n this._data[this._inUse] = toPush;\r\n this._inUse++;\r\n }\r\n /**\r\n * Push each value from an array.\r\n * @param data array of values to push\r\n */\r\n public pushArray(data: Float64Array | number[]) {\r\n this.ensureCapacity(this._inUse + data.length);\r\n this.copyData(data, data.length, this._inUse);\r\n this._inUse += data.length;\r\n }\r\n /** Push `numToCopy` consecutive values starting at `copyFromIndex`. */\r\n public pushBlockCopy(copyFromIndex: number, numToCopy: number) {\r\n if (copyFromIndex >= 0 && copyFromIndex < this._inUse && numToCopy > 0 && copyFromIndex + numToCopy <= this._inUse) {\r\n this.ensureCapacity(this._inUse + numToCopy);\r\n this._data.copyWithin(this._inUse, copyFromIndex, copyFromIndex + numToCopy);\r\n this._inUse += numToCopy;\r\n }\r\n }\r\n /** Clear the array to 0 length. The underlying memory remains allocated for reuse. */\r\n public clear() {\r\n this._inUse = 0;\r\n }\r\n /**\r\n * Returns the number of entries in the supporting Float64Array buffer.\r\n * * This number can be larger than the `length` property.\r\n */\r\n public capacity() {\r\n return this._data.length;\r\n }\r\n /**\r\n * * If the capacity (Float64Array length) is less than or equal to the requested newCapacity, do nothing.\r\n * * If the requested newCapacity is larger than the existing capacity, reallocate to larger capacity, and copy existing values.\r\n * @param newCapacity size of new array\r\n * @param applyGrowthFactor whether to apply the growth factor to newCapacity when reallocating\r\n */\r\n public ensureCapacity(newCapacity: number, applyGrowthFactor: boolean = true) {\r\n if (newCapacity > this.capacity()) {\r\n if (applyGrowthFactor)\r\n newCapacity *= this._growthFactor;\r\n const prevData = this._data;\r\n this._data = new Float64Array(newCapacity);\r\n this.copyData(prevData, this._inUse);\r\n }\r\n }\r\n /**\r\n * * If newLength is less than current length, just reset current length to newLength, effectively trimming active entries but preserving original capacity.\r\n * * If newLength is greater than current length, reallocate to (exactly) newLength, copy existing entries, and pad with padValue up to newLength.\r\n * @param newLength new data count\r\n * @param padValue value to use for padding if the length increases.\r\n */\r\n public resize(newLength: number, padValue: number = 0) {\r\n if (newLength >= 0 && newLength < this._inUse)\r\n this._inUse = newLength;\r\n else if (newLength > this._inUse) {\r\n this.ensureCapacity(newLength, false);\r\n this._data.fill(padValue, this._inUse);\r\n this._inUse = newLength;\r\n }\r\n }\r\n /**\r\n * * Reduce the length by one.\r\n * * Note that there is no method return value -- use `back` to get that value before `pop()`\r\n * * (As with std::vector, separating the `pop` from the value access eliminates error testing from `pop` call)\r\n */\r\n public pop() {\r\n // Could technically access outside of array, if filled and then reduced using pop (similar to C\r\n // and accessing out of bounds), but with adjusted inUse counter, that data will eventually be overwritten\r\n if (this._inUse > 0) {\r\n this._inUse--;\r\n }\r\n }\r\n /** Access by index, without bounds check */\r\n public atUncheckedIndex(index: number): number {\r\n return this._data[index];\r\n }\r\n /** Access the 0-index member, without bounds check */\r\n public front() {\r\n return this._data[0];\r\n }\r\n /** Access the final member, without bounds check */\r\n public back() {\r\n return this._data[this._inUse - 1];\r\n }\r\n /** set a value by index */\r\n public reassign(index: number, value: number) {\r\n this._data[index] = value;\r\n }\r\n\r\n /**\r\n * * Sort the array entries.\r\n * * Uses insertion sort -- fine for small arrays (less than 30), slow for larger arrays\r\n * @param compareMethod comparison method\r\n */\r\n public sort(compareMethod: (a: any, b: any) => number = GrowableFloat64Array.compare) {\r\n for (let i = 0; i < this._inUse; i++) {\r\n for (let j = i + 1; j < this._inUse; j++) {\r\n const tempI = this._data[i];\r\n const tempJ = this._data[j];\r\n if (compareMethod(tempI, tempJ) > 0) {\r\n this._data[i] = tempJ;\r\n this._data[j] = tempI;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * * compress out values not within the [a,b] interval.\r\n * * Note that if a is greater than b all values are rejected.\r\n * @param a low value for accepted interval\r\n * @param b high value for accepted interval\r\n */\r\n public restrictToInterval(a: number, b: number) {\r\n const data = this._data;\r\n const n = data.length;\r\n let numAccept = 0;\r\n let q = 0;\r\n for (let i = 0; i < n; i++) {\r\n q = data[i];\r\n if (q >= a && q <= b)\r\n data[numAccept++] = q;\r\n }\r\n this._inUse = numAccept;\r\n }\r\n\r\n /**\r\n * * compress out multiple copies of values.\r\n * * this is done in the current order of the array.\r\n */\r\n public compressAdjacentDuplicates(tolerance: number = 0.0) {\r\n const data = this._data;\r\n const n = this._inUse;\r\n if (n === 0)\r\n return;\r\n\r\n let numAccepted = 1;\r\n let a = data[0];\r\n let b;\r\n for (let i = 1; i < n; i++) {\r\n b = data[i];\r\n if (Math.abs(b - a) > tolerance) {\r\n data[numAccepted++] = b;\r\n a = b;\r\n }\r\n }\r\n this._inUse = numAccepted;\r\n }\r\n\r\n}\r\n"]}
|
|
@@ -12,21 +12,36 @@ import { XAndY, XYAndZ } from "./XYZProps";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class GrowableXYArray extends IndexedXYCollection {
|
|
14
14
|
/**
|
|
15
|
-
* array of packed
|
|
15
|
+
* array of packed xy xy xy components
|
|
16
16
|
*/
|
|
17
17
|
private _data;
|
|
18
18
|
/**
|
|
19
|
-
* Number of
|
|
19
|
+
* Number of xy tuples (not floats) in the array
|
|
20
20
|
*/
|
|
21
21
|
private _xyInUse;
|
|
22
22
|
/**
|
|
23
|
-
* capacity in
|
|
23
|
+
* capacity in xy tuples. (not floats)
|
|
24
24
|
*/
|
|
25
|
-
private
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
25
|
+
private _xyCapacity;
|
|
26
|
+
/**
|
|
27
|
+
* multiplier used by ensureCapacity to expand requested reallocation size
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
private _growthFactor;
|
|
30
|
+
/** Construct a new GrowablePoint2d array.
|
|
31
|
+
* @param numPoints initial capacity in xy tuples (default 8)
|
|
32
|
+
* @param growthFactor used by ensureCapacity to expand requested reallocation size (default 1.5)
|
|
33
|
+
*/
|
|
34
|
+
constructor(numPoints?: number, growthFactor?: number);
|
|
35
|
+
/** Copy xy points from source array. Does not reallocate or change active point count.
|
|
36
|
+
* @param source array to copy from
|
|
37
|
+
* @param sourceCount copy the first sourceCount points; all points if undefined
|
|
38
|
+
* @param destOffset copy to instance array starting at this point index; zero if undefined
|
|
39
|
+
* @return count and offset of points copied
|
|
40
|
+
*/
|
|
41
|
+
protected copyData(source: Float64Array | number[], sourceCount?: number, destOffset?: number): {
|
|
42
|
+
count: number;
|
|
43
|
+
offset: number;
|
|
44
|
+
};
|
|
30
45
|
/** The number of points in use. When the length is increased, the array is padded with zeroes. */
|
|
31
46
|
get length(): number;
|
|
32
47
|
set length(newLength: number);
|
|
@@ -37,9 +52,14 @@ export declare class GrowableXYArray extends IndexedXYCollection {
|
|
|
37
52
|
*/
|
|
38
53
|
float64Data(): Float64Array;
|
|
39
54
|
/** If necessary, increase the capacity to a new pointCount. Current coordinates and point count (length) are unchanged. */
|
|
40
|
-
ensureCapacity(pointCapacity: number): void;
|
|
41
|
-
/**
|
|
42
|
-
|
|
55
|
+
ensureCapacity(pointCapacity: number, applyGrowthFactor?: boolean): void;
|
|
56
|
+
/**
|
|
57
|
+
* * If pointCount is less than current length, just reset current length to pointCount, effectively trimming active points but preserving original capacity.
|
|
58
|
+
* * If pointCount is greater than current length, reallocate to exactly pointCount, copy existing points, and 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
|
+
*/
|
|
62
|
+
resize(pointCount: number, padWithZero?: boolean): void;
|
|
43
63
|
/**
|
|
44
64
|
* Make a copy of the (active) points in this array.
|
|
45
65
|
* (The clone does NOT get excess capacity)
|
|
@@ -61,24 +81,24 @@ export declare class GrowableXYArray extends IndexedXYCollection {
|
|
|
61
81
|
/** push all points of an array */
|
|
62
82
|
pushAllXYAndZ(points: XYAndZ[] | GrowableXYZArray): void;
|
|
63
83
|
/**
|
|
64
|
-
* Replicate numWrap
|
|
65
|
-
* @param numWrap number of
|
|
84
|
+
* Replicate numWrap xy values from the front of the array as new values at the end.
|
|
85
|
+
* @param numWrap number of xy values to replicate
|
|
66
86
|
*/
|
|
67
87
|
pushWrap(numWrap: number): void;
|
|
68
88
|
/** push a point given by x,y coordinates */
|
|
69
89
|
pushXY(x: number, y: number): void;
|
|
70
90
|
/** Remove one point from the back.
|
|
71
91
|
* * NOTE that (in the manner of std::vector native) this is "just" removing the point -- no point is NOT returned.
|
|
72
|
-
* * Use `back ()` to get the last x,y
|
|
92
|
+
* * Use `back ()` to get the last x,y assembled into a `Point2d `
|
|
73
93
|
*/
|
|
74
94
|
pop(): void;
|
|
75
95
|
/**
|
|
76
|
-
* Test if index is valid for an
|
|
77
|
-
* @param index
|
|
96
|
+
* Test if index is valid for an xy (point or vector) within this array
|
|
97
|
+
* @param index xy index to test.
|
|
78
98
|
*/
|
|
79
99
|
isIndexValid(index: number): boolean;
|
|
80
100
|
/**
|
|
81
|
-
* Clear all
|
|
101
|
+
* Clear all xy data, but leave capacity unchanged.
|
|
82
102
|
*/
|
|
83
103
|
clear(): void;
|
|
84
104
|
/**
|
|
@@ -101,9 +121,9 @@ export declare class GrowableXYArray extends IndexedXYCollection {
|
|
|
101
121
|
* Gather all points as a Point2d[]
|
|
102
122
|
*/
|
|
103
123
|
getPoint2dArray(): Point2d[];
|
|
104
|
-
/** copy
|
|
124
|
+
/** copy xy into strongly typed Point2d */
|
|
105
125
|
getPoint2dAtCheckedPointIndex(pointIndex: number, result?: Point2d): Point2d | undefined;
|
|
106
|
-
/** copy
|
|
126
|
+
/** copy xy into strongly typed Vector2d */
|
|
107
127
|
getVector2dAtCheckedVectorIndex(vectorIndex: number, result?: Vector2d): Vector2d | undefined;
|
|
108
128
|
/**
|
|
109
129
|
* Read coordinates from source array, place them at index within this array.
|
|
@@ -116,8 +136,8 @@ export declare class GrowableXYArray extends IndexedXYCollection {
|
|
|
116
136
|
/**
|
|
117
137
|
* push coordinates from the source array to the end of this array.
|
|
118
138
|
* @param source source array
|
|
119
|
-
* @param sourceIndex
|
|
120
|
-
* @returns
|
|
139
|
+
* @param sourceIndex xy index within the source. If undefined, push entire contents of source
|
|
140
|
+
* @returns number of points pushed.
|
|
121
141
|
*/
|
|
122
142
|
pushFromGrowableXYArray(source: GrowableXYArray, sourceIndex?: number): number;
|
|
123
143
|
/**
|
|
@@ -126,9 +146,9 @@ export declare class GrowableXYArray extends IndexedXYCollection {
|
|
|
126
146
|
*/
|
|
127
147
|
pushInterpolatedFromGrowableXYArray(source: GrowableXYArray, i: number, fraction: number, j: number): void;
|
|
128
148
|
/**
|
|
129
|
-
*
|
|
130
|
-
* @param source source array
|
|
131
|
-
* @param transform optional transform to apply to points.
|
|
149
|
+
* Create an array of xy points from source xyz points.
|
|
150
|
+
* @param source source array of xyz
|
|
151
|
+
* @param transform optional transform to apply to xyz points.
|
|
132
152
|
* @param dest optional result.
|
|
133
153
|
*/
|
|
134
154
|
static createFromGrowableXYZArray(source: GrowableXYZArray, transform?: Transform, dest?: GrowableXYArray): GrowableXYArray;
|
|
@@ -152,16 +172,21 @@ export declare class GrowableXYArray extends IndexedXYCollection {
|
|
|
152
172
|
* @param x x coordinate
|
|
153
173
|
* @param y y coordinate
|
|
154
174
|
*/
|
|
175
|
+
setXYAtCheckedPointIndex(pointIndex: number, x: number, y: number): boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Set the coordinates of a single point given as coordinates.
|
|
178
|
+
* @deprecated Use setXYAtCheckedPointIndex instead
|
|
179
|
+
*/
|
|
155
180
|
setXYZAtCheckedPointIndex(pointIndex: number, x: number, y: number): boolean;
|
|
156
181
|
/**
|
|
157
|
-
* Copy all points into a simple array of
|
|
182
|
+
* Copy all points into a simple array of Point3d with given z.
|
|
158
183
|
*/
|
|
159
184
|
getPoint3dArray(z?: number): Point3d[];
|
|
160
185
|
/** reverse the order of points. */
|
|
161
186
|
reverseInPlace(): void;
|
|
162
187
|
/** multiply each point by the transform, replace values. */
|
|
163
188
|
multiplyTransformInPlace(transform: Transform): void;
|
|
164
|
-
/** multiply each
|
|
189
|
+
/** multiply each xy (as a vector) by matrix, replace values. */
|
|
165
190
|
multiplyMatrix3dInPlace(matrix: Matrix3d): void;
|
|
166
191
|
/** multiply each point by the transform, replace values. */
|
|
167
192
|
tryTransformInverseInPlace(transform: Transform): boolean;
|
|
@@ -170,7 +195,7 @@ export declare class GrowableXYArray extends IndexedXYCollection {
|
|
|
170
195
|
/** sum the lengths of segments between points. */
|
|
171
196
|
sumLengths(): number;
|
|
172
197
|
/**
|
|
173
|
-
* Multiply each x,y
|
|
198
|
+
* Multiply each x,y by the scale factor.
|
|
174
199
|
* @param factor
|
|
175
200
|
*/
|
|
176
201
|
scaleInPlace(factor: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GrowableXYArray.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/GrowableXYArray.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,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;AAE5C,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;;GAEG;AACH,qBAAa,eAAgB,SAAQ,mBAAmB;IACtD;;OAEG;IACH,OAAO,CAAC,KAAK,CAAe;IAC5B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAS;IACzB;;OAEG;IACH,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"GrowableXYArray.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/GrowableXYArray.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,QAAQ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