@itwin/core-geometry 4.0.0-dev.54 → 4.0.0-dev.56

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 (489) hide show
  1. package/lib/cjs/Constant.js.map +1 -1
  2. package/lib/cjs/Geometry.d.ts +5 -1
  3. package/lib/cjs/Geometry.d.ts.map +1 -1
  4. package/lib/cjs/Geometry.js +5 -1
  5. package/lib/cjs/Geometry.js.map +1 -1
  6. package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
  7. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  8. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  9. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  10. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  11. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  12. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  13. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  14. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  15. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  16. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  17. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  18. package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
  19. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  20. package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
  21. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  22. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  23. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  24. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  25. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  26. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  27. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  28. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  29. package/lib/cjs/core-geometry.js.map +1 -1
  30. package/lib/cjs/curve/Arc3d.js.map +1 -1
  31. package/lib/cjs/curve/ChainCollectorContext.js.map +1 -1
  32. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  33. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  34. package/lib/cjs/curve/CurveChain.js.map +1 -1
  35. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  36. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  37. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  38. package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +1 -1
  39. package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
  40. package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +1 -1
  41. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  42. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  43. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  44. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  45. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  46. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  47. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  48. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  49. package/lib/cjs/curve/LineString3d.js.map +1 -1
  50. package/lib/cjs/curve/Loop.js.map +1 -1
  51. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  52. package/lib/cjs/curve/Path.js.map +1 -1
  53. package/lib/cjs/curve/PointString3d.js.map +1 -1
  54. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  55. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  56. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  57. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  58. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  59. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  60. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  61. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  62. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  63. package/lib/cjs/curve/RegionOps.js.map +1 -1
  64. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  65. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  66. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  67. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  68. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  69. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  70. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  71. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  72. package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
  73. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  74. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  75. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  76. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  77. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  78. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  79. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  80. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  81. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  82. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  83. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  84. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  85. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  86. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  87. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  88. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  89. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  90. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  91. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  92. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  93. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  94. package/lib/cjs/geometry3d/Angle.d.ts +29 -34
  95. package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
  96. package/lib/cjs/geometry3d/Angle.js +31 -36
  97. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  98. package/lib/cjs/geometry3d/AngleSweep.d.ts +48 -43
  99. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  100. package/lib/cjs/geometry3d/AngleSweep.js +48 -43
  101. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  102. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  103. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  104. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  105. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  106. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  107. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  108. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  109. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  110. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  111. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  112. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  113. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  114. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  115. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  116. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  117. package/lib/cjs/geometry3d/Matrix3d.d.ts +5 -8
  118. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  119. package/lib/cjs/geometry3d/Matrix3d.js +5 -8
  120. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  121. package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts +3 -3
  122. package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
  123. package/lib/cjs/geometry3d/OrderedRotationAngles.js +3 -3
  124. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  125. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  126. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  127. package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts +8 -10
  128. package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
  129. package/lib/cjs/geometry3d/Point2dArrayCarrier.js +8 -10
  130. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  131. package/lib/cjs/geometry3d/Point2dVector2d.d.ts +37 -34
  132. package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
  133. package/lib/cjs/geometry3d/Point2dVector2d.js +38 -35
  134. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  135. package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts +17 -21
  136. package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
  137. package/lib/cjs/geometry3d/Point3dArrayCarrier.js +16 -20
  138. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  139. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +84 -67
  140. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  141. package/lib/cjs/geometry3d/Point3dVector3d.js +84 -67
  142. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  143. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  144. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  145. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  146. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  147. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  148. package/lib/cjs/geometry3d/Range.js.map +1 -1
  149. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  150. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  151. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  152. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  153. package/lib/cjs/geometry3d/Transform.d.ts +76 -66
  154. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  155. package/lib/cjs/geometry3d/Transform.js +88 -77
  156. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  157. package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
  158. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  159. package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts +15 -16
  160. package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
  161. package/lib/cjs/geometry3d/YawPitchRollAngles.js +14 -15
  162. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  163. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  164. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  165. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  166. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  167. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  168. package/lib/cjs/numerics/BandedSystem.js.map +1 -1
  169. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  170. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  171. package/lib/cjs/numerics/Complex.js.map +1 -1
  172. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  173. package/lib/cjs/numerics/Newton.js.map +1 -1
  174. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  175. package/lib/cjs/numerics/PolarData.js.map +1 -1
  176. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  177. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  178. package/lib/cjs/numerics/Range1dArray.js.map +1 -1
  179. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  180. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  181. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  182. package/lib/cjs/polyface/AuxData.js.map +1 -1
  183. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  184. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  185. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  186. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  187. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  188. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  189. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  190. package/lib/cjs/polyface/Polyface.js.map +1 -1
  191. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  192. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  193. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  194. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  195. package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
  196. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  197. package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
  198. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  199. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  200. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  201. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  202. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  203. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  204. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  205. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  206. package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
  207. package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
  208. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  209. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  210. package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  211. package/lib/cjs/serialization/DeepCompare.js.map +1 -1
  212. package/lib/cjs/serialization/GeometrySamples.d.ts +72 -58
  213. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  214. package/lib/cjs/serialization/GeometrySamples.js +132 -108
  215. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  216. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  217. package/lib/cjs/solid/Box.js.map +1 -1
  218. package/lib/cjs/solid/Cone.js.map +1 -1
  219. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  220. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  221. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  222. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  223. package/lib/cjs/solid/Sphere.js.map +1 -1
  224. package/lib/cjs/solid/SweepContour.js.map +1 -1
  225. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  226. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  227. package/lib/cjs/topology/Graph.js.map +1 -1
  228. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  229. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  230. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  231. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  232. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  233. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  234. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  235. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  236. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  237. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  238. package/lib/cjs/topology/MaskManager.js.map +1 -1
  239. package/lib/cjs/topology/Merging.js.map +1 -1
  240. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  241. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  242. package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
  243. package/lib/cjs/topology/Triangulation.js.map +1 -1
  244. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  245. package/lib/esm/Constant.js.map +1 -1
  246. package/lib/esm/Geometry.d.ts +5 -1
  247. package/lib/esm/Geometry.d.ts.map +1 -1
  248. package/lib/esm/Geometry.js +5 -1
  249. package/lib/esm/Geometry.js.map +1 -1
  250. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  251. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  252. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  253. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  254. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  255. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  256. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  257. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  258. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  259. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  260. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  261. package/lib/esm/bspline/KnotVector.js.map +1 -1
  262. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  263. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  264. package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
  265. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  266. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  267. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  268. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  269. package/lib/esm/clipping/ClipVector.js.map +1 -1
  270. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  271. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  272. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  273. package/lib/esm/core-geometry.js.map +1 -1
  274. package/lib/esm/curve/Arc3d.js.map +1 -1
  275. package/lib/esm/curve/ChainCollectorContext.js.map +1 -1
  276. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  277. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  278. package/lib/esm/curve/CurveChain.js.map +1 -1
  279. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  280. package/lib/esm/curve/CurveCollection.js.map +1 -1
  281. package/lib/esm/curve/CurveCurve.js.map +1 -1
  282. package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +1 -1
  283. package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
  284. package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +1 -1
  285. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  286. package/lib/esm/curve/CurveFactory.js.map +1 -1
  287. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  288. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  289. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  290. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  291. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  292. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  293. package/lib/esm/curve/LineString3d.js.map +1 -1
  294. package/lib/esm/curve/Loop.js.map +1 -1
  295. package/lib/esm/curve/ParityRegion.js.map +1 -1
  296. package/lib/esm/curve/Path.js.map +1 -1
  297. package/lib/esm/curve/PointString3d.js.map +1 -1
  298. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  299. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  300. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  301. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  302. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  303. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  304. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  305. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  306. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  307. package/lib/esm/curve/RegionOps.js.map +1 -1
  308. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  309. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  310. package/lib/esm/curve/UnionRegion.js.map +1 -1
  311. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  312. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  313. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  314. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  315. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  316. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  317. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  318. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  319. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  320. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  321. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  322. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  323. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  324. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  325. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  326. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  327. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  328. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  329. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  330. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  331. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  332. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  333. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  334. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  335. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  336. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  337. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  338. package/lib/esm/geometry3d/Angle.d.ts +29 -34
  339. package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
  340. package/lib/esm/geometry3d/Angle.js +31 -36
  341. package/lib/esm/geometry3d/Angle.js.map +1 -1
  342. package/lib/esm/geometry3d/AngleSweep.d.ts +48 -43
  343. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  344. package/lib/esm/geometry3d/AngleSweep.js +48 -43
  345. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  346. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  347. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  348. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  349. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  350. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  351. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  352. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  353. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  354. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  355. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  356. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  357. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  358. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  359. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  360. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  361. package/lib/esm/geometry3d/Matrix3d.d.ts +5 -8
  362. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  363. package/lib/esm/geometry3d/Matrix3d.js +5 -8
  364. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  365. package/lib/esm/geometry3d/OrderedRotationAngles.d.ts +3 -3
  366. package/lib/esm/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
  367. package/lib/esm/geometry3d/OrderedRotationAngles.js +3 -3
  368. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  369. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  370. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  371. package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts +8 -10
  372. package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
  373. package/lib/esm/geometry3d/Point2dArrayCarrier.js +8 -10
  374. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  375. package/lib/esm/geometry3d/Point2dVector2d.d.ts +37 -34
  376. package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
  377. package/lib/esm/geometry3d/Point2dVector2d.js +38 -35
  378. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  379. package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts +17 -21
  380. package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
  381. package/lib/esm/geometry3d/Point3dArrayCarrier.js +16 -20
  382. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  383. package/lib/esm/geometry3d/Point3dVector3d.d.ts +84 -67
  384. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  385. package/lib/esm/geometry3d/Point3dVector3d.js +84 -67
  386. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  387. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  388. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  389. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  390. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  391. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  392. package/lib/esm/geometry3d/Range.js.map +1 -1
  393. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  394. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  395. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  396. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  397. package/lib/esm/geometry3d/Transform.d.ts +76 -66
  398. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  399. package/lib/esm/geometry3d/Transform.js +88 -77
  400. package/lib/esm/geometry3d/Transform.js.map +1 -1
  401. package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
  402. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  403. package/lib/esm/geometry3d/YawPitchRollAngles.d.ts +15 -16
  404. package/lib/esm/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
  405. package/lib/esm/geometry3d/YawPitchRollAngles.js +14 -15
  406. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  407. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  408. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  409. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  410. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  411. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  412. package/lib/esm/numerics/BandedSystem.js.map +1 -1
  413. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  414. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  415. package/lib/esm/numerics/Complex.js.map +1 -1
  416. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  417. package/lib/esm/numerics/Newton.js.map +1 -1
  418. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  419. package/lib/esm/numerics/PolarData.js.map +1 -1
  420. package/lib/esm/numerics/Polynomials.js.map +1 -1
  421. package/lib/esm/numerics/Quadrature.js.map +1 -1
  422. package/lib/esm/numerics/Range1dArray.js.map +1 -1
  423. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  424. package/lib/esm/numerics/UnionFind.js.map +1 -1
  425. package/lib/esm/numerics/UsageSums.js.map +1 -1
  426. package/lib/esm/polyface/AuxData.js.map +1 -1
  427. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  428. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  429. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  430. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  431. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  432. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  433. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  434. package/lib/esm/polyface/Polyface.js.map +1 -1
  435. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  436. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  437. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  438. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  439. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  440. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  441. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  442. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  443. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  444. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  445. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  446. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  447. package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  448. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  449. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  450. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  451. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  452. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  453. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  454. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  455. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  456. package/lib/esm/serialization/GeometrySamples.d.ts +72 -58
  457. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  458. package/lib/esm/serialization/GeometrySamples.js +132 -108
  459. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  460. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  461. package/lib/esm/solid/Box.js.map +1 -1
  462. package/lib/esm/solid/Cone.js.map +1 -1
  463. package/lib/esm/solid/LinearSweep.js.map +1 -1
  464. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  465. package/lib/esm/solid/RuledSweep.js.map +1 -1
  466. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  467. package/lib/esm/solid/Sphere.js.map +1 -1
  468. package/lib/esm/solid/SweepContour.js.map +1 -1
  469. package/lib/esm/solid/TorusPipe.js.map +1 -1
  470. package/lib/esm/topology/ChainMerge.js.map +1 -1
  471. package/lib/esm/topology/Graph.js.map +1 -1
  472. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  473. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  474. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  475. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  476. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  477. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  478. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  479. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  480. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  481. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  482. package/lib/esm/topology/MaskManager.js.map +1 -1
  483. package/lib/esm/topology/Merging.js.map +1 -1
  484. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  485. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  486. package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
  487. package/lib/esm/topology/Triangulation.js.map +1 -1
  488. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  489. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"Transform.js","sourceRoot":"","sources":["../../../src/geometry3d/Transform.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAmB,QAAQ,E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,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAC9E,QAAQ,CAAC,WAAW,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YACxE,SAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;SAC/D;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module CartesianGeometry\n */\n\nimport { AxisOrder, BeJSONFunctions, Geometry } from \"../Geometry\";\nimport { Point4d } from \"../geometry4d/Point4d\";\nimport { Matrix3d } from \"./Matrix3d\";\nimport { Point2d } from \"./Point2dVector2d\";\nimport { Point3d, Vector3d, XYZ } from \"./Point3dVector3d\";\nimport { Range3d } from \"./Range\";\nimport { TransformProps, XAndY, XYAndZ } from \"./XYZProps\";\n\n/**\n * A Transform consists of an origin and a Matrix3d. This describes a coordinate frame with this origin, with\n * the columns of the Matrix3d being the local x,y,z axis directions.\n * * The math for a Transform `T` consisting of a Matrix3d `M` and a Point3d `o` on a Vector3d `p` is: `Tp = M*p + o`.\n * In other words, `T` is a combination of two operations on `p`: the action of matrix multiplication, followed by a\n * translation. `Origin` is a traditional term for `o`, because `T` can be interpreted as a change of basis from the\n * global axes centered at the global origin, to a new set of axes specified by matrix M columns centered at `o`.\n * * Beware that for common transformations (e.g. scale about point, rotate around an axis) the `fixed point` that\n * is used when describing the transform is NOT the `origin` stored in the transform. Setup methods (e.g\n * createFixedPointAndMatrix, createScaleAboutPoint) take care of determining the appropriate origin coordinates.\n * * If `T` is a translation, no point is fixed by `T`.\n * * If `T` is the identity, all points are fixed by `T`.\n * * If `T` is a scale about a point, one point is fixed by `T`.\n * * If `T` is a rotation about an axis, a line is fixed by `T`.\n * * If `T` is a projection to the plane, a plane is fixed by `T`.\n * @public\n */\nexport class Transform implements BeJSONFunctions {\n private _origin: XYZ;\n private _matrix: Matrix3d;\n // Constructor accepts and uses pointer to content (no copy is done here).\n private constructor(origin: XYZ, matrix: Matrix3d) {\n this._origin = origin;\n this._matrix = matrix;\n }\n private static _identity?: Transform;\n /** The identity Transform. Value is frozen and cannot be modified. */\n public static get identity(): Transform {\n if (undefined === this._identity) {\n this._identity = Transform.createIdentity();\n this._identity.freeze();\n }\n return this._identity;\n }\n /** Freeze this instance (and its members) so it is read-only */\n public freeze(): Readonly<this> {\n this._origin.freeze();\n this._matrix.freeze();\n return Object.freeze(this);\n }\n /**\n * Copy contents from other Transform into this Transform\n * @param other source transform\n */\n public setFrom(other: Transform) {\n this._origin.setFrom(other._origin);\n this._matrix.setFrom(other._matrix);\n }\n /** Set this Transform to be an identity. */\n public setIdentity() {\n this._origin.setZero();\n this._matrix.setIdentity();\n }\n /**\n * Set this Transform instance from flexible inputs:\n * * Any object (such as another Transform or TransformProps) that has `origin` and `matrix` members\n * accepted by `Point3d.setFromJSON` and `Matrix3d.setFromJSON`\n * * An array of 3 number arrays, each with 4 entries which are rows in a 3x4 matrix.\n * * An array of 12 numbers, each block of 4 entries as a row 3x4 matrix.\n * * If no input is provided, the identity Transform is returned.\n */\n public setFromJSON(json?: TransformProps | Transform): void {\n if (json) {\n if (json instanceof Object && (json as any).origin && (json as any).matrix) {\n this._origin.setFromJSON((json as any).origin);\n this._matrix.setFromJSON((json as any).matrix);\n return;\n }\n if (Geometry.isArrayOfNumberArray(json, 3, 4)) {\n const data = json as number[][];\n this._matrix.setRowValues(\n data[0][0], data[0][1], data[0][2],\n data[1][0], data[1][1], data[1][2],\n data[2][0], data[2][1], data[2][2]\n );\n this._origin.set(data[0][3], data[1][3], data[2][3]);\n return;\n }\n if (Geometry.isNumberArray(json, 12)) {\n const data = json as number[];\n this._matrix.setRowValues(\n data[0], data[1], data[2],\n data[4], data[5], data[6],\n data[8], data[9], data[10]\n );\n this._origin.set(data[3], data[7], data[11]);\n return;\n }\n }\n this.setIdentity();\n }\n /**\n * Test for near equality with `other` Transform. Comparison uses the `isAlmostEqual` methods on the `origin` and\n * `matrix` parts.\n * @param other Transform to compare to.\n */\n public isAlmostEqual(other: Readonly<Transform>): boolean {\n return this.origin.isAlmostEqual(other.origin) && this.matrix.isAlmostEqual(other.matrix);\n }\n /**\n * Test for near equality with `other` Transform. Comparison uses the `isAlmostEqual` methods on the `origin` part\n * and the `isAlmostEqualAllowZRotation` method on the `matrix` part.\n * @param other Transform to compare to.\n */\n public isAlmostEqualAllowZRotation(other: Transform): boolean {\n return this._origin.isAlmostEqual(other._origin) && this._matrix.isAlmostEqualAllowZRotation(other._matrix);\n }\n /**\n * Return a 3 by 4 matrix containing the rows of this Transform.\n * * The transform's origin coordinates are the last entries of the 3 json arrays\n */\n public toRows(): number[][] {\n return [\n [this._matrix.coffs[0], this._matrix.coffs[1], this._matrix.coffs[2], this._origin.x],\n [this._matrix.coffs[3], this._matrix.coffs[4], this._matrix.coffs[5], this._origin.y],\n [this._matrix.coffs[6], this._matrix.coffs[7], this._matrix.coffs[8], this._origin.z],\n ];\n }\n /**\n * Return a 3 by 4 matrix containing the rows of this Transform.\n * * The transform's origin coordinates are the last entries of the 3 json arrays\n */\n public toJSON(): TransformProps {\n return this.toRows();\n }\n /** Return a new Transform initialized by `Transform.setFromJSON` */\n public static fromJSON(json?: TransformProps): Transform {\n const result = Transform.createIdentity();\n result.setFromJSON(json);\n return result;\n }\n /** Copy the contents of `this` transform into a new Transform (or to the result, if specified). */\n public clone(result?: Transform): Transform {\n if (result) {\n result._matrix.setFrom(this._matrix);\n result._origin.setFrom(this._origin);\n return result;\n }\n return new Transform(\n Point3d.createFrom(this._origin),\n this._matrix.clone()\n );\n }\n /**\n * Return a modified copy of `this` Transform so that its `matrix` part is rigid (`origin` part is untouched).\n * * For details of how the matrix is modified to rigid, see documentation of `Matrix3d.axisOrderCrossProductsInPlace`\n */\n public cloneRigid(axisOrder: AxisOrder = AxisOrder.XYZ): Transform | undefined {\n const modifiedMatrix = Matrix3d.createRigidFromMatrix3d(this.matrix, axisOrder);\n if (!modifiedMatrix)\n return undefined;\n return new Transform(this.origin.cloneAsPoint3d(), modifiedMatrix);\n }\n /** Create a Transform with the given `origin` and `matrix`. */\n public static createRefs(origin: XYZ | undefined, matrix: Matrix3d, result?: Transform): Transform {\n if (!origin)\n origin = Point3d.createZero();\n if (result) {\n result._origin = origin;\n result._matrix = matrix;\n return result;\n }\n return new Transform(origin, matrix);\n }\n /** Create a Transform with complete contents given */\n public static createRowValues(\n qxx: number, qxy: number, qxz: number, ax: number,\n qyx: number, qyy: number, qyz: number, ay: number,\n qzx: number, qzy: number, qzz: number, az: number,\n result?: Transform\n ): Transform {\n if (result) {\n result._origin.set(ax, ay, az);\n result._matrix.setRowValues(qxx, qxy, qxz, qyx, qyy, qyz, qzx, qzy, qzz);\n return result;\n }\n return new Transform(\n Point3d.create(ax, ay, az),\n Matrix3d.createRowValues(qxx, qxy, qxz, qyx, qyy, qyz, qzx, qzy, qzz)\n );\n }\n /** Create a Transform with all zeros */\n public static createZero(result?: Transform): Transform {\n return Transform.createRowValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, result);\n }\n /**\n * Create a Transform with translation provided by x,y,z parts.\n * @param x x part of translation\n * @param y y part of translation\n * @param z z part of translation\n * @param result optional pre-allocated Transform\n * @returns new or updated transform\n */\n public static createTranslationXYZ(x: number = 0, y: number = 0, z: number = 0, result?: Transform): Transform {\n return Transform.createRefs(Vector3d.create(x, y, z), Matrix3d.createIdentity(), result);\n }\n /**\n * Create a Transform with specified `translation` part.\n * @param translation x,y,z parts of the translation\n * @param result optional pre-allocated Transform\n * @returns new or updated transform\n */\n public static createTranslation(translation: XYZ, result?: Transform): Transform {\n return Transform.createRefs(translation, Matrix3d.createIdentity(), result);\n }\n /** Return a reference (and NOT a copy) to the `matrix` part of the Transform. */\n public get matrix(): Matrix3d {\n return this._matrix;\n }\n /** Return a reference (and NOT a copy) to the `origin` part of the Transform. */\n public get origin(): XYZ {\n return this._origin;\n }\n /** return a (clone of) the `origin` part of the Transform, as a `Point3d` */\n public getOrigin(): Point3d {\n return Point3d.createFrom(this._origin);\n }\n /** return a (clone of) the `origin` part of the Transform, as a `Vector3d` */\n public getTranslation(): Vector3d {\n return Vector3d.createFrom(this._origin);\n }\n /** return a (clone of) the `matrix` part of the Transform, as a `Matrix3d` */\n public getMatrix(): Matrix3d {\n return this._matrix.clone();\n }\n /** test if the transform has `origin` = (0,0,0) and identity `matrix` */\n public get isIdentity(): boolean {\n return this._matrix.isIdentity && this._origin.isAlmostZero;\n }\n /** Create an identity transform */\n public static createIdentity(result?: Transform): Transform {\n if (result) {\n result._origin.setZero();\n result._matrix.setIdentity();\n return result;\n }\n return Transform.createRefs(Point3d.createZero(), Matrix3d.createIdentity());\n }\n /**\n * Create a Transform using the given `origin` and `matrix`.\n * * This is a the appropriate construction when the columns of the matrix are coordinate axes of a\n * local-to-world mapping.\n * * This function is a closely related to `createFixedPointAndMatrix` whose point input is the fixed point\n * of the world-to-world transformation.\n */\n public static createOriginAndMatrix(\n origin: XYZ | undefined, matrix: Matrix3d | undefined, result?: Transform\n ): Transform {\n if (result) {\n result._origin.setFromPoint3d(origin);\n result._matrix.setFrom(matrix);\n return result;\n }\n return Transform.createRefs(\n origin ? origin.cloneAsPoint3d() : Point3d.createZero(),\n matrix === undefined ? Matrix3d.createIdentity() : matrix.clone(),\n result\n );\n }\n /** Create a Transform using the given `origin` and columns of the `matrix`. If `undefined` zero is used. */\n public setOriginAndMatrixColumns(\n origin: XYZ | undefined, vectorX: Vector3d | undefined, vectorY: Vector3d | undefined, vectorZ: Vector3d | undefined\n ): void {\n if (origin !== undefined)\n this._origin.setFrom(origin);\n this._matrix.setColumns(vectorX, vectorY, vectorZ);\n }\n /** Create a Transform using the given `origin` and columns of the `matrix` */\n public static createOriginAndMatrixColumns(\n origin: XYZ, vectorX: Vector3d, vectorY: Vector3d, vectorZ: Vector3d, result?: Transform\n ): Transform {\n if (result)\n result.setOriginAndMatrixColumns(origin, vectorX, vectorY, vectorZ);\n else\n result = Transform.createRefs(Vector3d.createFrom(origin), Matrix3d.createColumns(vectorX, vectorY, vectorZ));\n return result;\n }\n /**\n * Create a Transform such that its `matrix` part is rigid.\n * * For details of how the matrix is created to be rigid, see documentation of `Matrix3d.createRigidFromColumns`\n */\n public static createRigidFromOriginAndColumns(\n origin: XYZ | undefined, vectorX: Vector3d, vectorY: Vector3d, axisOrder: AxisOrder, result?: Transform\n ): Transform | undefined {\n const matrix = Matrix3d.createRigidFromColumns(vectorX, vectorY, axisOrder, result ? result._matrix : undefined);\n if (!matrix)\n return undefined;\n if (result) {\n // result._matrix was already modified to become rigid via createRigidFromColumns\n result._origin.setFrom(origin);\n return result;\n }\n /**\n * We don't want to pass \"origin\" to createRefs because createRefs does not clone \"origin\" and use its reference.\n * That means if \"origin\" is changed via Transform at any point, the initial \"origin\" passed by the user is also\n * changed. To avoid that, we pass undefined to createRefs. This would cause createRefs to create a new \"origin\"\n * equals (0,0,0) which then we set it to the \"origin\" passed by user in the next line.\n */\n result = Transform.createRefs(undefined, matrix);\n result._origin.setFromPoint3d(origin);\n return result;\n }\n /**\n * Create a Transform with the specified `matrix`. Compute an `origin` (different from the given `fixedPoint`)\n * so that the `fixedPoint` maps back to itself. The returned Transform, transforms a point `p` to `M*p + (f - M*f)`\n * where `f` is the fixedPoint (i.e., `Tp = M*(p-f) + f`).\n */\n public static createFixedPointAndMatrix(\n fixedPoint: XYAndZ | undefined, matrix: Matrix3d, result?: Transform\n ): Transform {\n if (fixedPoint) {\n /**\n * if f is a fixed point, then Tf = M*f + o = f where M is the matrix and o is the origin.\n * we define the origin o = f - M*f. Therefore, Tf = Mf + o = M*f + (f - M*f) = f.\n */\n const origin = Matrix3d.xyzMinusMatrixTimesXYZ(fixedPoint, matrix, fixedPoint);\n return Transform.createRefs(origin, matrix.clone(), result);\n }\n return Transform.createRefs(undefined, matrix.clone());\n }\n /**\n * Create a transform with the specified `matrix` and points `a` and `b`. The returned Transform, transforms\n * point `p` to `M*(p-a) + b` (i.e., `Tp = M*(p-a) + b`) so transforms point `a` to 'b'.\n */\n public static createMatrixPickupPutdown(\n matrix: Matrix3d, a: Point3d, b: Point3d, result?: Transform\n ): Transform {\n // we define the origin o = b - M*a so Tp = M*p + o = M*p + (b - M*a) = M*(x-a) + b\n const origin = Matrix3d.xyzMinusMatrixTimesXYZ(b, matrix, a);\n return Transform.createRefs(origin, matrix.clone(), result);\n }\n /**\n * Create a Transform which leaves the fixedPoint unchanged and scales everything else around it by\n * a single scale factor. The returned Transform, transforms a point `p` to `M*p + (f - M*f)`\n * where `f` is the fixedPoint and M is the scale matrix (i.e., `Tp = M*(p-f) + f`).\n */\n public static createScaleAboutPoint(fixedPoint: Point3d, scale: number, result?: Transform): Transform {\n const matrix = Matrix3d.createScale(scale, scale, scale);\n /**\n * if f is a fixed point, then Tf = M*f + o = f where M is the matrix and o is the origin.\n * we define the origin o = f - M*f. Therefore, Tf = M*f + o = M*f + (f - M*f) = f.\n */\n const origin = Matrix3d.xyzMinusMatrixTimesXYZ(fixedPoint, matrix, fixedPoint);\n return Transform.createRefs(origin, matrix, result);\n }\n /**\n * Transform the input 2d point (using `Tp = M*p + o`).\n * Return as a new point or in the pre-allocated result (if result is given).\n */\n public multiplyPoint2d(point: XAndY, result?: Point2d): Point2d {\n return Matrix3d.xyPlusMatrixTimesXY(this._origin, this._matrix, point, result);\n }\n /**\n * Transform the input 3d point (using `Tp = M*p + o`).\n * Return as a new point or in the pre-allocated result (if result is given).\n */\n public multiplyPoint3d(point: XYAndZ, result?: Point3d): Point3d {\n // Tx = Mx + o so we return Mx + o\n return Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, point, result);\n }\n /**\n * Transform the input 3d point in place (using `Tp = M*p + o`).\n * Return as a new point or in the pre-allocated result (if result is given).\n */\n public multiplyXYAndZInPlace(point: XYAndZ): void {\n return Matrix3d.xyzPlusMatrixTimesXYZInPlace(this._origin, this._matrix, point);\n }\n /**\n * Transform the input 3d point (using `Tp = M*p + o`).\n * Return as a new point or in the pre-allocated result (if result is given).\n */\n public multiplyXYZ(x: number, y: number, z: number = 0, result?: Point3d): Point3d {\n // Tx = Mx + o so we return Mx + o\n return Matrix3d.xyzPlusMatrixTimesCoordinates(this._origin, this._matrix, x, y, z, result);\n }\n /**\n * Multiply a specific row (component) of the transform matrix times xyz and add it to the origin element\n * at the same row. Return the result.\n */\n public multiplyComponentXYZ(componentIndex: number, x: number, y: number, z: number = 0): number {\n const coffs = this._matrix.coffs;\n const idx = 3 * componentIndex;\n return this.origin.at(componentIndex) + (coffs[idx] * x) + (coffs[idx + 1] * y) + (coffs[idx + 2] * z);\n }\n /**\n * Multiply a specific row (component) of the transform matrix times xyz and add it to the origin element\n * at the same row times w. Return the result.\n */\n public multiplyComponentXYZW(componentIndex: number, x: number, y: number, z: number, w: number): number {\n const coffs = this._matrix.coffs;\n const idx = 3 * componentIndex;\n return (this.origin.at(componentIndex) * w) + (coffs[idx] * x) + (coffs[idx + 1] * y) + (coffs[idx + 2] * z);\n }\n /**\n * If `p = (x,y,z)` then transform is `Tp = M*p + o*w`. This function returns the transformed point as a new\n * point4d (`Tp` as first 3 elements and `w` as last element) or in the pre-allocated result (if result is given).\n */\n public multiplyXYZW(x: number, y: number, z: number, w: number, result?: Point4d): Point4d {\n return Matrix3d.xyzPlusMatrixTimesWeightedCoordinates(this._origin, this._matrix, x, y, z, w, result);\n }\n /**\n * If `p = (x,y,z)` then transform is `Tp = M*p + o*w`. This function returns the transformed point as a new\n * Float64Array with size 4 (`Tp` as first 3 elements and `w` as last element) or in the pre-allocated result\n * (if result is given).\n */\n public multiplyXYZWToFloat64Array(x: number, y: number, z: number, w: number, result?: Float64Array): Float64Array {\n return Matrix3d.xyzPlusMatrixTimesWeightedCoordinatesToFloat64Array(this._origin, this._matrix, x, y, z, w, result);\n }\n /**\n * If `p = (x,y,z)` then transform is `Tp = M*p + o`. This function returns the transformed point as a new\n * Float64Array with size 3 (`Tp` as 3 elements) or in the pre-allocated result (if result is given).\n */\n public multiplyXYZToFloat64Array(x: number, y: number, z: number, result?: Float64Array): Float64Array {\n return Matrix3d.xyzPlusMatrixTimesCoordinatesToFloat64Array(this._origin, this._matrix, x, y, z, result);\n }\n /**\n * Treat the 3x3 `matrix` and `origin` as upper 3x4 part of a 4x4 matrix, with 0001 as the final row. Now multiply\n * the transposed of this 4x4 matrix by Point4d given as xyzw. Return as a new point4d (`M*p` as first 3 elements\n * and `o*p + w` as last element where `p = (x,y,z)`) or in the pre-allocated result (if result is given).\n */\n public multiplyTransposeXYZW(x: number, y: number, z: number, w: number, result?: Point4d): Point4d {\n const coffs = this._matrix.coffs;\n const origin = this._origin;\n return Point4d.create(\n (x * coffs[0]) + (y * coffs[3]) + (z * coffs[6]),\n (x * coffs[1]) + (y * coffs[4]) + (z * coffs[7]),\n (x * coffs[2]) + (y * coffs[5]) + (z * coffs[8]),\n (x * origin.x) + (y * origin.y) + (z * origin.z) + w,\n result\n );\n }\n /** For each point in the array, replace point by the transformed point (using `Tp = M*p + o`) */\n public multiplyPoint3dArrayInPlace(points: Point3d[]) {\n let point;\n for (point of points)\n Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, point, point);\n }\n /** For each point in the 2d array, replace point by the transformed point (using `Tp = M*p + o`) */\n public multiplyPoint3dArrayArrayInPlace(chains: Point3d[][]) {\n for (const chain of chains)\n this.multiplyPoint3dArrayInPlace(chain);\n }\n /**\n * If for a point `p` we have `Tp = M*p + o = point` (where `point` is the transformed point), then\n * `p = MInverse * (point - o)`. This function returns the original point `p` if `point` is the\n * transformed point (`Tp = point`).\n * * Return as a new point or in the optional `result`.\n * * Returns `undefined` if the `matrix` part if this Transform is singular.\n */\n public multiplyInversePoint3d(point: XYAndZ, result?: Point3d): Point3d | undefined {\n return this._matrix.multiplyInverseXYZAsPoint3d(\n point.x - this._origin.x,\n point.y - this._origin.y,\n point.z - this._origin.z,\n result\n );\n }\n /**\n * If for a point `p` we have `Tp = M*p + w*o = weightedPoint` (where `weightedPoint` is the transformed point), then\n * `p = MInverse * (weightedPoint - w*o)`. This function returns a Point4d where first 3 elements are the original\n * point `p` if `weightedPoint` is the transformed point (`Tp = weightedPoint`) and the last element is `w`.\n * * Return as a new point or in the optional `result`.\n * * Returns `undefined` if the `matrix` part if this Transform is singular.\n */\n public multiplyInversePoint4d(weightedPoint: Point4d, result?: Point4d): Point4d | undefined {\n const w = weightedPoint.w;\n return this._matrix.multiplyInverseXYZW(\n weightedPoint.x - w * this.origin.x,\n weightedPoint.y - w * this.origin.y,\n weightedPoint.z - w * this.origin.z,\n w,\n result\n );\n }\n /**\n * If for a point `p = (x,y,z)` we have `Tp = M*p + o = point` (where `point` is the transformed point), then\n * `p = MInverse * (point - o)`. This function returns the original point `p` if `point` is the transformed\n * point (`Tp = point`).\n * * Return as a new point or in the optional `result`.\n * * Returns `undefined` if the `matrix` part if this Transform is singular.\n */\n public multiplyInverseXYZ(x: number, y: number, z: number, result?: Point3d): Point3d | undefined {\n return this._matrix.multiplyInverseXYZAsPoint3d(\n x - this._origin.x,\n y - this._origin.y,\n z - this._origin.z,\n result\n );\n }\n /**\n * * Compute (if needed) the inverse of the `matrix` part of the Transform, thereby ensuring inverse\n * operations can complete.\n * @param useCached If true, accept prior cached inverse if available.\n * @returns `true` if matrix inverse completes, `false` otherwise.\n */\n public computeCachedInverse(useCached: boolean = true): boolean {\n return this._matrix.computeCachedInverse(useCached);\n }\n /**\n * Match the length of destination array with the length of source array\n * * If destination has more elements than source, remove the extra elements.\n * * If destination has fewer elements than source, use `constructionFunction` to create new elements.\n * *\n * @param source the source array\n * @param dest the destination array\n * @param constructionFunction function to call to create new elements.\n */\n public static matchArrayLengths(source: any[], dest: any[], constructionFunction: () => any): number {\n const numSource = source.length;\n const numDest = dest.length;\n if (numSource > numDest) {\n for (let i = numDest; i < numSource; i++) {\n dest.push(constructionFunction());\n }\n } else if (numDest > numSource) {\n dest.length = numSource;\n }\n return numSource;\n }\n /**\n * If for each point `p` we have `Tp = M*p + o = point` (where `point` is the transformed point), then\n * `p = MInverse * (point - o)`. This function returns the array of original points `p[]` if `points`\n * is the array of transformed point (`Tp = point` for each `p` and `point`).\n * * If `results` is given, resize it to match the input `points` array and update it with original points `p[]`.\n * * If `results` is not given, return a new array.\n * * Returns `undefined` if the `matrix` part if this Transform is singular.\n */\n public multiplyInversePoint3dArray(points: Point3d[], results?: Point3d[]): Point3d[] | undefined {\n if (!this._matrix.computeCachedInverse(true))\n return undefined;\n const originX = this.origin.x;\n const originY = this.origin.y;\n const originZ = this.origin.z;\n if (results) {\n const n = Transform.matchArrayLengths(points, results, Point3d.createZero);\n for (let i = 0; i < n; i++)\n this._matrix.multiplyInverseXYZAsPoint3d(\n points[i].x - originX,\n points[i].y - originY,\n points[i].z - originZ,\n results[i]\n );\n }\n results = [];\n for (const point of points)\n results.push(\n this._matrix.multiplyInverseXYZAsPoint3d(\n point.x - originX,\n point.y - originY,\n point.z - originZ\n )!\n );\n return results;\n }\n /**\n * If for each point `p` we have `Tp = M*p + o = point` (where `point` is the transformed point), then\n * `p = MInverse * (point - o)`. This function calculates the array of original points `p[]` if `points`\n * is the array of transformed point (`Tp = point` for each `p` and `point`) and replaces `points`\n * with the array of original points.\n * * Returns `true` if the `matrix` part if this Transform is invertible and `false if singular.\n */\n public multiplyInversePoint3dArrayInPlace(points: Point3d[]): boolean {\n if (!this._matrix.computeCachedInverse(true))\n return false;\n for (const point of points)\n this._matrix.multiplyInverseXYZAsPoint3d(\n point.x - this.origin.x,\n point.y - this.origin.y,\n point.z - this.origin.z,\n point\n );\n return true;\n }\n /**\n * Transform the input 2d point array (using `Tp = M*p + o`).\n * * If `result` is given, resize it to match the input `points` array and update it with transformed points.\n * * If `result` is not given, return a new array.\n */\n public multiplyPoint2dArray(points: Point2d[], result?: Point2d[]): Point2d[] {\n if (result) {\n const n = Transform.matchArrayLengths(points, result, Point2d.createZero);\n for (let i = 0; i < n; i++)\n Matrix3d.xyPlusMatrixTimesXY(this._origin, this._matrix, points[i], result[i]);\n return result;\n }\n result = [];\n for (const p of points)\n result.push(Matrix3d.xyPlusMatrixTimesXY(this._origin, this._matrix, p));\n return result;\n }\n /**\n * Transform the input 3d point array (using `Tp = M*p + o`).\n * * If `result` is given, resize it to match the input `points` array and update it with transformed points.\n * * If `result` is not given, return a new array.\n */\n public multiplyPoint3dArray(points: Point3d[], result?: Point3d[]): Point3d[] {\n if (result) {\n const n = Transform.matchArrayLengths(points, result, Point3d.createZero);\n for (let i = 0; i < n; i++)\n Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, points[i], result[i]);\n return result;\n }\n result = [];\n for (const p of points)\n result.push(Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, p));\n return result;\n }\n /**\n * Multiply the vector by the `matrix` part of the Transform.\n * * The `origin` part of Transform is not used.\n * * If `result` is given, update it with the multiplication. Otherwise, create a new Vector3d.\n */\n public multiplyVector(vector: Vector3d, result?: Vector3d): Vector3d {\n return this._matrix.multiplyVector(vector, result);\n }\n /**\n * Multiply the vector by the `matrix` part of the Transform in place.\n * * The `origin` part of Transform is not used.\n */\n public multiplyVectorInPlace(vector: Vector3d): void {\n this._matrix.multiplyVectorInPlace(vector);\n }\n /**\n * Multiply the vector (x,y,z) by the `matrix` part of the Transform.\n * * The `origin` part of Transform is not used.\n * * If `result` is given, update it with the multiplication. Otherwise, create a new Vector3d.\n */\n public multiplyVectorXYZ(x: number, y: number, z: number, result?: Vector3d): Vector3d {\n return this._matrix.multiplyXYZ(x, y, z, result);\n }\n /**\n * Calculate `transformA * transformB` and store it into the calling instance (`this`).\n * * **Note:** If `transformA = [A a]` and `transformB = [B b]` then `transformA * transformB` is defined as\n * `[A*B Ab+a]`. See `multiplyTransformTransform` doc for math details.\n * @param transformA first operand\n * @param transformB second operand\n */\n public setMultiplyTransformTransform(transformA: Transform, transformB: Transform): void {\n Matrix3d.xyzPlusMatrixTimesXYZ(\n transformA._origin,\n transformA._matrix,\n transformB._origin,\n this._origin as Point3d\n );\n transformA._matrix.multiplyMatrixMatrix(transformB._matrix, this._matrix);\n }\n /**\n * Multiply `this` Transform times `other` Transform.\n * **Note:** If `this = [A a]` and `other = [B b]` then `this * other` is defined as [A*B Ab+a].\n * That's because we create a 4x4 matrix for each Transform with the 3x3 `matrix` and `origin`\n * as upper 3x4 part of a 4x4 matrix and 0001 as the final row. Then we multiply those two 4x4 matrixes:\n * ```\n * equation\n * \\begin{matrix}\n * \\text{`this` Transform with `matrix` part }\\bold{A}\\text{ and `origin` part }\\bold{a} & \\blockTransform{A}{a}\\\\\n * \\text{`other` Transform with `matrix` part }\\bold{B}\\text{ and `origin` part }\\bold{b} & \\blockTransform{B}{b} \\\\\n * \\text{product}& \\blockTransform{A}{a}\\blockTransform{B}{b}=\\blockTransform{AB}{Ab + a}\n * \\end{matrix}\n * ```\n * @param other the 'other` Transform to be multiplied to `this` Transform.\n * @param result optional preallocated result to reuse.\n */\n public multiplyTransformTransform(other: Transform, result?: Transform) {\n if (!result)\n return Transform.createRefs(\n Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, other._origin),\n this._matrix.multiplyMatrixMatrix(other._matrix)\n );\n result.setMultiplyTransformTransform(this, other);\n return result;\n }\n /**\n * Multiply `this` Transform times `other` Matrix3d (considered to be a Transform with 0 `origin`).\n * **Note:** If `this = [A a]`, then we promote `other` matrix to be a Transform [B 0].\n * Then `this * other` is defined as [A*B a]. That's because we create a 4x4 matrix for each Transform\n * with the 3x3 `matrix` and `origin` as upper 3x4 part of a 4x4 matrix and 0001 as the final row. Then we\n * multiply those two 4x4 matrixes:\n * ```\n * equation\n * \\begin{matrix}\n * \\text{`this` Transform with `matrix` part }\\bold{A}\\text{ and `origin` part }\\bold{a} & \\blockTransform{A}{a}\\\\\n * \\text{`other` matrix }\\bold{B}\\text{ promoted to block Transform} & \\blockTransform{B}{0} \\\\\n * \\text{product}& \\blockTransform{A}{a}\\blockTransform{B}{0}=\\blockTransform{AB}{a}\n * \\end{matrix}\n * ```\n * @param other the `other` Matrix3d to be multiplied to `this` Transform.\n * @param result optional preallocated result to reuse.\n */\n public multiplyTransformMatrix3d(other: Matrix3d, result?: Transform): Transform {\n if (!result)\n return Transform.createRefs(\n this._origin.cloneAsPoint3d(),\n this._matrix.multiplyMatrixMatrix(other)\n );\n this._matrix.multiplyMatrixMatrix(other, result._matrix);\n result._origin.setFrom(this._origin);\n return result;\n }\n /**\n * Return the Range of the transformed corners.\n * * The 8 corners are transformed individually.\n * * **Note:** Suppose you have a geometry, a range box around that geometry, and your Transform is a rotation.\n * If you rotate the range box and recompute a new range box around the rotated range box, then the new range\n * box will have a larger volume than the original range box. However, if you rotate the geometry itself and\n * then recompute the range box, it will be a tighter range box around the rotated geometry. `multiplyRange`\n * function creates the larger range box because it only has access to the range box and the geometry itself.\n */\n public multiplyRange(range: Range3d, result?: Range3d): Range3d {\n if (range.isNull)\n return range.clone(result);\n const lowX = range.low.x;\n const lowY = range.low.y;\n const lowZ = range.low.z;\n const highX = range.high.x;\n const highY = range.high.y;\n const highZ = range.high.z;\n result = Range3d.createNull(result);\n result.extendTransformedXYZ(this, lowX, lowY, lowZ);\n result.extendTransformedXYZ(this, highX, lowY, lowZ);\n result.extendTransformedXYZ(this, lowX, highY, lowZ);\n result.extendTransformedXYZ(this, highX, highY, lowZ);\n result.extendTransformedXYZ(this, lowX, lowY, highZ);\n result.extendTransformedXYZ(this, highX, lowY, highZ);\n result.extendTransformedXYZ(this, lowX, highY, highZ);\n result.extendTransformedXYZ(this, highX, highY, highZ);\n return result;\n }\n /**\n * Return a Transform which is the inverse of `this` Transform.\n * * If `transform = [M o]` then `transformInverse = [MInverse MInverse*-o]`\n * * Return `undefined` if this Transform's matrix is singular.\n */\n public inverse(result?: Transform): Transform | undefined {\n const matrixInverse = this._matrix.inverse(result ? result._matrix : undefined);\n if (!matrixInverse)\n return undefined;\n if (result) {\n // result._matrix is already defined\n matrixInverse.multiplyXYZ(-this._origin.x, -this._origin.y, -this._origin.z, result._origin as Vector3d);\n return result;\n }\n return Transform.createRefs(\n matrixInverse.multiplyXYZ(-this._origin.x, -this._origin.y, -this._origin.z),\n matrixInverse\n );\n }\n /**\n * Initialize 2 Transforms: First Transform maps a box (axis aligned) specified by `min` and `max` to\n * the unit box specified by 000 and 111 and inverse of it. Second Transform is the reverse of first.\n * @param min the min corner of the box\n * @param max the max corner of the box\n * @param npcToGlobal maps global (the unit box specified by 000 and 111) to NPC (a box specified by `min`\n * and `max`). Object created by caller, re-initialized here.\n * @param globalToNpc maps NPC (a box specified by `min` and `max`) to global (the unit box specified by\n * 000 and 111). Object created by caller, re-initialized here.\n * * NPC stands for `Normalized Projection Coordinate`\n */\n public static initFromRange(min: Point3d, max: Point3d, npcToGlobal?: Transform, globalToNpc?: Transform): void {\n const diag = max.minus(min);\n if (diag.x === 0.0)\n diag.x = 1.0;\n if (diag.y === 0.0)\n diag.y = 1.0;\n if (diag.z === 0.0)\n diag.z = 1.0;\n const rMatrix = new Matrix3d();\n /**\n * [diag.x 0 0 min.x]\n * npcToGlobal = [ 0 diag.y 0 min.y]\n * [ 0 0 diag.y min.z]\n *\n * npcToGlobal * 0 = min\n * npcToGlobal * 1 = diag + min = max\n */\n if (npcToGlobal) {\n Matrix3d.createScale(diag.x, diag.y, diag.z, rMatrix);\n Transform.createOriginAndMatrix(min, rMatrix, npcToGlobal);\n }\n /**\n * [1/diag.x 0 0 -min.x/diag.x]\n * globalToNpc = [ 0 1/diag.y 0 -min.y/diag.y]\n * [ 0 0 1/diag.y -min.z/diag.z]\n *\n * globalToNpc * min = min/diag - min/diag = 0\n * globalToNpc * max = max/diag - min/diag = diag/diag = 1\n */\n if (globalToNpc) {\n const origin = new Point3d(-min.x / diag.x, -min.y / diag.y, -min.z / diag.z);\n Matrix3d.createScale(1.0 / diag.x, 1.0 / diag.y, 1.0 / diag.z, rMatrix);\n Transform.createOriginAndMatrix(origin, rMatrix, globalToNpc);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"Transform.js","sourceRoot":"","sources":["../../../src/geometry3d/Transform.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAmB,QAAQ,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAO,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,SAAS;IAGpB,0EAA0E;IAC1E,YAAoB,MAAW,EAAE,MAAgB;QAC/C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,sEAAsE;IAC/D,MAAM,KAAK,QAAQ;QACxB,IAAI,SAAS,KAAK,IAAI,CAAC,SAAS,EAAE;YAChC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,cAAc,EAAE,CAAC;YAC5C,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;SACzB;QACD,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IACD,gEAAgE;IACzD,MAAM;QACX,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACtB,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IACD;;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C,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YACtD,SAAS,CAAC,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;SAC5D;QACD;;;;;;;WAOG;QACH,IAAI,WAAW,EAAE;YACf,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAC9E,QAAQ,CAAC,WAAW,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YACxE,SAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;SAC/D;IACH,CAAC;CACF","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 CartesianGeometry\r\n */\r\n\r\nimport { AxisOrder, BeJSONFunctions, Geometry } from \"../Geometry\";\r\nimport { Point4d } from \"../geometry4d/Point4d\";\r\nimport { Matrix3d } from \"./Matrix3d\";\r\nimport { Point2d } from \"./Point2dVector2d\";\r\nimport { Point3d, Vector3d, XYZ } from \"./Point3dVector3d\";\r\nimport { Range3d } from \"./Range\";\r\nimport { TransformProps, XAndY, XYAndZ } from \"./XYZProps\";\r\n\r\n/**\r\n * A Transform consists of an origin and a Matrix3d. This describes a coordinate frame with this origin, with\r\n * the columns of the Matrix3d being the local x,y,z axis directions.\r\n * * The math for a Transform `T` consisting of a Matrix3d `M` and a Point3d `o` on a Vector3d `p` is: `Tp = M*p + o`.\r\n * In other words, `T` is a combination of two operations on `p`: the action of matrix multiplication, followed by a\r\n * translation. `Origin` is a traditional term for `o`, because `T` can be interpreted as a change of basis from the\r\n * global axes centered at the global origin, to a new set of axes specified by matrix M columns centered at `o`.\r\n * * Beware that for common transformations (e.g. scale about point, rotate around an axis) the `fixed point` that\r\n * is used when describing the transform is NOT the `origin` stored in the transform. Setup methods (e.g\r\n * createFixedPointAndMatrix, createScaleAboutPoint) take care of determining the appropriate origin coordinates.\r\n * * If `T` is a translation, no point is fixed by `T`.\r\n * * If `T` is the identity, all points are fixed by `T`.\r\n * * If `T` is a scale about a point, one point is fixed by `T`.\r\n * * If `T` is a rotation about an axis, a line is fixed by `T`.\r\n * * If `T` is a projection to the plane, a plane is fixed by `T`.\r\n * @public\r\n */\r\nexport class Transform implements BeJSONFunctions {\r\n private _origin: XYZ;\r\n private _matrix: Matrix3d;\r\n // Constructor accepts and uses pointer to content (no copy is done here).\r\n private constructor(origin: XYZ, matrix: Matrix3d) {\r\n this._origin = origin;\r\n this._matrix = matrix;\r\n }\r\n private static _identity?: Transform;\r\n /** The identity Transform. Value is frozen and cannot be modified. */\r\n public static get identity(): Transform {\r\n if (undefined === this._identity) {\r\n this._identity = Transform.createIdentity();\r\n this._identity.freeze();\r\n }\r\n return this._identity;\r\n }\r\n /** Freeze this instance (and its members) so it is read-only */\r\n public freeze(): Readonly<this> {\r\n this._origin.freeze();\r\n this._matrix.freeze();\r\n return Object.freeze(this);\r\n }\r\n /**\r\n * Copy contents from other Transform into this Transform\r\n * @param other source transform\r\n */\r\n public setFrom(other: Transform) {\r\n this._origin.setFrom(other._origin);\r\n this._matrix.setFrom(other._matrix);\r\n }\r\n /** Set this Transform to be an identity. */\r\n public setIdentity() {\r\n this._origin.setZero();\r\n this._matrix.setIdentity();\r\n }\r\n /**\r\n * Set this Transform instance from flexible inputs:\r\n * * Any object (such as another Transform or TransformProps) that has `origin` and `matrix` members\r\n * accepted by `Point3d.setFromJSON` and `Matrix3d.setFromJSON`\r\n * * An array of 3 number arrays, each with 4 entries which are rows in a 3x4 matrix.\r\n * * An array of 12 numbers, each block of 4 entries as a row 3x4 matrix.\r\n * * If no input is provided, the identity Transform is returned.\r\n */\r\n public setFromJSON(json?: TransformProps | Transform): void {\r\n if (json) {\r\n if (json instanceof Object && (json as any).origin && (json as any).matrix) {\r\n this._origin.setFromJSON((json as any).origin);\r\n this._matrix.setFromJSON((json as any).matrix);\r\n return;\r\n }\r\n if (Geometry.isArrayOfNumberArray(json, 3, 4)) {\r\n const data = json as number[][];\r\n this._matrix.setRowValues(\r\n data[0][0], data[0][1], data[0][2],\r\n data[1][0], data[1][1], data[1][2],\r\n data[2][0], data[2][1], data[2][2]\r\n );\r\n this._origin.set(data[0][3], data[1][3], data[2][3]);\r\n return;\r\n }\r\n if (Geometry.isNumberArray(json, 12)) {\r\n const data = json as number[];\r\n this._matrix.setRowValues(\r\n data[0], data[1], data[2],\r\n data[4], data[5], data[6],\r\n data[8], data[9], data[10]\r\n );\r\n this._origin.set(data[3], data[7], data[11]);\r\n return;\r\n }\r\n }\r\n this.setIdentity();\r\n }\r\n /**\r\n * Test for near equality with `other` Transform. Comparison uses the `isAlmostEqual` methods on the `origin` and\r\n * `matrix` parts.\r\n * @param other Transform to compare to.\r\n */\r\n public isAlmostEqual(other: Readonly<Transform>): boolean {\r\n return this.origin.isAlmostEqual(other.origin) && this.matrix.isAlmostEqual(other.matrix);\r\n }\r\n /**\r\n * Test for near equality with `other` Transform. Comparison uses the `isAlmostEqual` methods on the `origin` part\r\n * and the `isAlmostEqualAllowZRotation` method on the `matrix` part.\r\n * @param other Transform to compare to.\r\n */\r\n public isAlmostEqualAllowZRotation(other: Transform): boolean {\r\n return this._origin.isAlmostEqual(other._origin) && this._matrix.isAlmostEqualAllowZRotation(other._matrix);\r\n }\r\n /**\r\n * Return a 3 by 4 matrix containing the rows of this Transform.\r\n * * The transform's origin coordinates are the last entries of the 3 json arrays\r\n */\r\n public toRows(): number[][] {\r\n return [\r\n [this._matrix.coffs[0], this._matrix.coffs[1], this._matrix.coffs[2], this._origin.x],\r\n [this._matrix.coffs[3], this._matrix.coffs[4], this._matrix.coffs[5], this._origin.y],\r\n [this._matrix.coffs[6], this._matrix.coffs[7], this._matrix.coffs[8], this._origin.z],\r\n ];\r\n }\r\n /**\r\n * Return a 3 by 4 matrix containing the rows of this Transform.\r\n * * The transform's origin coordinates are the last entries of the 3 json arrays\r\n */\r\n public toJSON(): TransformProps {\r\n return this.toRows();\r\n }\r\n /** Return a new Transform initialized by `Transform.setFromJSON` */\r\n public static fromJSON(json?: TransformProps): Transform {\r\n const result = Transform.createIdentity();\r\n result.setFromJSON(json);\r\n return result;\r\n }\r\n /** Copy the contents of `this` transform into a new Transform (or to the result, if specified). */\r\n public clone(result?: Transform): Transform {\r\n if (result) {\r\n result._matrix.setFrom(this._matrix);\r\n result._origin.setFrom(this._origin);\r\n return result;\r\n }\r\n return new Transform(\r\n Point3d.createFrom(this._origin),\r\n this._matrix.clone()\r\n );\r\n }\r\n /**\r\n * Return a modified copy of `this` Transform so that its `matrix` part is rigid (`origin` part is untouched).\r\n * * @see [[Matrix3d.axisOrderCrossProductsInPlace]] documentation for details of how the matrix is modified to rigid.\r\n */\r\n public cloneRigid(axisOrder: AxisOrder = AxisOrder.XYZ): Transform | undefined {\r\n const modifiedMatrix = Matrix3d.createRigidFromMatrix3d(this.matrix, axisOrder);\r\n if (!modifiedMatrix)\r\n return undefined;\r\n return new Transform(this.origin.cloneAsPoint3d(), modifiedMatrix);\r\n }\r\n /** Create a Transform with the given `origin` and `matrix`. Inputs are captured, not cloned. */\r\n public static createRefs(origin: XYZ | undefined, matrix: Matrix3d, result?: Transform): Transform {\r\n if (!origin)\r\n origin = Point3d.createZero();\r\n if (result) {\r\n result._origin = origin;\r\n result._matrix = matrix;\r\n return result;\r\n }\r\n return new Transform(origin, matrix);\r\n }\r\n /** Create a Transform with complete contents given. `q` inputs make the matrix and `a` inputs make the origin */\r\n public static createRowValues(\r\n qxx: number, qxy: number, qxz: number, ax: number,\r\n qyx: number, qyy: number, qyz: number, ay: number,\r\n qzx: number, qzy: number, qzz: number, az: number,\r\n result?: Transform\r\n ): Transform {\r\n if (result) {\r\n result._origin.set(ax, ay, az);\r\n result._matrix.setRowValues(qxx, qxy, qxz, qyx, qyy, qyz, qzx, qzy, qzz);\r\n return result;\r\n }\r\n return new Transform(\r\n Point3d.create(ax, ay, az),\r\n Matrix3d.createRowValues(qxx, qxy, qxz, qyx, qyy, qyz, qzx, qzy, qzz)\r\n );\r\n }\r\n /** Create a Transform with all zeros */\r\n public static createZero(result?: Transform): Transform {\r\n return Transform.createRowValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, result);\r\n }\r\n /**\r\n * Create a Transform with translation provided by x,y,z parts.\r\n * * Translation Transform maps any vector `v` to `v + p` where `p = (x,y,z)`\r\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/MoveCube\r\n * @param x x part of translation\r\n * @param y y part of translation\r\n * @param z z part of translation\r\n * @param result optional pre-allocated Transform\r\n * @returns new or updated transform\r\n */\r\n public static createTranslationXYZ(x: number = 0, y: number = 0, z: number = 0, result?: Transform): Transform {\r\n return Transform.createRefs(Vector3d.create(x, y, z), Matrix3d.createIdentity(), result);\r\n }\r\n /**\r\n * Create a Transform with specified `translation` part.\r\n * * Translation Transform maps any vector `v` to `v + translation`\r\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/MoveCube\r\n * @param translation x,y,z parts of the translation\r\n * @param result optional pre-allocated Transform\r\n * @returns new or updated transform\r\n */\r\n public static createTranslation(translation: XYZ, result?: Transform): Transform {\r\n return Transform.createRefs(translation, Matrix3d.createIdentity(), result);\r\n }\r\n /** Return a reference (and NOT a copy) to the `matrix` part of the Transform. */\r\n public get matrix(): Matrix3d {\r\n return this._matrix;\r\n }\r\n /** Return a reference (and NOT a copy) to the `origin` part of the Transform. */\r\n public get origin(): XYZ {\r\n return this._origin;\r\n }\r\n /** return a (clone of) the `origin` part of the Transform, as a `Point3d` */\r\n public getOrigin(): Point3d {\r\n return Point3d.createFrom(this._origin);\r\n }\r\n /** return a (clone of) the `origin` part of the Transform, as a `Vector3d` */\r\n public getTranslation(): Vector3d {\r\n return Vector3d.createFrom(this._origin);\r\n }\r\n /** return a (clone of) the `matrix` part of the Transform, as a `Matrix3d` */\r\n public getMatrix(): Matrix3d {\r\n return this._matrix.clone();\r\n }\r\n /** test if the transform has `origin` = (0,0,0) and identity `matrix` */\r\n public get isIdentity(): boolean {\r\n return this._matrix.isIdentity && this._origin.isAlmostZero;\r\n }\r\n /** Create an identity transform */\r\n public static createIdentity(result?: Transform): Transform {\r\n if (result) {\r\n result._origin.setZero();\r\n result._matrix.setIdentity();\r\n return result;\r\n }\r\n return Transform.createRefs(Point3d.createZero(), Matrix3d.createIdentity());\r\n }\r\n /**\r\n * Create a Transform using the given `origin` and `matrix`.\r\n * * This is a the appropriate construction when the columns of the matrix are coordinate axes of a\r\n * local-to-world mapping.\r\n * * This function is a closely related to `createFixedPointAndMatrix` whose point input is the fixed point\r\n * of the world-to-world transformation.\r\n * * If origin is `undefined`, (0,0,0) is used. If matrix is `undefined` the identity matrix is used.\r\n */\r\n public static createOriginAndMatrix(\r\n origin: XYZ | undefined, matrix: Matrix3d | undefined, result?: Transform\r\n ): Transform {\r\n if (result) {\r\n result._origin.setFromPoint3d(origin);\r\n result._matrix.setFrom(matrix);\r\n return result;\r\n }\r\n return Transform.createRefs(\r\n origin ? origin.cloneAsPoint3d() : Point3d.createZero(),\r\n matrix === undefined ? Matrix3d.createIdentity() : matrix.clone(),\r\n result\r\n );\r\n }\r\n /** Create a Transform using the given `origin` and columns of the `matrix`. If `undefined` zero is used. */\r\n public setOriginAndMatrixColumns(\r\n origin: XYZ | undefined, vectorX: Vector3d | undefined, vectorY: Vector3d | undefined, vectorZ: Vector3d | undefined\r\n ): void {\r\n if (origin !== undefined)\r\n this._origin.setFrom(origin);\r\n this._matrix.setColumns(vectorX, vectorY, vectorZ);\r\n }\r\n /** Create a Transform using the given `origin` and columns of the `matrix` */\r\n public static createOriginAndMatrixColumns(\r\n origin: XYZ, vectorX: Vector3d, vectorY: Vector3d, vectorZ: Vector3d, result?: Transform\r\n ): Transform {\r\n if (result)\r\n result.setOriginAndMatrixColumns(origin, vectorX, vectorY, vectorZ);\r\n else\r\n result = Transform.createRefs(Vector3d.createFrom(origin), Matrix3d.createColumns(vectorX, vectorY, vectorZ));\r\n return result;\r\n }\r\n /**\r\n * Create a Transform such that its `matrix` part is rigid.\r\n * @see [[Matrix3d.createRigidFromColumns]] for details of how the matrix is created to be rigid.\r\n */\r\n public static createRigidFromOriginAndColumns(\r\n origin: XYZ | undefined, vectorX: Vector3d, vectorY: Vector3d, axisOrder: AxisOrder, result?: Transform\r\n ): Transform | undefined {\r\n const matrix = Matrix3d.createRigidFromColumns(vectorX, vectorY, axisOrder, result ? result._matrix : undefined);\r\n if (!matrix)\r\n return undefined;\r\n if (result) {\r\n // result._matrix was already modified to become rigid via createRigidFromColumns\r\n result._origin.setFrom(origin);\r\n return result;\r\n }\r\n /**\r\n * We don't want to pass \"origin\" to createRefs because createRefs does not clone \"origin\". That means if \"origin\"\r\n * is changed via Transform at any point, the initial \"origin\" passed by the user is also changed. To avoid that,\r\n * we pass \"undefined\" to createRefs so that it allocates a new point which then we set it to the \"origin\" which\r\n * is passed by user in the next line.\r\n */\r\n result = Transform.createRefs(undefined, matrix);\r\n result._origin.setFromPoint3d(origin);\r\n return result;\r\n }\r\n /**\r\n * Create a Transform with the specified `matrix`. Compute an `origin` (different from the given `fixedPoint`)\r\n * so that the `fixedPoint` maps back to itself. The returned Transform, transforms a point `p` to `M*p + (f - M*f)`\r\n * where `f` is the fixedPoint (i.e., `Tp = M*(p-f) + f`).\r\n */\r\n public static createFixedPointAndMatrix(\r\n fixedPoint: XYAndZ | undefined, matrix: Matrix3d, result?: Transform\r\n ): Transform {\r\n if (fixedPoint) {\r\n /**\r\n * if f is a fixed point, then Tf = M*f + o = f where M is the matrix and o is the origin.\r\n * we define the origin o = f - M*f. Therefore, Tf = Mf + o = M*f + (f - M*f) = f.\r\n */\r\n const origin = Matrix3d.xyzMinusMatrixTimesXYZ(fixedPoint, matrix, fixedPoint);\r\n return Transform.createRefs(origin, matrix.clone(), result);\r\n }\r\n return Transform.createRefs(undefined, matrix.clone());\r\n }\r\n /**\r\n * Create a transform with the specified `matrix` and points `a` and `b`. The returned Transform maps\r\n * point `p` to `M*(p-a) + b` (i.e., `Tp = M*(p-a) + b`), so maps `a` to 'b'.\r\n */\r\n public static createMatrixPickupPutdown(\r\n matrix: Matrix3d, a: Point3d, b: Point3d, result?: Transform\r\n ): Transform {\r\n // we define the origin o = b - M*a so Tp = M*p + o = M*p + (b - M*a) = M*(p-a) + b\r\n const origin = Matrix3d.xyzMinusMatrixTimesXYZ(b, matrix, a);\r\n return Transform.createRefs(origin, matrix.clone(), result);\r\n }\r\n /**\r\n * Create a Transform which leaves the fixedPoint unchanged and scales everything else around it by\r\n * a single scale factor. The returned Transform maps a point `p` to `M*p + (f - M*f)`\r\n * where `f` is the fixedPoint and M is the scale matrix (i.e., `Tp = M*(p-f) + f`).\r\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/ScaleCube\r\n */\r\n public static createScaleAboutPoint(fixedPoint: Point3d, scale: number, result?: Transform): Transform {\r\n const matrix = Matrix3d.createScale(scale, scale, scale);\r\n /**\r\n * if f is a fixed point, then Tf = M*f + o = f where M is the matrix and o is the origin.\r\n * we define the origin o = f - M*f. Therefore, Tf = M*f + o = M*f + (f - M*f) = f.\r\n */\r\n const origin = Matrix3d.xyzMinusMatrixTimesXYZ(fixedPoint, matrix, fixedPoint);\r\n return Transform.createRefs(origin, matrix, result);\r\n }\r\n /**\r\n * Transform the input 2d point (using `Tp = M*p + o`).\r\n * Return as a new point or in the pre-allocated result (if result is given).\r\n */\r\n public multiplyPoint2d(point: XAndY, result?: Point2d): Point2d {\r\n return Matrix3d.xyPlusMatrixTimesXY(this._origin, this._matrix, point, result);\r\n }\r\n /**\r\n * Transform the input 3d point (using `Tp = M*p + o`).\r\n * Return as a new point or in the pre-allocated result (if result is given).\r\n */\r\n public multiplyPoint3d(point: XYAndZ, result?: Point3d): Point3d {\r\n // Tx = Mx + o so we return Mx + o\r\n return Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, point, result);\r\n }\r\n /**\r\n * Transform the input 3d point in place (using `Tp = M*p + o`).\r\n * Return as a new point or in the pre-allocated result (if result is given).\r\n */\r\n public multiplyXYAndZInPlace(point: XYAndZ): void {\r\n return Matrix3d.xyzPlusMatrixTimesXYZInPlace(this._origin, this._matrix, point);\r\n }\r\n /**\r\n * Transform the input 3d point (using `Tp = M*p + o`).\r\n * Return as a new point or in the pre-allocated result (if result is given).\r\n */\r\n public multiplyXYZ(x: number, y: number, z: number = 0, result?: Point3d): Point3d {\r\n // Tx = Mx + o so we return Mx + o\r\n return Matrix3d.xyzPlusMatrixTimesCoordinates(this._origin, this._matrix, x, y, z, result);\r\n }\r\n /**\r\n * Multiply a specific row (component) of the 3x4 instance times (x,y,z,1). Return the result.\r\n */\r\n public multiplyComponentXYZ(componentIndex: number, x: number, y: number, z: number = 0): number {\r\n const coffs = this._matrix.coffs;\r\n const idx = 3 * componentIndex;\r\n return this.origin.at(componentIndex) + (coffs[idx] * x) + (coffs[idx + 1] * y) + (coffs[idx + 2] * z);\r\n }\r\n /**\r\n * Multiply a specific row (component) of the 3x4 instance times (x,y,z,w). Return the result.\r\n */\r\n public multiplyComponentXYZW(componentIndex: number, x: number, y: number, z: number, w: number): number {\r\n const coffs = this._matrix.coffs;\r\n const idx = 3 * componentIndex;\r\n return (this.origin.at(componentIndex) * w) + (coffs[idx] * x) + (coffs[idx + 1] * y) + (coffs[idx + 2] * z);\r\n }\r\n /**\r\n * Transform the homogeneous point. Return as a new `Point4d`, or in the pre-allocated result (if result is given).\r\n * * If `p = (x,y,z)` then this method computes `Tp = M*p + o*w` and returns the `Point4d` formed by `Tp` in the\r\n * first three coordinates, and `w` in the fourth.\r\n * * Logically, this is multiplication by the 4x4 matrix formed from the 3x4 instance augmented with fourth row 0001.\r\n */\r\n public multiplyXYZW(x: number, y: number, z: number, w: number, result?: Point4d): Point4d {\r\n return Matrix3d.xyzPlusMatrixTimesWeightedCoordinates(this._origin, this._matrix, x, y, z, w, result);\r\n }\r\n /**\r\n * Transform the homogeneous point. Return as new `Float64Array` with size 4, or in the pre-allocated result (if\r\n * result is given).\r\n * * If `p = (x,y,z)` then this method computes `Tp = M*p + o*w` and returns the `Float64Array` formed by `Tp`\r\n * in the first 3 numbers of the array and `w` as the fourth.\r\n * * Logically, this is multiplication by the 4x4 matrix formed from the 3x4 instance augmented with fourth row 0001.\r\n */\r\n public multiplyXYZWToFloat64Array(x: number, y: number, z: number, w: number, result?: Float64Array): Float64Array {\r\n return Matrix3d.xyzPlusMatrixTimesWeightedCoordinatesToFloat64Array(this._origin, this._matrix, x, y, z, w, result);\r\n }\r\n /**\r\n * * Transform the point. Return as new `Float64Array` with size 3, or in the pre-allocated result (if result is given).\r\n * * If `p = (x,y,z)` then this method computes `Tp = M*p + o` and returns it as the first 3 elements of the array.\r\n */\r\n public multiplyXYZToFloat64Array(x: number, y: number, z: number, result?: Float64Array): Float64Array {\r\n return Matrix3d.xyzPlusMatrixTimesCoordinatesToFloat64Array(this._origin, this._matrix, x, y, z, result);\r\n }\r\n /**\r\n * Multiply the homogeneous point by the transpose of `this` Transform. Return as a new `Point4d` or in the\r\n * pre-allocated result (if result is given).\r\n * * If `p = (x,y,z)` then this method computes `M^t*p` and returns it in the first three coordinates of the `Point4d`,\r\n * and `o*p + w` in the fourth.\r\n * * Logically, this is multiplication by the transpose of the 4x4 matrix formed from the 3x4 instance augmented with\r\n * fourth row 0001.\r\n */\r\n public multiplyTransposeXYZW(x: number, y: number, z: number, w: number, result?: Point4d): Point4d {\r\n const coffs = this._matrix.coffs;\r\n const origin = this._origin;\r\n return Point4d.create(\r\n (x * coffs[0]) + (y * coffs[3]) + (z * coffs[6]),\r\n (x * coffs[1]) + (y * coffs[4]) + (z * coffs[7]),\r\n (x * coffs[2]) + (y * coffs[5]) + (z * coffs[8]),\r\n (x * origin.x) + (y * origin.y) + (z * origin.z) + w,\r\n result\r\n );\r\n }\r\n /** For each point in the array, replace point by the transformed point (using `Tp = M*p + o`) */\r\n public multiplyPoint3dArrayInPlace(points: Point3d[]) {\r\n let point;\r\n for (point of points)\r\n Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, point, point);\r\n }\r\n /** For each point in the 2d array, replace point by the transformed point (using `Tp = M*p + o`) */\r\n public multiplyPoint3dArrayArrayInPlace(chains: Point3d[][]) {\r\n for (const chain of chains)\r\n this.multiplyPoint3dArrayInPlace(chain);\r\n }\r\n /**\r\n * Multiply the point by the inverse Transform.\r\n * * If for a point `p` we have `Tp = M*p + o = q`, then `p = MInverse*(q - o) = TInverse q` so `TInverse`\r\n * Transform has matrix part `MInverse` and origin part `-MInverse*o`.\r\n * * Return as a new point or in the optional `result`.\r\n * * Returns `undefined` if the `matrix` part if this Transform is singular.\r\n */\r\n public multiplyInversePoint3d(point: XYAndZ, result?: Point3d): Point3d | undefined {\r\n return this._matrix.multiplyInverseXYZAsPoint3d(\r\n point.x - this._origin.x,\r\n point.y - this._origin.y,\r\n point.z - this._origin.z,\r\n result\r\n );\r\n }\r\n /**\r\n * Multiply the homogenous point by the inverse Transform.\r\n * * If for a point `p` we have `Tp = M*p + o = q`, then `p = MInverse*(q - o) = TInverse q` so `TInverse` Transform\r\n * has matrix part `MInverse` and origin part `-MInverse*o`.\r\n * * This method computes `TInverse p = MInverse*p - w*MInverse*o` and returns the `Point4d` formed by `TInverse*p`\r\n * in the first three coordinates, and `w` in the fourth.\r\n * * Logically, this is multiplication by the inverse of the 4x4 matrix formed from the 3x4 instance augmented with\r\n * fourth row 0001. This is equivalent to the 4x4 matrix formed in similar fashion from the inverse of this instance.\r\n * * Return as a new point or in the optional `result`.\r\n * * Returns `undefined` if the `matrix` part if this Transform is singular.\r\n */\r\n public multiplyInversePoint4d(weightedPoint: Point4d, result?: Point4d): Point4d | undefined {\r\n const w = weightedPoint.w;\r\n return this._matrix.multiplyInverseXYZW(\r\n weightedPoint.x - w * this.origin.x,\r\n weightedPoint.y - w * this.origin.y,\r\n weightedPoint.z - w * this.origin.z,\r\n w,\r\n result\r\n );\r\n }\r\n /**\r\n * Multiply the point by the inverse Transform.\r\n * * If for a point `p` we have `Tp = M*p + o = q`, then `p = MInverse*(q - o) = TInverse q` so `TInverse` Transform\r\n * has matrix part `MInverse` and origin part `-MInverse*o`.\r\n * * Return as a new point or in the optional `result`.\r\n * * Returns `undefined` if the `matrix` part if this Transform is singular.\r\n */\r\n public multiplyInverseXYZ(x: number, y: number, z: number, result?: Point3d): Point3d | undefined {\r\n return this._matrix.multiplyInverseXYZAsPoint3d(\r\n x - this._origin.x,\r\n y - this._origin.y,\r\n z - this._origin.z,\r\n result\r\n );\r\n }\r\n /**\r\n * * Compute (if needed) the inverse of the `matrix` part of the Transform, thereby ensuring inverse\r\n * operations can complete.\r\n * @param useCached If true, accept prior cached inverse if available.\r\n * @returns `true` if matrix inverse completes, `false` otherwise.\r\n */\r\n public computeCachedInverse(useCached: boolean = true): boolean {\r\n return this._matrix.computeCachedInverse(useCached);\r\n }\r\n /**\r\n * Match the length of destination array with the length of source array\r\n * * If destination has more elements than source, remove the extra elements.\r\n * * If destination has fewer elements than source, use `constructionFunction` to create new elements.\r\n * *\r\n * @param source the source array\r\n * @param dest the destination array\r\n * @param constructionFunction function to call to create new elements.\r\n */\r\n public static matchArrayLengths(source: any[], dest: any[], constructionFunction: () => any): number {\r\n const numSource = source.length;\r\n const numDest = dest.length;\r\n if (numSource > numDest) {\r\n for (let i = numDest; i < numSource; i++) {\r\n dest.push(constructionFunction());\r\n }\r\n } else if (numDest > numSource) {\r\n dest.length = numSource;\r\n }\r\n return numSource;\r\n }\r\n /**\r\n * Multiply each point in the array by the inverse of `this` Transform.\r\n * * For a transform `T = [M o]` the inverse transform `T' = [M' -M'o]` exists if and only if `M` has an inverse\r\n * `M'`. Indeed, for any point `p`, we have `T'Tp = T'(Mp + o) = M'(Mp + o) - M'o = M'Mp + M'o - M'o = p.`\r\n * * If `result` is given, resize it to match the input `points` array and update it with original points `p[]`.\r\n * * If `result` is not given, return a new array.\r\n * * Returns `undefined` if the `matrix` part if this Transform is singular.\r\n */\r\n public multiplyInversePoint3dArray(points: Point3d[], result?: Point3d[]): Point3d[] | undefined {\r\n if (!this._matrix.computeCachedInverse(true))\r\n return undefined;\r\n const originX = this.origin.x;\r\n const originY = this.origin.y;\r\n const originZ = this.origin.z;\r\n if (result) {\r\n const n = Transform.matchArrayLengths(points, result, Point3d.createZero);\r\n for (let i = 0; i < n; i++)\r\n this._matrix.multiplyInverseXYZAsPoint3d(\r\n points[i].x - originX,\r\n points[i].y - originY,\r\n points[i].z - originZ,\r\n result[i]\r\n );\r\n return result;\r\n }\r\n result = [];\r\n for (const point of points)\r\n result.push(\r\n this._matrix.multiplyInverseXYZAsPoint3d(\r\n point.x - originX,\r\n point.y - originY,\r\n point.z - originZ\r\n )!\r\n );\r\n return result;\r\n }\r\n /**\r\n * Multiply each point in the array by the inverse of `this` Transform in place.\r\n * * For a transform `T = [M o]` the inverse transform `T' = [M' -M'o]` exists if and only if `M` has an inverse\r\n * `M'`. Indeed, for any point `p`, we have `T'Tp = T'(Mp + o) = M'(Mp + o) - M'o = M'Mp + M'o - M'o = p.`\r\n * * Returns `true` if the `matrix` part if this Transform is invertible and `false` if singular.\r\n */\r\n public multiplyInversePoint3dArrayInPlace(points: Point3d[]): boolean {\r\n if (!this._matrix.computeCachedInverse(true))\r\n return false;\r\n for (const point of points)\r\n this._matrix.multiplyInverseXYZAsPoint3d(\r\n point.x - this.origin.x,\r\n point.y - this.origin.y,\r\n point.z - this.origin.z,\r\n point\r\n );\r\n return true;\r\n }\r\n /**\r\n * Transform the input 2d point array (using `Tp = M*p + o`).\r\n * * If `result` is given, resize it to match the input `points` array and update it with transformed points.\r\n * * If `result` is not given, return a new array.\r\n */\r\n public multiplyPoint2dArray(points: Point2d[], result?: Point2d[]): Point2d[] {\r\n if (result) {\r\n const n = Transform.matchArrayLengths(points, result, Point2d.createZero);\r\n for (let i = 0; i < n; i++)\r\n Matrix3d.xyPlusMatrixTimesXY(this._origin, this._matrix, points[i], result[i]);\r\n return result;\r\n }\r\n result = [];\r\n for (const p of points)\r\n result.push(Matrix3d.xyPlusMatrixTimesXY(this._origin, this._matrix, p));\r\n return result;\r\n }\r\n /**\r\n * Transform the input 3d point array (using `Tp = M*p + o`).\r\n * * If `result` is given, resize it to match the input `points` array and update it with transformed points.\r\n * * If `result` is not given, return a new array.\r\n */\r\n public multiplyPoint3dArray(points: Point3d[], result?: Point3d[]): Point3d[] {\r\n if (result) {\r\n const n = Transform.matchArrayLengths(points, result, Point3d.createZero);\r\n for (let i = 0; i < n; i++)\r\n Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, points[i], result[i]);\r\n return result;\r\n }\r\n result = [];\r\n for (const p of points)\r\n result.push(Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, p));\r\n return result;\r\n }\r\n /**\r\n * Multiply the vector by the `matrix` part of the Transform.\r\n * * The `origin` part of Transform is not used.\r\n * * If `result` is given, update it with the multiplication. Otherwise, create a new Vector3d.\r\n */\r\n public multiplyVector(vector: Vector3d, result?: Vector3d): Vector3d {\r\n return this._matrix.multiplyVector(vector, result);\r\n }\r\n /**\r\n * Multiply the vector by the `matrix` part of the Transform in place.\r\n * * The `origin` part of Transform is not used.\r\n */\r\n public multiplyVectorInPlace(vector: Vector3d): void {\r\n this._matrix.multiplyVectorInPlace(vector);\r\n }\r\n /**\r\n * Multiply the vector (x,y,z) by the `matrix` part of the Transform.\r\n * * The `origin` part of Transform is not used.\r\n * * If `result` is given, update it with the multiplication. Otherwise, create a new Vector3d.\r\n */\r\n public multiplyVectorXYZ(x: number, y: number, z: number, result?: Vector3d): Vector3d {\r\n return this._matrix.multiplyXYZ(x, y, z, result);\r\n }\r\n /**\r\n * Calculate `transformA * transformB` and store it into the calling instance (`this`).\r\n * * **Note:** If `transformA = [A a]` and `transformB = [B b]` then `transformA * transformB` is defined as\r\n * `[A*B Ab+a]`.\r\n * * @see [[multiplyTransformTransform]] documentation for math details.\r\n * @param transformA first operand\r\n * @param transformB second operand\r\n */\r\n public setMultiplyTransformTransform(transformA: Transform, transformB: Transform): void {\r\n Matrix3d.xyzPlusMatrixTimesXYZ(\r\n transformA._origin,\r\n transformA._matrix,\r\n transformB._origin,\r\n this._origin as Point3d\r\n );\r\n transformA._matrix.multiplyMatrixMatrix(transformB._matrix, this._matrix);\r\n }\r\n /**\r\n * Multiply `this` Transform times `other` Transform.\r\n * * **Note:** If `this = [A a]` and `other = [B b]` then `this * other` is defined as [A*B Ab+a] because:\r\n * ```\r\n * equation\r\n * \\begin{matrix}\r\n * \\text{this Transform with matrix part }\\bold{A}\\text{ and origin part }\\bold{a} & \\blockTransform{A}{a}\\\\\r\n * \\text{other Transform with matrix part }\\bold{B}\\text{ and origin part }\\bold{b} & \\blockTransform{B}{b} \\\\\r\n * \\text{product}& \\blockTransform{A}{a}\\blockTransform{B}{b}=\\blockTransform{AB}{Ab + a}\r\n * \\end{matrix}\r\n * ```\r\n * @param other the 'other` Transform to be multiplied to `this` Transform.\r\n * @param result optional preallocated `result` to reuse.\r\n */\r\n public multiplyTransformTransform(other: Transform, result?: Transform) {\r\n if (!result)\r\n return Transform.createRefs(\r\n Matrix3d.xyzPlusMatrixTimesXYZ(this._origin, this._matrix, other._origin),\r\n this._matrix.multiplyMatrixMatrix(other._matrix)\r\n );\r\n result.setMultiplyTransformTransform(this, other);\r\n return result;\r\n }\r\n /**\r\n * Multiply `this` Transform times `other` Matrix3d (considered to be a Transform with 0 `origin`).\r\n * * **Note:** If `this = [A a]` and `other = [B 0]`, then `this * other` is defined as [A*B a] because:\r\n * ```\r\n * equation\r\n * \\begin{matrix}\r\n * \\text{this Transform with matrix part }\\bold{A}\\text{ and origin part }\\bold{a} & \\blockTransform{A}{a}\\\\\r\n * \\text{other matrix }\\bold{B}\\text{ promoted to block Transform} & \\blockTransform{B}{0} \\\\\r\n * \\text{product}& \\blockTransform{A}{a}\\blockTransform{B}{0}=\\blockTransform{AB}{a}\r\n * \\end{matrix}\r\n * ```\r\n * @param other the `other` Matrix3d to be multiplied to `this` Transform.\r\n * @param result optional preallocated `result` to reuse.\r\n */\r\n public multiplyTransformMatrix3d(other: Matrix3d, result?: Transform): Transform {\r\n if (!result)\r\n return Transform.createRefs(\r\n this._origin.cloneAsPoint3d(),\r\n this._matrix.multiplyMatrixMatrix(other)\r\n );\r\n this._matrix.multiplyMatrixMatrix(other, result._matrix);\r\n result._origin.setFrom(this._origin);\r\n return result;\r\n }\r\n /**\r\n * Return the range of the transformed corners.\r\n * * The 8 corners are transformed individually.\r\n * * **Note:** Suppose you have a geometry, a range box around that geometry, and your Transform is a rotation.\r\n * If you rotate the range box and recompute a new range box around the rotated range box, then the new range\r\n * box will have a larger volume than the original range box. However, if you rotate the geometry itself and\r\n * then recompute the range box, it will be a tighter range box around the rotated geometry. `multiplyRange`\r\n * function creates the larger range box because it only has access to the range box and not the geometry itself.\r\n */\r\n public multiplyRange(range: Range3d, result?: Range3d): Range3d {\r\n if (range.isNull)\r\n return range.clone(result);\r\n const lowX = range.low.x;\r\n const lowY = range.low.y;\r\n const lowZ = range.low.z;\r\n const highX = range.high.x;\r\n const highY = range.high.y;\r\n const highZ = range.high.z;\r\n result = Range3d.createNull(result);\r\n result.extendTransformedXYZ(this, lowX, lowY, lowZ);\r\n result.extendTransformedXYZ(this, highX, lowY, lowZ);\r\n result.extendTransformedXYZ(this, lowX, highY, lowZ);\r\n result.extendTransformedXYZ(this, highX, highY, lowZ);\r\n result.extendTransformedXYZ(this, lowX, lowY, highZ);\r\n result.extendTransformedXYZ(this, highX, lowY, highZ);\r\n result.extendTransformedXYZ(this, lowX, highY, highZ);\r\n result.extendTransformedXYZ(this, highX, highY, highZ);\r\n return result;\r\n }\r\n /**\r\n * Return a Transform which is the inverse of `this` Transform.\r\n * * If `transform = [M o]` then `transformInverse = [MInverse -MInverse*o]`\r\n * * Return `undefined` if this Transform's matrix is singular.\r\n */\r\n public inverse(result?: Transform): Transform | undefined {\r\n const matrixInverse = this._matrix.inverse(result ? result._matrix : undefined);\r\n if (!matrixInverse)\r\n return undefined;\r\n if (result) {\r\n // result._matrix is already defined\r\n matrixInverse.multiplyXYZ(-this._origin.x, -this._origin.y, -this._origin.z, result._origin as Vector3d);\r\n return result;\r\n }\r\n return Transform.createRefs(\r\n matrixInverse.multiplyXYZ(-this._origin.x, -this._origin.y, -this._origin.z),\r\n matrixInverse\r\n );\r\n }\r\n /**\r\n * Initialize 2 Transforms that map between the unit box (specified by 000 and 111) and the range box specified\r\n * by the input points.\r\n * @param min the min corner of the range box\r\n * @param max the max corner of the range box\r\n * @param npcToGlobal maps NPC coordinates into range box coordinates. Specifically, maps 000 to `min` and maps\r\n * 111 to `max`. This Transform is the inverse of `globalToNpc`. Object created by caller, re-initialized here.\r\n * @param globalToNpc maps range box coordinates into NPC coordinates. Specifically, maps `min` to 000 and maps\r\n * `max` to 111. This Transform is the inverse of `npcToGlobal`. Object created by caller, re-initialized here.\r\n * * NPC stands for `Normalized Projection Coordinate`\r\n */\r\n public static initFromRange(min: Point3d, max: Point3d, npcToGlobal?: Transform, globalToNpc?: Transform): void {\r\n const diag = max.minus(min);\r\n if (diag.x === 0.0)\r\n diag.x = 1.0;\r\n if (diag.y === 0.0)\r\n diag.y = 1.0;\r\n if (diag.z === 0.0)\r\n diag.z = 1.0;\r\n const rMatrix = new Matrix3d();\r\n /**\r\n * [diag.x 0 0 min.x]\r\n * npcToGlobal = [ 0 diag.y 0 min.y]\r\n * [ 0 0 diag.y min.z]\r\n *\r\n * npcToGlobal * 0 = min\r\n * npcToGlobal * 1 = diag + min = max\r\n */\r\n if (npcToGlobal) {\r\n Matrix3d.createScale(diag.x, diag.y, diag.z, rMatrix);\r\n Transform.createOriginAndMatrix(min, rMatrix, npcToGlobal);\r\n }\r\n /**\r\n * [1/diag.x 0 0 -min.x/diag.x]\r\n * globalToNpc = [ 0 1/diag.y 0 -min.y/diag.y]\r\n * [ 0 0 1/diag.y -min.z/diag.z]\r\n *\r\n * globalToNpc * min = min/diag - min/diag = 0\r\n * globalToNpc * max = max/diag - min/diag = diag/diag = 1\r\n */\r\n if (globalToNpc) {\r\n const origin = new Point3d(-min.x / diag.x, -min.y / diag.y, -min.z / diag.z);\r\n Matrix3d.createScale(1.0 / diag.x, 1.0 / diag.y, 1.0 / diag.z, rMatrix);\r\n Transform.createOriginAndMatrix(origin, rMatrix, globalToNpc);\r\n }\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UVSurfaceOps.js","sourceRoot":"","sources":["../../../src/geometry3d/UVSurfaceOps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC;;;GAGG;AACH,MAAM,OAAO,YAAY;IACvB;;;OAGG;IACI,MAAM,CAAC,yBAAyB,CAAC,KAAgB,EAAE,cAAkC,EAAE,IAAY,EAAE,IAAY;QACtH,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACnC,IAAI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,CAAC,WAAW,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;YAC3C,OAAO,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;YACrC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YACjB,IAAI,MAAM;gBACR,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC1B,IAAI,YAAY;gBACd,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;SAC5B;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module CartesianGeometry\n */\nimport { LineString3d } from \"../curve/LineString3d\";\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\nimport { Geometry } from \"../Geometry\";\nimport { Angle } from \"./Angle\";\nimport { EllipsoidPatch } from \"./Ellipsoid\";\nimport { UVSurface } from \"./GeometryHandler\";\nimport { Plane3dByOriginAndVectors } from \"./Plane3dByOriginAndVectors\";\nimport { Point3d } from \"./Point3dVector3d\";\nimport { Range3d } from \"./Range\";\n/**\n * Support methods to act on surfaces with 0..1 uv fractional parameterization\n * @public\n */\nexport class UVSurfaceOps {\n /** Return the range of sampled points at specified offset from the surface.\n * * point counts in each direction may be set in the optional `options` structure.\n * * numU and numV are clamped at (2,500).\n */\n public static sampledRangeOfOffsetPatch(patch: UVSurface, offsetDistance: number | undefined, numU: number, numV: number): Range3d {\n const range = Range3d.createNull();\n numU = Math.ceil(Geometry.clamp(numU, 2, 500));\n numV = Math.ceil(Geometry.clamp(numV, 2, 500));\n const du = 1.0 / numU;\n const dv = 1.0 / numV;\n const xyz = Point3d.create();\n const plane = Plane3dByOriginAndVectors.createXYPlane();\n\n let u, v;\n for (let j = 0; j <= numV; j++) {\n v = j * dv;\n for (let i = 0; i <= numU; i++) {\n u = i * du;\n if (offsetDistance !== undefined) {\n patch.uvFractionToPointAndTangents(u, v, plane);\n const unitNormal = plane.unitNormal();\n if (unitNormal !== undefined) {\n plane.origin.addScaledInPlace(unitNormal, offsetDistance);\n range.extend(plane.origin);\n }\n } else {\n patch.uvFractionToPoint(u, v, xyz);\n range.extendXYZ(xyz.x, xyz.y, xyz.z);\n }\n }\n }\n return range;\n }\n\n /** Return the range of sampled points at specified offset from the surface.\n * * point counts in each direction may be set in the optional `options` structure, with angle ranges from the ellipsoid.\n * * Default evaluation is at 5 degree intervals.\n */\n public static sampledRangeOfOffsetEllipsoidPatch(patch: EllipsoidPatch, offsetDistance: number | undefined, options?: StrokeOptions): Range3d {\n const numU = StrokeOptions.applyAngleTol(options, 2, patch.latitudeSweep.sweepRadians, Angle.degreesToRadians(5.0));\n const numV = StrokeOptions.applyAngleTol(options, 2, patch.longitudeSweep.sweepRadians, Angle.degreesToRadians(5.0));\n return this.sampledRangeOfOffsetPatch(patch, offsetDistance, numU, numV);\n }\n\n private constructor() { } // private constructor -- no instances.\n /**\n * * evaluate `numEdge+1` points at surface uv parameters interpolated between (u0,v0) and (u1,v1)\n * * accumulate the xyz in a linestring.\n * * If xyzToUV is given, also accumulate transformed values as surfaceUV\n * * use xyzToUserUV transform to convert xyz to uv stored in the linestring (this uv is typically different from surface uv -- e.g. torus cap plane coordinates)\n * @param surface\n * @param u0 u coordinate at start of parameter space line\n * @param v0 v coordinate at end of parameter space line\n * @param u1 u coordinate at start of parameter space line\n * @param v1 v coordinate at end of parameter space line\n * @param numEdge number of edges. (`numEdge+1` points are evaluated)\n * @param saveUV if true, save each surface uv fractions with `linestring.addUVParamsAsUV (u,v)`\n * @param saveFraction if true, save each fractional coordinate (along the u,v line) with `linestring.addFraction (fraction)`\n *\n * @param xyzToUV\n */\n public static createLinestringOnUVLine(\n surface: UVSurface,\n u0: number,\n v0: number,\n u1: number,\n v1: number,\n numEdge: number,\n saveUV: boolean = false,\n saveFraction: boolean = false): LineString3d {\n\n const ls = LineString3d.create();\n const xyz = Point3d.create();\n let fraction, u, v;\n const numEvaluate = numEdge + 1;\n for (let i = 0; i < numEvaluate; i++) {\n fraction = i / numEdge;\n u = Geometry.interpolate(u0, fraction, u1);\n v = Geometry.interpolate(v0, fraction, v1);\n surface.uvFractionToPoint(u, v, xyz);\n ls.addPoint(xyz);\n if (saveUV)\n ls.addUVParamAsUV(u, v);\n if (saveFraction)\n ls.addFraction(fraction);\n }\n return ls;\n }\n}\n"]}
1
+ {"version":3,"file":"UVSurfaceOps.js","sourceRoot":"","sources":["../../../src/geometry3d/UVSurfaceOps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC;;;GAGG;AACH,MAAM,OAAO,YAAY;IACvB;;;OAGG;IACI,MAAM,CAAC,yBAAyB,CAAC,KAAgB,EAAE,cAAkC,EAAE,IAAY,EAAE,IAAY;QACtH,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACnC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QAC/C,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC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AE,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC1B,IAAI,YAAY;gBACd,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;SAC5B;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF","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/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\nimport { LineString3d } from \"../curve/LineString3d\";\r\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Angle } from \"./Angle\";\r\nimport { EllipsoidPatch } from \"./Ellipsoid\";\r\nimport { UVSurface } from \"./GeometryHandler\";\r\nimport { Plane3dByOriginAndVectors } from \"./Plane3dByOriginAndVectors\";\r\nimport { Point3d } from \"./Point3dVector3d\";\r\nimport { Range3d } from \"./Range\";\r\n/**\r\n * Support methods to act on surfaces with 0..1 uv fractional parameterization\r\n * @public\r\n */\r\nexport class UVSurfaceOps {\r\n /** Return the range of sampled points at specified offset from the surface.\r\n * * point counts in each direction may be set in the optional `options` structure.\r\n * * numU and numV are clamped at (2,500).\r\n */\r\n public static sampledRangeOfOffsetPatch(patch: UVSurface, offsetDistance: number | undefined, numU: number, numV: number): Range3d {\r\n const range = Range3d.createNull();\r\n numU = Math.ceil(Geometry.clamp(numU, 2, 500));\r\n numV = Math.ceil(Geometry.clamp(numV, 2, 500));\r\n const du = 1.0 / numU;\r\n const dv = 1.0 / numV;\r\n const xyz = Point3d.create();\r\n const plane = Plane3dByOriginAndVectors.createXYPlane();\r\n\r\n let u, v;\r\n for (let j = 0; j <= numV; j++) {\r\n v = j * dv;\r\n for (let i = 0; i <= numU; i++) {\r\n u = i * du;\r\n if (offsetDistance !== undefined) {\r\n patch.uvFractionToPointAndTangents(u, v, plane);\r\n const unitNormal = plane.unitNormal();\r\n if (unitNormal !== undefined) {\r\n plane.origin.addScaledInPlace(unitNormal, offsetDistance);\r\n range.extend(plane.origin);\r\n }\r\n } else {\r\n patch.uvFractionToPoint(u, v, xyz);\r\n range.extendXYZ(xyz.x, xyz.y, xyz.z);\r\n }\r\n }\r\n }\r\n return range;\r\n }\r\n\r\n /** Return the range of sampled points at specified offset from the surface.\r\n * * point counts in each direction may be set in the optional `options` structure, with angle ranges from the ellipsoid.\r\n * * Default evaluation is at 5 degree intervals.\r\n */\r\n public static sampledRangeOfOffsetEllipsoidPatch(patch: EllipsoidPatch, offsetDistance: number | undefined, options?: StrokeOptions): Range3d {\r\n const numU = StrokeOptions.applyAngleTol(options, 2, patch.latitudeSweep.sweepRadians, Angle.degreesToRadians(5.0));\r\n const numV = StrokeOptions.applyAngleTol(options, 2, patch.longitudeSweep.sweepRadians, Angle.degreesToRadians(5.0));\r\n return this.sampledRangeOfOffsetPatch(patch, offsetDistance, numU, numV);\r\n }\r\n\r\n private constructor() { } // private constructor -- no instances.\r\n /**\r\n * * evaluate `numEdge+1` points at surface uv parameters interpolated between (u0,v0) and (u1,v1)\r\n * * accumulate the xyz in a linestring.\r\n * * If xyzToUV is given, also accumulate transformed values as surfaceUV\r\n * * use xyzToUserUV transform to convert xyz to uv stored in the linestring (this uv is typically different from surface uv -- e.g. torus cap plane coordinates)\r\n * @param surface\r\n * @param u0 u coordinate at start of parameter space line\r\n * @param v0 v coordinate at end of parameter space line\r\n * @param u1 u coordinate at start of parameter space line\r\n * @param v1 v coordinate at end of parameter space line\r\n * @param numEdge number of edges. (`numEdge+1` points are evaluated)\r\n * @param saveUV if true, save each surface uv fractions with `linestring.addUVParamsAsUV (u,v)`\r\n * @param saveFraction if true, save each fractional coordinate (along the u,v line) with `linestring.addFraction (fraction)`\r\n *\r\n * @param xyzToUV\r\n */\r\n public static createLinestringOnUVLine(\r\n surface: UVSurface,\r\n u0: number,\r\n v0: number,\r\n u1: number,\r\n v1: number,\r\n numEdge: number,\r\n saveUV: boolean = false,\r\n saveFraction: boolean = false): LineString3d {\r\n\r\n const ls = LineString3d.create();\r\n const xyz = Point3d.create();\r\n let fraction, u, v;\r\n const numEvaluate = numEdge + 1;\r\n for (let i = 0; i < numEvaluate; i++) {\r\n fraction = i / numEdge;\r\n u = Geometry.interpolate(u0, fraction, u1);\r\n v = Geometry.interpolate(v0, fraction, v1);\r\n surface.uvFractionToPoint(u, v, xyz);\r\n ls.addPoint(xyz);\r\n if (saveUV)\r\n ls.addUVParamAsUV(u, v);\r\n if (saveFraction)\r\n ls.addFraction(fraction);\r\n }\r\n return ls;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"XYZProps.js","sourceRoot":"","sources":["../../../src/geometry3d/XYZProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA8DvC,cAAc;AACd,MAAM,KAAW,MAAM,CAatB;AAbD,WAAiB,MAAM;IACrB;;;;;;OAMG;IACH,SAAgB,WAAW,CAAC,CAAS,EAAE,CAAS,EAAE,GAAY;QAC5D,OAAO,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;eAC1C,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;eACxC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAChD,CAAC;IAJe,kBAAW,cAI1B,CAAA;AACH,CAAC,EAbgB,MAAM,KAAN,MAAM,QAatB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module CartesianGeometry\n */\n\nimport { Geometry } from \"../Geometry\";\n\n/**\n * Interface for class with `x` and `y` as number properties.\n * @public\n */\nexport interface WritableXAndY {\n /** x coordinate */\n x: number;\n /** y coordinate */\n y: number;\n}\n/**\n * Interface for class with `z` as number property.\n * @public\n */\nexport interface WriteableHasZ {\n /** z coordinate */\n z: number;\n}\n/**\n * Interface for class with `x`, `y`, `z` as number property.\n * @public\n */\nexport interface WritableXYAndZ extends WritableXAndY, WriteableHasZ {\n}\n/**\n * Interface for class with named properties `low` and `high`, both being `WriteableXAndY`\n * @public\n */\nexport interface WritableLowAndHighXY {\n /** Low x,y coordinates */\n low: WritableXAndY;\n /** High x,y,z coordinates */\n high: WritableXAndY;\n}\n/**\n * Interface for class with named properties `low` and `high`, both being `WriteableXYAndZ`\n * @public\n */\nexport interface WritableLowAndHighXYZ {\n /** Low x,y,z coordinates */\n low: WritableXYAndZ;\n /** High x,y,z coordinates */\n high: WritableXYAndZ;\n}\n/**\n * Interface for readable `z` number members.\n * @public\n */\nexport type HasZ = Readonly<WriteableHasZ>;\n/**\n * Interface for readable `x` and `y` number members.\n * @public\n */\nexport type XAndY = Readonly<WritableXAndY>;\n/**\n * Interface for type with readable `x`, `y`, `z` number members.\n * @public\n */\nexport type XYAndZ = Readonly<WritableXYAndZ>;\n\n/** @public */\nexport namespace XYAndZ { // eslint-disable-line @typescript-eslint/no-redeclare\n /**\n * Return true if two XYAndZs have equal x,y,z parts within a specified tolerance.\n * @param a The first XYAndZ to compare\n * @param b The second XYAndZ to compare\n * @param The tolerance for comparison. If undefined, [[Geometry.smallMetricDistance]] is used.\n * @returns true if the difference in each coordinate of `a` and `b` is smaller than `tol`.\n */\n export function almostEqual(a: XYAndZ, b: XYAndZ, tol?: number): boolean {\n return Geometry.isSameCoordinate(a.x, b.x, tol)\n && Geometry.isSameCoordinate(a.y, b.y, tol)\n && Geometry.isSameCoordinate(a.z, b.z, tol);\n }\n}\n\n/**\n * Interface for type with readable `low` and `high` members which have `x` and `y` number members.\n * @public\n */\nexport type LowAndHighXY = Readonly<WritableLowAndHighXY>;\n/**\n * Interface for type with readable `low` and `high` members which have `x`, `y`, and `z` number members.\n * @public\n */\nexport type LowAndHighXYZ = Readonly<WritableLowAndHighXYZ>;\n/**\n * Interface for variant json (one of)\n * * (individually optional) `x`, `y`, `z`\n * * number array\n * @public\n */\nexport type XYZProps = {\n x?: number;\n y?: number;\n z?: number;\n} | number[];\n/**\n * Interface for variant json (one of)\n * * (individually optional) `x`, `y`\n * * number array\n * @public\n */\nexport type XYProps = {\n x?: number;\n y?: number;\n} | number[];\n/**\n * Interface for variant json (one of)\n * * array of number arrays, with one matrix row in each array\n * * flat array of numbers, in row-mor order\n * * `Matrix3d` object\n * @public\n */\nexport type Matrix3dProps = number[][] | number[];\n/**\n * Interface for variant json (one of)\n * * array of number arrays, with each low level array containing 4 numbers of a transform row (qx, qy, qz, ax)\n * * flat array of 12 numbers, in row-major order for the 3 rows of 4 values\n * * `Transform` object\n * @public\n */\nexport type TransformProps = number[][] | number[] | {\n origin: XYZProps;\n matrix: Matrix3dProps;\n};\n/**\n * Interface for variant json representing a Range3d\n * * pair of `XYZProps` named `low` and `high`\n * * array of `XYZProps`\n * @public\n */\nexport type Range3dProps = {\n low: XYZProps;\n high: XYZProps;\n} | XYZProps[];\n/**\n * Interface for variant json representing a Range2d\n * * pair of `XYProps` named `low` and `high`\n * * array of `XYProps`\n * @public\n */\nexport type Range2dProps = {\n low: XYProps;\n high: XYProps;\n} | XYProps[];\n/**\n * Interface for variant json representing a Range1d\n * * pair of `number` named `low` and `high`\n * * array of `number`\n * @public\n */\nexport type Range1dProps = {\n low: number;\n high: number;\n} | number[];\n"]}
1
+ {"version":3,"file":"XYZProps.js","sourceRoot":"","sources":["../../../src/geometry3d/XYZProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA8DvC,cAAc;AACd,MAAM,KAAW,MAAM,CAatB;AAbD,WAAiB,MAAM;IACrB;;;;;;OAMG;IACH,SAAgB,WAAW,CAAC,CAAS,EAAE,CAAS,EAAE,GAAY;QAC5D,OAAO,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;eAC1C,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;eACxC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAChD,CAAC;IAJe,kBAAW,cAI1B,CAAA;AACH,CAAC,EAbgB,MAAM,KAAN,MAAM,QAatB","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 CartesianGeometry\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\n\r\n/**\r\n * Interface for class with `x` and `y` as number properties.\r\n * @public\r\n */\r\nexport interface WritableXAndY {\r\n /** x coordinate */\r\n x: number;\r\n /** y coordinate */\r\n y: number;\r\n}\r\n/**\r\n * Interface for class with `z` as number property.\r\n * @public\r\n */\r\nexport interface WriteableHasZ {\r\n /** z coordinate */\r\n z: number;\r\n}\r\n/**\r\n * Interface for class with `x`, `y`, `z` as number property.\r\n * @public\r\n */\r\nexport interface WritableXYAndZ extends WritableXAndY, WriteableHasZ {\r\n}\r\n/**\r\n * Interface for class with named properties `low` and `high`, both being `WriteableXAndY`\r\n * @public\r\n */\r\nexport interface WritableLowAndHighXY {\r\n /** Low x,y coordinates */\r\n low: WritableXAndY;\r\n /** High x,y,z coordinates */\r\n high: WritableXAndY;\r\n}\r\n/**\r\n * Interface for class with named properties `low` and `high`, both being `WriteableXYAndZ`\r\n * @public\r\n */\r\nexport interface WritableLowAndHighXYZ {\r\n /** Low x,y,z coordinates */\r\n low: WritableXYAndZ;\r\n /** High x,y,z coordinates */\r\n high: WritableXYAndZ;\r\n}\r\n/**\r\n * Interface for readable `z` number members.\r\n * @public\r\n */\r\nexport type HasZ = Readonly<WriteableHasZ>;\r\n/**\r\n * Interface for readable `x` and `y` number members.\r\n * @public\r\n */\r\nexport type XAndY = Readonly<WritableXAndY>;\r\n/**\r\n * Interface for type with readable `x`, `y`, `z` number members.\r\n * @public\r\n */\r\nexport type XYAndZ = Readonly<WritableXYAndZ>;\r\n\r\n/** @public */\r\nexport namespace XYAndZ { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /**\r\n * Return true if two XYAndZs have equal x,y,z parts within a specified tolerance.\r\n * @param a The first XYAndZ to compare\r\n * @param b The second XYAndZ to compare\r\n * @param The tolerance for comparison. If undefined, [[Geometry.smallMetricDistance]] is used.\r\n * @returns true if the difference in each coordinate of `a` and `b` is smaller than `tol`.\r\n */\r\n export function almostEqual(a: XYAndZ, b: XYAndZ, tol?: number): boolean {\r\n return Geometry.isSameCoordinate(a.x, b.x, tol)\r\n && Geometry.isSameCoordinate(a.y, b.y, tol)\r\n && Geometry.isSameCoordinate(a.z, b.z, tol);\r\n }\r\n}\r\n\r\n/**\r\n * Interface for type with readable `low` and `high` members which have `x` and `y` number members.\r\n * @public\r\n */\r\nexport type LowAndHighXY = Readonly<WritableLowAndHighXY>;\r\n/**\r\n * Interface for type with readable `low` and `high` members which have `x`, `y`, and `z` number members.\r\n * @public\r\n */\r\nexport type LowAndHighXYZ = Readonly<WritableLowAndHighXYZ>;\r\n/**\r\n * Interface for variant json (one of)\r\n * * (individually optional) `x`, `y`, `z`\r\n * * number array\r\n * @public\r\n */\r\nexport type XYZProps = {\r\n x?: number;\r\n y?: number;\r\n z?: number;\r\n} | number[];\r\n/**\r\n * Interface for variant json (one of)\r\n * * (individually optional) `x`, `y`\r\n * * number array\r\n * @public\r\n */\r\nexport type XYProps = {\r\n x?: number;\r\n y?: number;\r\n} | number[];\r\n/**\r\n * Interface for variant json (one of)\r\n * * array of number arrays, with one matrix row in each array\r\n * * flat array of numbers, in row-mor order\r\n * * `Matrix3d` object\r\n * @public\r\n */\r\nexport type Matrix3dProps = number[][] | number[];\r\n/**\r\n * Interface for variant json (one of)\r\n * * array of number arrays, with each low level array containing 4 numbers of a transform row (qx, qy, qz, ax)\r\n * * flat array of 12 numbers, in row-major order for the 3 rows of 4 values\r\n * * `Transform` object\r\n * @public\r\n */\r\nexport type TransformProps = number[][] | number[] | {\r\n origin: XYZProps;\r\n matrix: Matrix3dProps;\r\n};\r\n/**\r\n * Interface for variant json representing a Range3d\r\n * * pair of `XYZProps` named `low` and `high`\r\n * * array of `XYZProps`\r\n * @public\r\n */\r\nexport type Range3dProps = {\r\n low: XYZProps;\r\n high: XYZProps;\r\n} | XYZProps[];\r\n/**\r\n * Interface for variant json representing a Range2d\r\n * * pair of `XYProps` named `low` and `high`\r\n * * array of `XYProps`\r\n * @public\r\n */\r\nexport type Range2dProps = {\r\n low: XYProps;\r\n high: XYProps;\r\n} | XYProps[];\r\n/**\r\n * Interface for variant json representing a Range1d\r\n * * pair of `number` named `low` and `high`\r\n * * array of `number`\r\n * @public\r\n */\r\nexport type Range1dProps = {\r\n low: number;\r\n high: number;\r\n} | number[];\r\n"]}
@@ -7,7 +7,7 @@ import { Matrix3d } from "./Matrix3d";
7
7
  import { Point3d } from "./Point3dVector3d";
8
8
  import { Transform } from "./Transform";
9
9
  /**
10
- * angle properties of a `YawPitchRoll` orientation
10
+ * Angle properties of a `YawPitchRoll` orientation
11
11
  * @public
12
12
  */
13
13
  export interface YawPitchRollProps {
@@ -48,36 +48,36 @@ export declare class YawPitchRollAngles {
48
48
  /** The roll angle: counterclockwise rotation angle around x */
49
49
  roll: Angle;
50
50
  /**
51
- * constructor
51
+ * Constructor
52
52
  * @param yaw counterclockwise rotation angle around z
53
53
  * @param pitch **clockwise** rotation angle around y
54
54
  * @param roll counterclockwise rotation angle around x
55
- * */
55
+ */
56
56
  constructor(yaw?: Angle, pitch?: Angle, roll?: Angle);
57
57
  /** Freeze this YawPitchRollAngles */
58
58
  freeze(): Readonly<this>;
59
59
  /**
60
- * constructor for YawPitchRollAngles with angles in degrees.
60
+ * Constructor for YawPitchRollAngles with angles in degrees.
61
61
  * @param yawDegrees counterclockwise rotation angle (in degrees) around z
62
62
  * @param pitchDegrees **clockwise** rotation angle (in degrees) around y
63
63
  * @param rollDegrees counterclockwise rotation angle (in degrees) around x
64
- * */
64
+ */
65
65
  static createDegrees(yawDegrees: number, pitchDegrees: number, rollDegrees: number): YawPitchRollAngles;
66
66
  /**
67
- * constructor for YawPitchRollAngles with angles in radians.
67
+ * Constructor for YawPitchRollAngles with angles in radians.
68
68
  * @param yawRadians counterclockwise rotation angle (in radians) around z
69
69
  * @param pitchRadians **clockwise** rotation angle (in radians) around y
70
70
  * @param rollRadians counterclockwise rotation angle (in radians) around x
71
- * */
71
+ */
72
72
  static createRadians(yawRadians: number, pitchRadians: number, rollRadians: number): YawPitchRollAngles;
73
- /** construct a `YawPitchRoll` object from an object with 3 named angles */
73
+ /** Construct a `YawPitchRoll` object from an object with 3 named angles */
74
74
  static fromJSON(json?: YawPitchRollProps): YawPitchRollAngles;
75
- /** populate yaw, pitch and roll fields using `Angle.fromJSON` */
75
+ /** Populate yaw, pitch and roll fields using `Angle.fromJSON` */
76
76
  setFromJSON(json?: YawPitchRollProps): void;
77
77
  /**
78
78
  * Convert to a JSON object of form { pitch: 20 , roll: 30 , yaw: 10 }. Angles are in degrees.
79
79
  * Any values that are exactly zero (with tolerance `Geometry.smallAngleRadians`) are omitted.
80
- **/
80
+ */
81
81
  toJSON(): YawPitchRollProps;
82
82
  /**
83
83
  * Install all rotations from `other` into `this`.
@@ -90,19 +90,17 @@ export declare class YawPitchRollAngles {
90
90
  * @param other YawPitchRollAngles source
91
91
  */
92
92
  isAlmostEqual(other: YawPitchRollAngles): boolean;
93
- /**
94
- * Make a copy of this YawPitchRollAngles.
95
- */
93
+ /** Make a copy of this YawPitchRollAngles */
96
94
  clone(): YawPitchRollAngles;
97
95
  /**
98
96
  * Expand the angles into a (rigid rotation) matrix.
99
- *
100
97
  * * The returned matrix is "rigid" (i.e., it has unit length rows and columns, and its transpose is its inverse).
101
98
  * * The rigid matrix is always a right handed coordinate system.
102
99
  * @param result optional pre-allocated `Matrix3d`
103
100
  */
104
101
  toMatrix3d(result?: Matrix3d): Matrix3d;
105
- /** Returns true if this rotation does nothing.
102
+ /**
103
+ * Returns true if this rotation does nothing.
106
104
  * * If allowPeriodShift is false, any nonzero angle is considered a non-identity
107
105
  * * If allowPeriodShift is true, all angles are individually allowed to be any multiple of 360 degrees.
108
106
  */
@@ -124,7 +122,8 @@ export declare class YawPitchRollAngles {
124
122
  origin: Point3d;
125
123
  angles: YawPitchRollAngles | undefined;
126
124
  };
127
- /** Attempts to create a YawPitchRollAngles object from a Matrix3d
125
+ /**
126
+ * Attempts to create a YawPitchRollAngles object from a Matrix3d
128
127
  * * This conversion fails if the matrix is not rigid (unit rows and columns, and transpose is inverse)
129
128
  * * In the failure case the method's return value is `undefined`.
130
129
  * * In the failure case, if the optional result was supplied, that result will nonetheless be filled with
@@ -1 +1 @@
1
- {"version":3,"file":"YawPitchRollAngles.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/YawPitchRollAngles.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAY,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,gBAAgB;IAChB,GAAG,CAAC,EAAE,UAA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EAAE,kBAAkB,GAAG,SAAS,CAAC;KACxC;IAMD;;;;;;OAMG;WACW,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,SAAS;CA0EhH"}
@@ -33,11 +33,11 @@ import { Point3d } from "./Point3dVector3d";
33
33
  */
34
34
  export class YawPitchRollAngles {
35
35
  /**
36
- * constructor
36
+ * Constructor
37
37
  * @param yaw counterclockwise rotation angle around z
38
38
  * @param pitch **clockwise** rotation angle around y
39
39
  * @param roll counterclockwise rotation angle around x
40
- * */
40
+ */
41
41
  constructor(yaw = Angle.zero(), pitch = Angle.zero(), roll = Angle.zero()) {
42
42
  this.yaw = yaw;
43
43
  this.pitch = pitch;
@@ -51,29 +51,29 @@ export class YawPitchRollAngles {
51
51
  return Object.freeze(this);
52
52
  }
53
53
  /**
54
- * constructor for YawPitchRollAngles with angles in degrees.
54
+ * Constructor for YawPitchRollAngles with angles in degrees.
55
55
  * @param yawDegrees counterclockwise rotation angle (in degrees) around z
56
56
  * @param pitchDegrees **clockwise** rotation angle (in degrees) around y
57
57
  * @param rollDegrees counterclockwise rotation angle (in degrees) around x
58
- * */
58
+ */
59
59
  static createDegrees(yawDegrees, pitchDegrees, rollDegrees) {
60
60
  return new YawPitchRollAngles(Angle.createDegrees(yawDegrees), Angle.createDegrees(pitchDegrees), Angle.createDegrees(rollDegrees));
61
61
  }
62
62
  /**
63
- * constructor for YawPitchRollAngles with angles in radians.
63
+ * Constructor for YawPitchRollAngles with angles in radians.
64
64
  * @param yawRadians counterclockwise rotation angle (in radians) around z
65
65
  * @param pitchRadians **clockwise** rotation angle (in radians) around y
66
66
  * @param rollRadians counterclockwise rotation angle (in radians) around x
67
- * */
67
+ */
68
68
  static createRadians(yawRadians, pitchRadians, rollRadians) {
69
69
  return new YawPitchRollAngles(Angle.createRadians(yawRadians), Angle.createRadians(pitchRadians), Angle.createRadians(rollRadians));
70
70
  }
71
- /** construct a `YawPitchRoll` object from an object with 3 named angles */
71
+ /** Construct a `YawPitchRoll` object from an object with 3 named angles */
72
72
  static fromJSON(json) {
73
73
  json = json ? json : {};
74
74
  return new YawPitchRollAngles(Angle.fromJSON(json.yaw), Angle.fromJSON(json.pitch), Angle.fromJSON(json.roll));
75
75
  }
76
- /** populate yaw, pitch and roll fields using `Angle.fromJSON` */
76
+ /** Populate yaw, pitch and roll fields using `Angle.fromJSON` */
77
77
  setFromJSON(json) {
78
78
  json = json ? json : {};
79
79
  this.yaw = Angle.fromJSON(json.yaw);
@@ -83,7 +83,7 @@ export class YawPitchRollAngles {
83
83
  /**
84
84
  * Convert to a JSON object of form { pitch: 20 , roll: 30 , yaw: 10 }. Angles are in degrees.
85
85
  * Any values that are exactly zero (with tolerance `Geometry.smallAngleRadians`) are omitted.
86
- **/
86
+ */
87
87
  toJSON() {
88
88
  const val = {};
89
89
  if (!this.pitch.isAlmostZero)
@@ -113,15 +113,12 @@ export class YawPitchRollAngles {
113
113
  && this.pitch.isAlmostEqualAllowPeriodShift(other.pitch)
114
114
  && this.roll.isAlmostEqualAllowPeriodShift(other.roll);
115
115
  }
116
- /**
117
- * Make a copy of this YawPitchRollAngles.
118
- */
116
+ /** Make a copy of this YawPitchRollAngles */
119
117
  clone() {
120
118
  return new YawPitchRollAngles(this.yaw.clone(), this.pitch.clone(), this.roll.clone());
121
119
  }
122
120
  /**
123
121
  * Expand the angles into a (rigid rotation) matrix.
124
- *
125
122
  * * The returned matrix is "rigid" (i.e., it has unit length rows and columns, and its transpose is its inverse).
126
123
  * * The rigid matrix is always a right handed coordinate system.
127
124
  * @param result optional pre-allocated `Matrix3d`
@@ -158,7 +155,8 @@ export class YawPitchRollAngles {
158
155
  */
159
156
  return Matrix3d.createRowValues(cz * cy, -(sz * cx + cz * sy * sx), (sz * sx - cz * sy * cx), sz * cy, (cz * cx - sz * sy * sx), -(cz * sx + sz * sy * cx), sy, cy * sx, cy * cx, result);
160
157
  }
161
- /** Returns true if this rotation does nothing.
158
+ /**
159
+ * Returns true if this rotation does nothing.
162
160
  * * If allowPeriodShift is false, any nonzero angle is considered a non-identity
163
161
  * * If allowPeriodShift is true, all angles are individually allowed to be any multiple of 360 degrees.
164
162
  */
@@ -203,7 +201,8 @@ export class YawPitchRollAngles {
203
201
  angles: YawPitchRollAngles.createFromMatrix3d(transform.matrix),
204
202
  };
205
203
  }
206
- /** Attempts to create a YawPitchRollAngles object from a Matrix3d
204
+ /**
205
+ * Attempts to create a YawPitchRollAngles object from a Matrix3d
207
206
  * * This conversion fails if the matrix is not rigid (unit rows and columns, and transpose is inverse)
208
207
  * * In the failure case the method's return value is `undefined`.
209
208
  * * In the failure case, if the optional result was supplied, that result will nonetheless be filled with