@mlightcad/geometry-engine 1.0.0

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.
Files changed (149) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +13 -0
  3. package/dist/geometry-engine.js +10186 -0
  4. package/dist/geometry-engine.umd.cjs +4 -0
  5. package/lib/geometry/AcGeArea2d.d.ts +61 -0
  6. package/lib/geometry/AcGeArea2d.d.ts.map +1 -0
  7. package/lib/geometry/AcGeArea2d.js +174 -0
  8. package/lib/geometry/AcGeArea2d.js.map +1 -0
  9. package/lib/geometry/AcGeCircArc2d.d.ts +108 -0
  10. package/lib/geometry/AcGeCircArc2d.d.ts.map +1 -0
  11. package/lib/geometry/AcGeCircArc2d.js +412 -0
  12. package/lib/geometry/AcGeCircArc2d.js.map +1 -0
  13. package/lib/geometry/AcGeCircArc3d.d.ts +138 -0
  14. package/lib/geometry/AcGeCircArc3d.d.ts.map +1 -0
  15. package/lib/geometry/AcGeCircArc3d.js +447 -0
  16. package/lib/geometry/AcGeCircArc3d.js.map +1 -0
  17. package/lib/geometry/AcGeCurve2d.d.ts +85 -0
  18. package/lib/geometry/AcGeCurve2d.d.ts.map +1 -0
  19. package/lib/geometry/AcGeCurve2d.js +213 -0
  20. package/lib/geometry/AcGeCurve2d.js.map +1 -0
  21. package/lib/geometry/AcGeCurve3d.d.ts +27 -0
  22. package/lib/geometry/AcGeCurve3d.d.ts.map +1 -0
  23. package/lib/geometry/AcGeCurve3d.js +29 -0
  24. package/lib/geometry/AcGeCurve3d.js.map +1 -0
  25. package/lib/geometry/AcGeEllipseArc2d.d.ts +105 -0
  26. package/lib/geometry/AcGeEllipseArc2d.d.ts.map +1 -0
  27. package/lib/geometry/AcGeEllipseArc2d.js +292 -0
  28. package/lib/geometry/AcGeEllipseArc2d.js.map +1 -0
  29. package/lib/geometry/AcGeEllipseArc3d.d.ts +141 -0
  30. package/lib/geometry/AcGeEllipseArc3d.d.ts.map +1 -0
  31. package/lib/geometry/AcGeEllipseArc3d.js +442 -0
  32. package/lib/geometry/AcGeEllipseArc3d.js.map +1 -0
  33. package/lib/geometry/AcGeLine2d.d.ts +56 -0
  34. package/lib/geometry/AcGeLine2d.d.ts.map +1 -0
  35. package/lib/geometry/AcGeLine2d.js +125 -0
  36. package/lib/geometry/AcGeLine2d.js.map +1 -0
  37. package/lib/geometry/AcGeLine3d.d.ts +134 -0
  38. package/lib/geometry/AcGeLine3d.d.ts.map +1 -0
  39. package/lib/geometry/AcGeLine3d.js +291 -0
  40. package/lib/geometry/AcGeLine3d.js.map +1 -0
  41. package/lib/geometry/AcGeLoop2d.d.ts +59 -0
  42. package/lib/geometry/AcGeLoop2d.d.ts.map +1 -0
  43. package/lib/geometry/AcGeLoop2d.js +141 -0
  44. package/lib/geometry/AcGeLoop2d.js.map +1 -0
  45. package/lib/geometry/AcGePolyline2d.d.ts +90 -0
  46. package/lib/geometry/AcGePolyline2d.d.ts.map +1 -0
  47. package/lib/geometry/AcGePolyline2d.js +224 -0
  48. package/lib/geometry/AcGePolyline2d.js.map +1 -0
  49. package/lib/geometry/AcGeShape.d.ts +12 -0
  50. package/lib/geometry/AcGeShape.d.ts.map +1 -0
  51. package/lib/geometry/AcGeShape.js +22 -0
  52. package/lib/geometry/AcGeShape.js.map +1 -0
  53. package/lib/geometry/AcGeShape2d.d.ts +31 -0
  54. package/lib/geometry/AcGeShape2d.d.ts.map +1 -0
  55. package/lib/geometry/AcGeShape2d.js +51 -0
  56. package/lib/geometry/AcGeShape2d.js.map +1 -0
  57. package/lib/geometry/AcGeShape3d.d.ts +33 -0
  58. package/lib/geometry/AcGeShape3d.d.ts.map +1 -0
  59. package/lib/geometry/AcGeShape3d.js +52 -0
  60. package/lib/geometry/AcGeShape3d.js.map +1 -0
  61. package/lib/geometry/AcGeSpline3d.d.ts +77 -0
  62. package/lib/geometry/AcGeSpline3d.d.ts.map +1 -0
  63. package/lib/geometry/AcGeSpline3d.js +221 -0
  64. package/lib/geometry/AcGeSpline3d.js.map +1 -0
  65. package/lib/geometry/index.d.ts +13 -0
  66. package/lib/geometry/index.d.ts.map +1 -0
  67. package/lib/geometry/index.js +13 -0
  68. package/lib/geometry/index.js.map +1 -0
  69. package/lib/index.d.ts +4 -0
  70. package/lib/index.d.ts.map +1 -0
  71. package/lib/index.js +4 -0
  72. package/lib/index.js.map +1 -0
  73. package/lib/math/AcGeBox2d.d.ts +173 -0
  74. package/lib/math/AcGeBox2d.d.ts.map +1 -0
  75. package/lib/math/AcGeBox2d.js +289 -0
  76. package/lib/math/AcGeBox2d.js.map +1 -0
  77. package/lib/math/AcGeBox3d.d.ts +195 -0
  78. package/lib/math/AcGeBox3d.d.ts.map +1 -0
  79. package/lib/math/AcGeBox3d.js +378 -0
  80. package/lib/math/AcGeBox3d.js.map +1 -0
  81. package/lib/math/AcGeEuler.d.ts +133 -0
  82. package/lib/math/AcGeEuler.d.ts.map +1 -0
  83. package/lib/math/AcGeEuler.js +358 -0
  84. package/lib/math/AcGeEuler.js.map +1 -0
  85. package/lib/math/AcGeMatrix2d.d.ts +203 -0
  86. package/lib/math/AcGeMatrix2d.d.ts.map +1 -0
  87. package/lib/math/AcGeMatrix2d.js +393 -0
  88. package/lib/math/AcGeMatrix2d.js.map +1 -0
  89. package/lib/math/AcGeMatrix3d.d.ts +279 -0
  90. package/lib/math/AcGeMatrix3d.d.ts.map +1 -0
  91. package/lib/math/AcGeMatrix3d.js +1037 -0
  92. package/lib/math/AcGeMatrix3d.js.map +1 -0
  93. package/lib/math/AcGePlane.d.ts +131 -0
  94. package/lib/math/AcGePlane.d.ts.map +1 -0
  95. package/lib/math/AcGePlane.js +218 -0
  96. package/lib/math/AcGePlane.js.map +1 -0
  97. package/lib/math/AcGePoint.d.ts +4 -0
  98. package/lib/math/AcGePoint.d.ts.map +1 -0
  99. package/lib/math/AcGePoint.js +2 -0
  100. package/lib/math/AcGePoint.js.map +1 -0
  101. package/lib/math/AcGePoint2d.d.ts +17 -0
  102. package/lib/math/AcGePoint2d.d.ts.map +1 -0
  103. package/lib/math/AcGePoint2d.js +40 -0
  104. package/lib/math/AcGePoint2d.js.map +1 -0
  105. package/lib/math/AcGePoint3d.d.ts +18 -0
  106. package/lib/math/AcGePoint3d.d.ts.map +1 -0
  107. package/lib/math/AcGePoint3d.js +43 -0
  108. package/lib/math/AcGePoint3d.js.map +1 -0
  109. package/lib/math/AcGeQuaternion.d.ts +230 -0
  110. package/lib/math/AcGeQuaternion.d.ts.map +1 -0
  111. package/lib/math/AcGeQuaternion.js +666 -0
  112. package/lib/math/AcGeQuaternion.js.map +1 -0
  113. package/lib/math/AcGeVector.d.ts +9 -0
  114. package/lib/math/AcGeVector.d.ts.map +1 -0
  115. package/lib/math/AcGeVector.js +2 -0
  116. package/lib/math/AcGeVector.js.map +1 -0
  117. package/lib/math/AcGeVector2d.d.ts +361 -0
  118. package/lib/math/AcGeVector2d.d.ts.map +1 -0
  119. package/lib/math/AcGeVector2d.js +622 -0
  120. package/lib/math/AcGeVector2d.js.map +1 -0
  121. package/lib/math/AcGeVector3d.d.ts +493 -0
  122. package/lib/math/AcGeVector3d.d.ts.map +1 -0
  123. package/lib/math/AcGeVector3d.js +868 -0
  124. package/lib/math/AcGeVector3d.js.map +1 -0
  125. package/lib/math/index.d.ts +14 -0
  126. package/lib/math/index.d.ts.map +1 -0
  127. package/lib/math/index.js +14 -0
  128. package/lib/math/index.js.map +1 -0
  129. package/lib/util/AcGeConstants.d.ts +19 -0
  130. package/lib/util/AcGeConstants.d.ts.map +1 -0
  131. package/lib/util/AcGeConstants.js +25 -0
  132. package/lib/util/AcGeConstants.js.map +1 -0
  133. package/lib/util/AcGeGeometryUtil.d.ts +16 -0
  134. package/lib/util/AcGeGeometryUtil.d.ts.map +1 -0
  135. package/lib/util/AcGeGeometryUtil.js +56 -0
  136. package/lib/util/AcGeGeometryUtil.js.map +1 -0
  137. package/lib/util/AcGeMathUtil.d.ts +203 -0
  138. package/lib/util/AcGeMathUtil.d.ts.map +1 -0
  139. package/lib/util/AcGeMathUtil.js +585 -0
  140. package/lib/util/AcGeMathUtil.js.map +1 -0
  141. package/lib/util/AcGeTol.d.ts +91 -0
  142. package/lib/util/AcGeTol.d.ts.map +1 -0
  143. package/lib/util/AcGeTol.js +83 -0
  144. package/lib/util/AcGeTol.js.map +1 -0
  145. package/lib/util/index.d.ts +5 -0
  146. package/lib/util/index.d.ts.map +1 -0
  147. package/lib/util/index.js +5 -0
  148. package/lib/util/index.js.map +1 -0
  149. package/package.json +42 -0
@@ -0,0 +1,493 @@
1
+ import { AcGeEuler } from './AcGeEuler';
2
+ import { AcGeMatrix2d } from './AcGeMatrix2d';
3
+ import { AcGeMatrix3d } from './AcGeMatrix3d';
4
+ import { AcGeQuaternion } from './AcGeQuaternion';
5
+ import { AcGeVectorLike } from './AcGeVector';
6
+ /**
7
+ * The interface representing a vector in 3-dimensional space.
8
+ */
9
+ export interface AcGeVector3dLike {
10
+ /**
11
+ * X coordinate of the 3d vector
12
+ */
13
+ x: number;
14
+ /**
15
+ * Y coordinate of the 3d vector
16
+ */
17
+ y: number;
18
+ /**
19
+ * Z coordinate of the 3d vector
20
+ */
21
+ z: number;
22
+ }
23
+ /**
24
+ * Class representing a vector in 3-dimensional space. A 3d vector is an ordered triplet of
25
+ * numbers (labeled x, y, and z).
26
+ */
27
+ export declare class AcGeVector3d {
28
+ /**
29
+ * X-Axis
30
+ */
31
+ static X_AXIS: Readonly<AcGeVector3d>;
32
+ /**
33
+ * Negative X-Axis
34
+ */
35
+ static NEGATIVE_X_AXIS: Readonly<AcGeVector3d>;
36
+ /**
37
+ * Y-Axis
38
+ */
39
+ static Y_AXIS: Readonly<AcGeVector3d>;
40
+ /**
41
+ * Negative Y-Axis
42
+ */
43
+ static NEGATIVE_Y_AXIS: Readonly<AcGeVector3d>;
44
+ /**
45
+ * Z-Axis
46
+ */
47
+ static Z_AXIS: Readonly<AcGeVector3d>;
48
+ /**
49
+ * Negative Z-Axis
50
+ */
51
+ static NEGATIVE_Z_AXIS: Readonly<AcGeVector3d>;
52
+ /**
53
+ * X coordinate of the vector
54
+ */
55
+ x: number;
56
+ /**
57
+ * Y coordinate of the vector
58
+ */
59
+ y: number;
60
+ /**
61
+ * Z coordinate of the vector
62
+ */
63
+ z: number;
64
+ constructor();
65
+ constructor(x: number, y: number, z: number);
66
+ constructor(other: AcGeVectorLike);
67
+ constructor(other: [number, number, number]);
68
+ /**
69
+ * Sets the x, y and z components of this vector.
70
+ * @param x Input the x components of this vector.
71
+ * @param y Input the y components of this vector.
72
+ * @param z Input the z components of this vector.
73
+ * @returns Return this vector
74
+ */
75
+ set(x: number, y: number, z: number): this;
76
+ /**
77
+ * Set the x, y and z values of this vector both equal to scalar.
78
+ * @param scalar Input a scalar value
79
+ * @returns Return this vector
80
+ */
81
+ setScalar(scalar: number): this;
82
+ /**
83
+ * Replace this vector's x value with x.
84
+ * @param x Input the new vector's x value
85
+ * @returns Return this vector
86
+ */
87
+ setX(x: number): this;
88
+ /**
89
+ * Replace this vector's y value with y.
90
+ * @param y Input the new vector's y value
91
+ * @returns Return this vector
92
+ */
93
+ setY(y: number): this;
94
+ /**
95
+ * Replace this vector's z value with z.
96
+ * @param z Input the new vector's z value
97
+ * @returns Return this vector
98
+ */
99
+ setZ(z: number): this;
100
+ /**
101
+ * Set vector component by index - 0, 1 or 2.
102
+ * - If index equals 0 set x to value.
103
+ * - If index equals 1 set y to value.
104
+ * - If index equals 2 set z to value
105
+ * @param index Input index value - 0, 1 or 2.
106
+ * @param value Input value to be set
107
+ * @returns Return this vector
108
+ */
109
+ setComponent(index: number, value: number): this;
110
+ /**
111
+ * Return vector component by index - 0, 1 or 2.
112
+ * - If index equals 0 returns the x value.
113
+ * - If index equals 1 returns the y value.
114
+ * - If index equals 2 returns the z value.
115
+ * @param index Input index value - 0, 1 or 2.
116
+ * @returns Return vector component with the specified index
117
+ */
118
+ getComponent(index: number): number;
119
+ /**
120
+ * Return a new vector3 with the same x, y and z values as this one.
121
+ * @returns Return a new vector3 with the same x, y and z values as this one.
122
+ */
123
+ clone(): AcGeVector3d;
124
+ /**
125
+ * Copy the values of the passed vector3's x, y and z properties to this vector3.
126
+ * @param v Input the vector to copy
127
+ * @returns Return this vector
128
+ */
129
+ copy(v: AcGeVectorLike): this;
130
+ /**
131
+ * Add the specified 3d vector to this vector.
132
+ * @param v Input a 3d vector
133
+ * @returns Return this vector
134
+ */
135
+ add(v: AcGeVectorLike): this;
136
+ /**
137
+ * Add the scalar value s to this vector's x, y and z values.
138
+ * @param s Input a scalar value
139
+ * @returns Return this vector
140
+ */
141
+ addScalar(s: number): this;
142
+ /**
143
+ * Set this vector to a + b.
144
+ * @param a Input the first 3d vector
145
+ * @param b Input the second 3d vector
146
+ * @returns Return this vector
147
+ */
148
+ addVectors(a: AcGeVector3dLike, b: AcGeVector3dLike): this;
149
+ /**
150
+ * Add the multiple of v and s to this vector.
151
+ * @param v Input a 3d vector
152
+ * @param s Input a scalar value
153
+ * @returns Return this vector
154
+ */
155
+ addScaledVector(v: AcGeVector3dLike, s: number): this;
156
+ /**
157
+ * Subtract v from this vector.
158
+ * @param v Input a 3d vector to subtract
159
+ * @returns Return this vector
160
+ */
161
+ sub(v: AcGeVector3dLike): this;
162
+ /**
163
+ * Subtract s from this vector's x, y and z components.
164
+ * @param s Input a number value to substract
165
+ * @returns Return this vector
166
+ */
167
+ subScalar(s: number): this;
168
+ /**
169
+ * Set this vector to a - b.
170
+ * @param a Input a 3d vector
171
+ * @param b Input a 3d vector
172
+ * @returns Return this vector
173
+ */
174
+ subVectors(a: AcGeVector3dLike, b: AcGeVector3dLike): this;
175
+ /**
176
+ * Multiply this vector by v.
177
+ * @param v Input a 3d vector
178
+ * @returns Return this vector
179
+ */
180
+ multiply(v: AcGeVector3dLike): this;
181
+ /**
182
+ * Multiply this vector by scalar s.
183
+ * @param scalar Input a scalar value
184
+ * @returns Return this vector
185
+ */
186
+ multiplyScalar(scalar: number): this;
187
+ /**
188
+ * Set this vector equal to a * b, component-wise.
189
+ * @param a Input a 3d vector
190
+ * @param b Input a 3d vector
191
+ * @returns Return this vector
192
+ */
193
+ multiplyVectors(a: AcGeVector3dLike, b: AcGeVector3dLike): this;
194
+ /**
195
+ * Apply euler transform to this vector by converting the Euler object to a Quaternion and applying.
196
+ * @param euler Input an euler object
197
+ * @returns Return this vector
198
+ */
199
+ applyEuler(euler: AcGeEuler): this;
200
+ /**
201
+ * Apply a rotation specified by an axis and an angle to this vector.
202
+ * @param axis Input a normalized Vector3.
203
+ * @param angle Input an angle in radians.
204
+ * @returns Return this vector
205
+ */
206
+ applyAxisAngle(axis: AcGeVector3dLike, angle: number): this;
207
+ /**
208
+ * Multipliy this vector by m
209
+ * @param m Input a 3*3 matrix
210
+ * @returns Return this vector
211
+ */
212
+ applyMatrix3(m: AcGeMatrix2d): this;
213
+ /**
214
+ * Multiply this vector by normal matrix m and normalizes the result.
215
+ * @param m Input one normal matrix
216
+ * @returns Return this vector
217
+ */
218
+ applyNormalMatrix(m: AcGeMatrix2d): this;
219
+ /**
220
+ * Multiplies this vector (with an implicit 1 in the 4th dimension) by m, and divides by perspective.
221
+ * @param m Input one 4x4 matrix
222
+ * @returns Return this vector
223
+ */
224
+ applyMatrix3d(m: AcGeMatrix3d): this;
225
+ /**
226
+ * Apply a quaternion transform to this vector.
227
+ * @param q Input one quaternion transform
228
+ * @returns Return this vector
229
+ */
230
+ applyQuaternion(q: AcGeQuaternion): this;
231
+ /**
232
+ * Transforms the direction of this vector by a matrix (the upper left 3 x 3 subset of a m) and
233
+ * then normalizes the result.
234
+ * @param m
235
+ * @returns
236
+ */
237
+ transformDirection(m: AcGeMatrix3d): this;
238
+ /**
239
+ * Divide this vector by v.
240
+ * @param v Input a 3d vector
241
+ * @returns Return this vector
242
+ */
243
+ divide(v: AcGeVector3dLike): this;
244
+ /**
245
+ * Divide this vector by scalar s.
246
+ * @param scalar Input a scalar value
247
+ * @returns Return this vector
248
+ */
249
+ divideScalar(scalar: number): this;
250
+ /**
251
+ * If this vector's x, y or z value is greater than v's x, y or z value, replace that value with
252
+ * the corresponding min value.
253
+ * @param v Input a 3d vector
254
+ * @returns Return this vector
255
+ */
256
+ min(v: AcGeVector3dLike): this;
257
+ /**
258
+ * If this vector's x, y or z value is less than v's x, y or z value, replace that value with
259
+ * the corresponding max value.
260
+ * @param v Input a 3d vector
261
+ * @returns Return this vector
262
+ */
263
+ max(v: AcGeVector3dLike): this;
264
+ /**
265
+ * If this vector's x, y or z value is greater than the max vector's x, y or z value, it is
266
+ * replaced by the corresponding value. If this vector's x, y or z value is less than the min
267
+ * vector's x, y or z value, it is replaced by the corresponding value.
268
+ * @param min Input the minimum x, y and z values.
269
+ * @param max Input the maximum x, y and z values in the desired range
270
+ * @returns Return this vector
271
+ */
272
+ clamp(min: AcGeVector3dLike, max: AcGeVector3dLike): this;
273
+ /**
274
+ * If this vector's x, y or z values are greater than the max value, they are replaced by the
275
+ * max value. If this vector's x, y or z values are less than the min value, they are replaced
276
+ * by the min value.
277
+ * @param minVal Input the minimum value the components will be clamped to
278
+ * @param maxVal Input the maximum value the components will be clamped to
279
+ * @returns Return this vector
280
+ */
281
+ clampScalar(minVal: number, maxVal: number): this;
282
+ /**
283
+ * If this vector's length is greater than the max value, the vector will be scaled down so
284
+ * its length is the max value. If this vector's length is less than the min value, the vector
285
+ * will be scaled up so its length is the min value.
286
+ * @param min Input the minimum value the length will be clamped to
287
+ * @param max Input the maximum value the length will be clamped to
288
+ * @returns Return this vector
289
+ */
290
+ clampLength(min: number, max: number): this;
291
+ /**
292
+ * The components of this vector are rounded down to the nearest integer value.
293
+ * @returns Return this vector
294
+ */
295
+ floor(): this;
296
+ /**
297
+ * The x, y and z components of this vector are rounded up to the nearest integer value.
298
+ * @returns Return this vector
299
+ */
300
+ ceil(): this;
301
+ /**
302
+ * The components of this vector are rounded to the nearest integer value.
303
+ * @returns Return this vector
304
+ */
305
+ round(): this;
306
+ /**
307
+ * The components of this vector are rounded towards zero (up if negative, down if positive)
308
+ * to an integer value.
309
+ * @returns Return this vector
310
+ */
311
+ roundToZero(): this;
312
+ /**
313
+ * Inverts this vector - i.e. sets x = -x, y = -y and z = -z.
314
+ * @returns Return this vector
315
+ */
316
+ negate(): this;
317
+ /**
318
+ * Calculate the dot product of this vector and v.
319
+ * @param v Input a 3d vector
320
+ * @returns Return the dot product of this vector and v
321
+ */
322
+ dot(v: AcGeVector3dLike): number;
323
+ /**
324
+ * Return true if vec is parallel to this vector
325
+ * @param vec Input vector to check parallelism
326
+ * @returns Return true if vec is parallel to this vector
327
+ */
328
+ isParallelTo(vec: AcGeVector3d): boolean;
329
+ /**
330
+ * Compute the square of the Euclidean length (straight-line length) from (0, 0, 0)
331
+ * to (x, y, z). If you are comparing the lengths of vectors, you should compare the
332
+ * length squared instead as it is slightly more efficient to calculate.
333
+ * @returns Return the square of the Euclidean length
334
+ */
335
+ lengthSq(): number;
336
+ /**
337
+ * Compute the Euclidean length (straight-line length) from (0, 0, 0) to (x, y, z).
338
+ * @returns Return the Euclidean length (straight-line length) from (0, 0, 0) to (x, y, z).
339
+ */
340
+ length(): number;
341
+ /**
342
+ * Compute the Manhattan length of this vector.
343
+ * @returns Return the Manhattan length of this vector.
344
+ */
345
+ manhattanLength(): number;
346
+ /**
347
+ * Convert this vector to a unit vector - that is, sets it equal to a vector with
348
+ * the same direction as this one, but length 1.
349
+ * @returns Return this vector
350
+ */
351
+ normalize(): this;
352
+ /**
353
+ * Set this vector to a vector with the same direction as this one, but length l.
354
+ * @param l Input a lenght value
355
+ * @returns Return this vector
356
+ */
357
+ setLength(l: number): this;
358
+ /**
359
+ * Linearly interpolate between this vector and v, where alpha is the percent distance along
360
+ * the line - alpha = 0 will be this vector, and alpha = 1 will be v.
361
+ * @param v Input vector to interpolate towards
362
+ * @param alpha Input interpolation factor, typically in the closed interval [0, 1]
363
+ * @returns Return this vector
364
+ */
365
+ lerp(v: AcGeVector3dLike, alpha: number): this;
366
+ /**
367
+ * Set this vector to be the vector linearly interpolated between v1 and v2 where alpha is
368
+ * the percent distance along the line connecting the two vectors - alpha = 0 will be v1,
369
+ * and alpha = 1 will be v2.
370
+ * @param v1 Input the starting vector
371
+ * @param v2 Input vector to interpolate towards
372
+ * @param alpha Input interpolation factor, typically in the closed interval [0, 1].
373
+ * @returns Return this vector
374
+ */
375
+ lerpVectors(v1: AcGeVector3dLike, v2: AcGeVector3dLike, alpha: number): this;
376
+ /**
377
+ * Set this vector to cross product of itself and v.
378
+ * @param v Input a 3d vector
379
+ * @returns Return this vector
380
+ */
381
+ cross(v: AcGeVector3dLike): this;
382
+ /**
383
+ * Set this vector to cross product of a and b.
384
+ * @param a Input a 3d vector
385
+ * @param b Input a 3d vector
386
+ * @returns Return this vector
387
+ */
388
+ crossVectors(a: AcGeVector3dLike, b: AcGeVector3dLike): this;
389
+ /**
390
+ * Project this vector onto v.
391
+ * @param v Input a 3d vector
392
+ * @returns Return this vector
393
+ */
394
+ projectOnVector(v: AcGeVector3d): this;
395
+ /**
396
+ * Project this vector onto a plane by subtracting this vector projected onto the plane's normal
397
+ * from this vector.
398
+ * @param planeNormal Input a vector representing a plane normal.
399
+ * @returns Return this vector
400
+ */
401
+ projectOnPlane(planeNormal: AcGeVector3d): this;
402
+ /**
403
+ * Reflect this vector off of plane orthogonal to normal. Normal is assumed to have unit length.
404
+ * @param normal Input the normal to the reflecting plane
405
+ * @returns Return this vector
406
+ */
407
+ reflect(normal: AcGeVector3dLike): this;
408
+ /**
409
+ * Return the angle between this vector and vector v in radians.
410
+ * @param v Input a 3d vector
411
+ * @returns Return the angle between this vector and vector v in radians.
412
+ */
413
+ angleTo(v: AcGeVector3d): number;
414
+ /**
415
+ * Compute the distance from this vector to v.
416
+ * @param v Input a 3d vector
417
+ * @returns Return the distance from this vector to v
418
+ */
419
+ distanceTo(v: AcGeVector3dLike): number;
420
+ /**
421
+ * Compute the squared distance from this vector to v. If you are just comparing the distance
422
+ * with another distance, you should compare the distance squared instead as it is slightly more
423
+ * efficient to calculate.
424
+ * @param v Input a 3d vector
425
+ * @returns Return the squared distance from this vector to v
426
+ */
427
+ distanceToSquared(v: AcGeVector3dLike): number;
428
+ /**
429
+ * Compute the Manhattan distance from this vector to v.
430
+ * @param v Input a 3d vector
431
+ * @returns Return the Manhattan distance from this vector to v
432
+ */
433
+ manhattanDistanceTo(v: AcGeVector3dLike): number;
434
+ /**
435
+ * Set this vector to the position elements of the transformation matrix m.
436
+ * @param m Input one 4x4 matrix
437
+ * @returns Return this vector
438
+ */
439
+ setFromMatrixPosition(m: AcGeMatrix3d): this;
440
+ /**
441
+ * Set this vector to the scale elements of the transformation matrix m.
442
+ * @param m Input one 4x4 matrix
443
+ * @returns Return this vector
444
+ */
445
+ setFromMatrixScale(m: AcGeMatrix3d): this;
446
+ /**
447
+ * Set this vector's x, y and z components from index column of matrix.
448
+ * @param m Input one 4x4 matrix
449
+ * @param index Input column index
450
+ * @returns Return this vector
451
+ */
452
+ setFromMatrixColumn(m: AcGeMatrix3d, index: number): this;
453
+ /**
454
+ * Set this vector's x, y and z components from index column of matrix.
455
+ * @param m Input one 3x3 matrix
456
+ * @param index Input column index
457
+ * @returns Return this vector
458
+ */
459
+ setFromMatrix3Column(m: AcGeMatrix2d, index: number): this;
460
+ /**
461
+ * Return true if the components of this vector and v are strictly equal; false otherwise.
462
+ * @param v Input a 3d vector
463
+ * @returns Return true if the components of this vector and v are strictly equal; false otherwise.
464
+ */
465
+ equals(v: AcGeVector3dLike): boolean;
466
+ /**
467
+ * Set this vector's x value to be array[ offset + 0 ], y value to be array[ offset + 1 ] and
468
+ * z value to be array[ offset + 2 ].
469
+ * @param array Input the source array.
470
+ * @param offset (optional) Input offset into the array. Default is 0.
471
+ * @returns Return this vector
472
+ */
473
+ fromArray(array: number[], offset?: number): this;
474
+ /**
475
+ * Return an array [x, y, z], or copies x, y and z into the provided array.
476
+ * @param array (optional) Input array to store this vector to. If this is not provided a new array will be created.
477
+ * @param offset (optional) Input optional offset into the array.
478
+ * @returns Return an array [x, y, z], or copies x, y and z into the provided array.
479
+ */
480
+ toArray(array?: number[] | Float32Array, offset?: number): number[] | Float32Array;
481
+ /**
482
+ * Set each component of this vector to a pseudo-random value between 0 and 1, excluding 1.
483
+ * @returns Return this vector
484
+ */
485
+ random(): this;
486
+ /**
487
+ * Set this vector to a uniformly random point on a unit sphere.
488
+ * @returns Return this vector
489
+ */
490
+ randomDirection(): this;
491
+ [Symbol.iterator](): Generator<number, void, unknown>;
492
+ }
493
+ //# sourceMappingURL=AcGeVector3d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcGeVector3d.d.ts","sourceRoot":"","sources":["../../src/math/AcGeVector3d.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;;GAGG;AACH,qBAAa,YAAY;IACvB;;OAEG;IACH,MAAM,CAAC,MAAM,yBAA2C;IACxD;;OAEG;IACH,MAAM,CAAC,eAAe,yBAA4C;IAClE;;OAEG;IACH,MAAM,CAAC,MAAM,yBAA2C;IACxD;;OAEG;IACH,MAAM,CAAC,eAAe,yBAA4C;IAClE;;OAEG;IACH,MAAM,CAAC,MAAM,yBAA2C;IACxD;;OAEG;IACH,MAAM,CAAC,eAAe,yBAA4C;IAClE;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,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