@itwin/core-geometry 4.4.0-dev.8 → 4.5.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/lib/cjs/Geometry.d.ts +17 -0
  3. package/lib/cjs/Geometry.d.ts.map +1 -1
  4. package/lib/cjs/Geometry.js +14 -0
  5. package/lib/cjs/Geometry.js.map +1 -1
  6. package/lib/cjs/core-geometry.d.ts +3 -2
  7. package/lib/cjs/core-geometry.d.ts.map +1 -1
  8. package/lib/cjs/core-geometry.js +3 -2
  9. package/lib/cjs/core-geometry.js.map +1 -1
  10. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +2 -2
  11. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +3 -3
  12. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  13. package/lib/cjs/curve/CurveExtendMode.d.ts +7 -6
  14. package/lib/cjs/curve/CurveExtendMode.d.ts.map +1 -1
  15. package/lib/cjs/curve/CurveExtendMode.js +7 -6
  16. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  17. package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
  18. package/lib/cjs/curve/CurveLocationDetail.js +23 -18
  19. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  20. package/lib/cjs/curve/LineSegment3d.d.ts +14 -4
  21. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  22. package/lib/cjs/curve/LineSegment3d.js +107 -2
  23. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  24. package/lib/cjs/curve/LineString3d.d.ts +41 -8
  25. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  26. package/lib/cjs/curve/LineString3d.js +53 -15
  27. package/lib/cjs/curve/LineString3d.js.map +1 -1
  28. package/lib/cjs/curve/Loop.js +1 -1
  29. package/lib/cjs/curve/Loop.js.map +1 -1
  30. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts +2 -2
  31. package/lib/cjs/curve/Query/PlanarSubdivision.js +2 -2
  32. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  33. package/lib/cjs/curve/RegionOps.d.ts +1 -2
  34. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  35. package/lib/cjs/curve/RegionOps.js.map +1 -1
  36. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +5 -8
  37. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  38. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +12 -12
  39. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  40. package/lib/cjs/geometry3d/GrowableXYArray.d.ts +2 -2
  41. package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
  42. package/lib/cjs/geometry3d/GrowableXYArray.js +1 -1
  43. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  44. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +2 -3
  45. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  46. package/lib/cjs/geometry3d/GrowableXYZArray.js +1 -1
  47. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  48. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +18 -1
  49. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  50. package/lib/cjs/geometry3d/IndexedXYZCollection.js +13 -0
  51. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  52. package/lib/cjs/geometry3d/PointHelpers.d.ts +1 -2
  53. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  54. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  55. package/lib/cjs/geometry3d/PointStreaming.d.ts +1 -1
  56. package/lib/cjs/geometry3d/PointStreaming.d.ts.map +1 -1
  57. package/lib/cjs/geometry3d/PointStreaming.js +3 -1
  58. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  59. package/lib/cjs/geometry3d/PolygonOps.d.ts +68 -1
  60. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  61. package/lib/cjs/geometry3d/PolygonOps.js +152 -4
  62. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  63. package/lib/cjs/geometry3d/PolylineOps.d.ts +23 -1
  64. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  65. package/lib/cjs/geometry3d/PolylineOps.js +73 -1
  66. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  67. package/lib/cjs/geometry3d/Range.d.ts +1 -1
  68. package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
  69. package/lib/cjs/geometry3d/Range.js.map +1 -1
  70. package/lib/cjs/geometry3d/Transform.js +1 -1
  71. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  72. package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts +7 -5
  73. package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
  74. package/lib/cjs/geometry3d/YawPitchRollAngles.js +8 -6
  75. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  76. package/lib/cjs/numerics/Polynomials.d.ts +13 -1
  77. package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
  78. package/lib/cjs/numerics/Polynomials.js +13 -1
  79. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  80. package/lib/cjs/polyface/FacetLocationDetail.d.ts +28 -5
  81. package/lib/cjs/polyface/FacetLocationDetail.d.ts.map +1 -1
  82. package/lib/cjs/polyface/FacetLocationDetail.js +50 -15
  83. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  84. package/lib/cjs/polyface/Polyface.d.ts +1 -1
  85. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  86. package/lib/cjs/polyface/Polyface.js.map +1 -1
  87. package/lib/cjs/polyface/PolyfaceQuery.d.ts +7 -3
  88. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  89. package/lib/cjs/polyface/PolyfaceQuery.js +23 -0
  90. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  91. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.d.ts +52 -0
  92. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.d.ts.map +1 -0
  93. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js +78 -0
  94. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -0
  95. package/lib/cjs/polyface/RangeTree/MinimumValueTester.d.ts +60 -0
  96. package/lib/cjs/polyface/RangeTree/MinimumValueTester.d.ts.map +1 -0
  97. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js +96 -0
  98. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -0
  99. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts +57 -0
  100. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts.map +1 -0
  101. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js +73 -0
  102. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -0
  103. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts +57 -0
  104. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts.map +1 -0
  105. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js +84 -0
  106. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -0
  107. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +274 -0
  108. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -0
  109. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +505 -0
  110. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -0
  111. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.d.ts +204 -0
  112. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.d.ts.map +1 -0
  113. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js +383 -0
  114. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -0
  115. package/lib/cjs/serialization/GeometrySamples.d.ts +36 -3
  116. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  117. package/lib/cjs/serialization/GeometrySamples.js +93 -4
  118. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  119. package/lib/cjs/solid/LinearSweep.d.ts +1 -1
  120. package/lib/cjs/solid/LinearSweep.js +1 -1
  121. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  122. package/lib/cjs/solid/SweepContour.d.ts +2 -2
  123. package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
  124. package/lib/cjs/solid/SweepContour.js.map +1 -1
  125. package/lib/cjs/topology/Graph.d.ts +5 -6
  126. package/lib/cjs/topology/Graph.d.ts.map +1 -1
  127. package/lib/cjs/topology/Graph.js +7 -6
  128. package/lib/cjs/topology/Graph.js.map +1 -1
  129. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +4 -4
  130. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js +5 -5
  131. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  132. package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts +108 -71
  133. package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  134. package/lib/cjs/topology/HalfEdgeGraphSearch.js +223 -109
  135. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  136. package/lib/cjs/topology/Merging.d.ts +1 -1
  137. package/lib/cjs/topology/Merging.d.ts.map +1 -1
  138. package/lib/cjs/topology/Merging.js.map +1 -1
  139. package/lib/cjs/topology/SignedDataSummary.d.ts +13 -13
  140. package/lib/cjs/topology/SignedDataSummary.d.ts.map +1 -1
  141. package/lib/cjs/topology/SignedDataSummary.js +3 -3
  142. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  143. package/lib/cjs/topology/Triangulation.d.ts +1 -12
  144. package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
  145. package/lib/cjs/topology/Triangulation.js.map +1 -1
  146. package/lib/cjs/topology/XYParitySearchContext.d.ts +27 -21
  147. package/lib/cjs/topology/XYParitySearchContext.d.ts.map +1 -1
  148. package/lib/cjs/topology/XYParitySearchContext.js +73 -71
  149. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  150. package/lib/esm/Geometry.d.ts +17 -0
  151. package/lib/esm/Geometry.d.ts.map +1 -1
  152. package/lib/esm/Geometry.js +14 -0
  153. package/lib/esm/Geometry.js.map +1 -1
  154. package/lib/esm/core-geometry.d.ts +3 -2
  155. package/lib/esm/core-geometry.d.ts.map +1 -1
  156. package/lib/esm/core-geometry.js +3 -2
  157. package/lib/esm/core-geometry.js.map +1 -1
  158. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +2 -2
  159. package/lib/esm/curve/CurveChainWithDistanceIndex.js +3 -3
  160. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  161. package/lib/esm/curve/CurveExtendMode.d.ts +7 -6
  162. package/lib/esm/curve/CurveExtendMode.d.ts.map +1 -1
  163. package/lib/esm/curve/CurveExtendMode.js +7 -6
  164. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  165. package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
  166. package/lib/esm/curve/CurveLocationDetail.js +23 -18
  167. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  168. package/lib/esm/curve/LineSegment3d.d.ts +14 -4
  169. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  170. package/lib/esm/curve/LineSegment3d.js +108 -3
  171. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  172. package/lib/esm/curve/LineString3d.d.ts +41 -8
  173. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  174. package/lib/esm/curve/LineString3d.js +53 -15
  175. package/lib/esm/curve/LineString3d.js.map +1 -1
  176. package/lib/esm/curve/Loop.js +1 -1
  177. package/lib/esm/curve/Loop.js.map +1 -1
  178. package/lib/esm/curve/Query/PlanarSubdivision.d.ts +2 -2
  179. package/lib/esm/curve/Query/PlanarSubdivision.js +2 -2
  180. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  181. package/lib/esm/curve/RegionOps.d.ts +1 -2
  182. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  183. package/lib/esm/curve/RegionOps.js +1 -1
  184. package/lib/esm/curve/RegionOps.js.map +1 -1
  185. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +5 -8
  186. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  187. package/lib/esm/curve/RegionOpsClassificationSweeps.js +12 -12
  188. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  189. package/lib/esm/geometry3d/GrowableXYArray.d.ts +2 -2
  190. package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
  191. package/lib/esm/geometry3d/GrowableXYArray.js +1 -1
  192. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  193. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +2 -3
  194. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  195. package/lib/esm/geometry3d/GrowableXYZArray.js +1 -1
  196. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  197. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +18 -1
  198. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  199. package/lib/esm/geometry3d/IndexedXYZCollection.js +13 -0
  200. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  201. package/lib/esm/geometry3d/PointHelpers.d.ts +1 -2
  202. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  203. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  204. package/lib/esm/geometry3d/PointStreaming.d.ts +1 -1
  205. package/lib/esm/geometry3d/PointStreaming.d.ts.map +1 -1
  206. package/lib/esm/geometry3d/PointStreaming.js +3 -1
  207. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  208. package/lib/esm/geometry3d/PolygonOps.d.ts +68 -1
  209. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  210. package/lib/esm/geometry3d/PolygonOps.js +150 -3
  211. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  212. package/lib/esm/geometry3d/PolylineOps.d.ts +23 -1
  213. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  214. package/lib/esm/geometry3d/PolylineOps.js +73 -1
  215. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  216. package/lib/esm/geometry3d/Range.d.ts +1 -1
  217. package/lib/esm/geometry3d/Range.d.ts.map +1 -1
  218. package/lib/esm/geometry3d/Range.js.map +1 -1
  219. package/lib/esm/geometry3d/Transform.js +1 -1
  220. package/lib/esm/geometry3d/Transform.js.map +1 -1
  221. package/lib/esm/geometry3d/YawPitchRollAngles.d.ts +7 -5
  222. package/lib/esm/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
  223. package/lib/esm/geometry3d/YawPitchRollAngles.js +8 -6
  224. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  225. package/lib/esm/numerics/Polynomials.d.ts +13 -1
  226. package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
  227. package/lib/esm/numerics/Polynomials.js +13 -1
  228. package/lib/esm/numerics/Polynomials.js.map +1 -1
  229. package/lib/esm/polyface/FacetLocationDetail.d.ts +28 -5
  230. package/lib/esm/polyface/FacetLocationDetail.d.ts.map +1 -1
  231. package/lib/esm/polyface/FacetLocationDetail.js +48 -14
  232. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  233. package/lib/esm/polyface/Polyface.d.ts +1 -1
  234. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  235. package/lib/esm/polyface/Polyface.js.map +1 -1
  236. package/lib/esm/polyface/PolyfaceQuery.d.ts +7 -3
  237. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  238. package/lib/esm/polyface/PolyfaceQuery.js +23 -0
  239. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  240. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.d.ts +52 -0
  241. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.d.ts.map +1 -0
  242. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js +74 -0
  243. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -0
  244. package/lib/esm/polyface/RangeTree/MinimumValueTester.d.ts +60 -0
  245. package/lib/esm/polyface/RangeTree/MinimumValueTester.d.ts.map +1 -0
  246. package/lib/esm/polyface/RangeTree/MinimumValueTester.js +92 -0
  247. package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -0
  248. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts +57 -0
  249. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts.map +1 -0
  250. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js +69 -0
  251. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -0
  252. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts +57 -0
  253. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts.map +1 -0
  254. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js +80 -0
  255. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -0
  256. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +274 -0
  257. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -0
  258. package/lib/esm/polyface/RangeTree/RangeTreeNode.js +497 -0
  259. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -0
  260. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.d.ts +204 -0
  261. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.d.ts.map +1 -0
  262. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js +374 -0
  263. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -0
  264. package/lib/esm/serialization/GeometrySamples.d.ts +36 -3
  265. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  266. package/lib/esm/serialization/GeometrySamples.js +93 -4
  267. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  268. package/lib/esm/solid/LinearSweep.d.ts +1 -1
  269. package/lib/esm/solid/LinearSweep.js +1 -1
  270. package/lib/esm/solid/LinearSweep.js.map +1 -1
  271. package/lib/esm/solid/SweepContour.d.ts +2 -2
  272. package/lib/esm/solid/SweepContour.d.ts.map +1 -1
  273. package/lib/esm/solid/SweepContour.js.map +1 -1
  274. package/lib/esm/topology/Graph.d.ts +5 -6
  275. package/lib/esm/topology/Graph.d.ts.map +1 -1
  276. package/lib/esm/topology/Graph.js +7 -6
  277. package/lib/esm/topology/Graph.js.map +1 -1
  278. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +4 -4
  279. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js +5 -5
  280. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  281. package/lib/esm/topology/HalfEdgeGraphSearch.d.ts +108 -71
  282. package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  283. package/lib/esm/topology/HalfEdgeGraphSearch.js +223 -109
  284. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  285. package/lib/esm/topology/Merging.d.ts +1 -1
  286. package/lib/esm/topology/Merging.d.ts.map +1 -1
  287. package/lib/esm/topology/Merging.js.map +1 -1
  288. package/lib/esm/topology/SignedDataSummary.d.ts +13 -13
  289. package/lib/esm/topology/SignedDataSummary.d.ts.map +1 -1
  290. package/lib/esm/topology/SignedDataSummary.js +3 -3
  291. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  292. package/lib/esm/topology/Triangulation.d.ts +1 -12
  293. package/lib/esm/topology/Triangulation.d.ts.map +1 -1
  294. package/lib/esm/topology/Triangulation.js.map +1 -1
  295. package/lib/esm/topology/XYParitySearchContext.d.ts +27 -21
  296. package/lib/esm/topology/XYParitySearchContext.d.ts.map +1 -1
  297. package/lib/esm/topology/XYParitySearchContext.js +73 -71
  298. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  299. package/package.json +3 -3
@@ -78,6 +78,20 @@ export interface FacetLocationDetail {
78
78
  /** Get reference to cached barycentric coordinates of the point. Inputs may be used to compute the cache. */
79
79
  getBarycentricCoordinates(facetVertices?: IndexedXYZCollection, distanceTolerance?: number): number[] | undefined;
80
80
  }
81
+ /**
82
+ * A pair of FacetLocationDetail.
83
+ * @public
84
+ */
85
+ export declare class FacetLocationDetailPair {
86
+ /** The first of the two details. */
87
+ detailA: FacetLocationDetail;
88
+ /** The second of the two details. */
89
+ detailB: FacetLocationDetail;
90
+ /** Constructor, captures inputs */
91
+ private constructor();
92
+ /** Create a facet detail pair, capturing inputs. */
93
+ static create(detailA: FacetLocationDetail, detailB: FacetLocationDetail): FacetLocationDetailPair;
94
+ }
81
95
  /**
82
96
  * Implementation of `FacetLocationDetail` for a triangular facet.
83
97
  * @public
@@ -93,9 +107,12 @@ export declare class TriangularFacetLocationDetail implements FacetLocationDetai
93
107
  /** Invalidate this detail. */
94
108
  invalidate(deep?: boolean): void;
95
109
  /** Create a detail.
110
+ * @param detail optional, copied if given
96
111
  * @param result optional pre-allocated object to fill and return
97
112
  */
98
- static create(facetIndex: number, detail?: TriangleLocationDetail, result?: TriangularFacetLocationDetail): TriangularFacetLocationDetail;
113
+ static create(facetIndex?: number, detail?: TriangleLocationDetail, result?: TriangularFacetLocationDetail): TriangularFacetLocationDetail;
114
+ /** Create a detail, capturing inputs. */
115
+ static createCapture(facetIndex: number, detail: TriangleLocationDetail): TriangularFacetLocationDetail;
99
116
  /** Get the facet index. */
100
117
  get facetIndex(): number;
101
118
  /** Get the edge count of this facet. */
@@ -147,7 +164,7 @@ export declare class TriangularFacetLocationDetail implements FacetLocationDetai
147
164
  getBarycentricCoordinates(): number[];
148
165
  }
149
166
  /**
150
- * Implementation of `FacetLocationDetail` for a non-convex facet.
167
+ * Implementation of `FacetLocationDetail` for a general facet, which may or may not be convex.
151
168
  * * Facet vertex data interpolation is not available.
152
169
  * @public
153
170
  */
@@ -160,9 +177,12 @@ export declare class NonConvexFacetLocationDetail implements FacetLocationDetail
160
177
  /** Invalidate this detail. */
161
178
  invalidate(deep?: boolean): void;
162
179
  /** Create a detail.
180
+ * @param detail optional, copied if given
163
181
  * @param result optional pre-allocated object to fill and return
164
182
  */
165
- static create(facetIndex: number, edgeCount: number, detail?: PolygonLocationDetail, result?: NonConvexFacetLocationDetail): NonConvexFacetLocationDetail;
183
+ static create(facetIndex?: number, edgeCount?: number, detail?: PolygonLocationDetail, result?: NonConvexFacetLocationDetail): NonConvexFacetLocationDetail;
184
+ /** Create a detail, capturing inputs. */
185
+ static createCapture(facetIndex: number, edgeCount: number, detail: PolygonLocationDetail): NonConvexFacetLocationDetail;
166
186
  /** Get the facet index. */
167
187
  get facetIndex(): number;
168
188
  /** Get the edge count of this facet. */
@@ -180,7 +200,7 @@ export declare class NonConvexFacetLocationDetail implements FacetLocationDetail
180
200
  private get _isValid();
181
201
  /** Whether this instance specifies a valid location. */
182
202
  get isValid(): boolean;
183
- /** Whether the facet is convex. */
203
+ /** Whether the facet is convex. Always returns false, as convexity is unknown to this detail. */
184
204
  get isConvex(): boolean;
185
205
  /** Whether the point is inside or on the polygon. */
186
206
  get isInsideOrOn(): boolean;
@@ -224,9 +244,12 @@ export declare class ConvexFacetLocationDetail extends NonConvexFacetLocationDet
224
244
  /** Invalidate this detail. */
225
245
  invalidate(deep?: boolean): void;
226
246
  /** Create a detail.
247
+ * @param detail optional, copied if given
227
248
  * @param result optional pre-allocated object to fill and return
228
249
  */
229
- static create(facetIndex: number, edgeCount: number, detail?: PolygonLocationDetail, result?: ConvexFacetLocationDetail): ConvexFacetLocationDetail;
250
+ static create(facetIndex?: number, edgeCount?: number, detail?: PolygonLocationDetail, result?: ConvexFacetLocationDetail): ConvexFacetLocationDetail;
251
+ /** Create a detail, capturing inputs. */
252
+ static createCapture(facetIndex: number, edgeCount: number, detail: PolygonLocationDetail): ConvexFacetLocationDetail;
230
253
  /** Whether the facet is convex. */
231
254
  get isConvex(): boolean;
232
255
  /** Clone the instance */
@@ -1 +1 @@
1
- {"version":3,"file":"FacetLocationDetail.d.ts","sourceRoot":"","sources":["../../../src/polyface/FacetLocationDetail.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAY,eAAe,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAc,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAGxE;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC;AAExG;;;GAGG;AACH,qBAAa,qBAAqB;IAChC,qEAAqE;IAC9D,iBAAiB,EAAE,MAAM,CAAC;IACjC,2FAA2F;IACpF,kBAAkB,EAAE,MAAM,CAAC;IAClC,8DAA8D;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IAC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
22
22
  this.parameterTolerance = Geometry.smallFraction;
23
23
  }
24
24
  }
25
+ /**
26
+ * A pair of FacetLocationDetail.
27
+ * @public
28
+ */
29
+ export class FacetLocationDetailPair {
30
+ /** Constructor, captures inputs */
31
+ constructor(detailA, detailB) {
32
+ this.detailA = detailA;
33
+ this.detailB = detailB;
34
+ }
35
+ /** Create a facet detail pair, capturing inputs. */
36
+ static create(detailA, detailB) {
37
+ return new FacetLocationDetailPair(detailA, detailB);
38
+ }
39
+ }
25
40
  /**
26
41
  * Implementation of `FacetLocationDetail` for a triangular facet.
27
42
  * @public
@@ -42,17 +57,23 @@ export class TriangularFacetLocationDetail {
42
57
  this._color = undefined;
43
58
  }
44
59
  /** Create a detail.
60
+ * @param detail optional, copied if given
45
61
  * @param result optional pre-allocated object to fill and return
46
62
  */
47
- static create(facetIndex, detail, result) {
48
- if (undefined === result)
49
- return new TriangularFacetLocationDetail(facetIndex, detail);
50
- result.invalidate(false); // detail might be owned by result!
63
+ static create(facetIndex = -1, detail, result) {
64
+ if (!result)
65
+ result = new TriangularFacetLocationDetail();
66
+ else
67
+ result.invalidate(false); // shallow: detail might be owned by result!
51
68
  result._facetIndex = facetIndex;
52
- if (undefined !== detail)
69
+ if (undefined !== detail && result._detail !== detail)
53
70
  result._detail.copyContentsFrom(detail);
54
71
  return result;
55
72
  }
73
+ /** Create a detail, capturing inputs. */
74
+ static createCapture(facetIndex, detail) {
75
+ return new TriangularFacetLocationDetail(facetIndex, detail);
76
+ }
56
77
  /** Get the facet index. */
57
78
  get facetIndex() {
58
79
  return this._facetIndex;
@@ -153,7 +174,7 @@ export class TriangularFacetLocationDetail {
153
174
  }
154
175
  }
155
176
  /**
156
- * Implementation of `FacetLocationDetail` for a non-convex facet.
177
+ * Implementation of `FacetLocationDetail` for a general facet, which may or may not be convex.
157
178
  * * Facet vertex data interpolation is not available.
158
179
  * @public
159
180
  */
@@ -172,18 +193,24 @@ export class NonConvexFacetLocationDetail {
172
193
  this._detail.invalidate();
173
194
  }
174
195
  /** Create a detail.
196
+ * @param detail optional, copied if given
175
197
  * @param result optional pre-allocated object to fill and return
176
198
  */
177
- static create(facetIndex, edgeCount, detail, result) {
178
- if (undefined === result)
179
- return new NonConvexFacetLocationDetail(facetIndex, edgeCount, detail);
180
- result.invalidate(false); // detail might be owned by result!
199
+ static create(facetIndex = -1, edgeCount = 0, detail, result) {
200
+ if (!result)
201
+ result = new NonConvexFacetLocationDetail();
202
+ else
203
+ result.invalidate(false); // shallow: detail might be owned by result!
181
204
  result._facetIndex = facetIndex;
182
205
  result._edgeCount = edgeCount;
183
206
  if (undefined !== detail && result._detail !== detail)
184
207
  result._detail.copyContentsFrom(detail);
185
208
  return result;
186
209
  }
210
+ /** Create a detail, capturing inputs. */
211
+ static createCapture(facetIndex, edgeCount, detail) {
212
+ return new NonConvexFacetLocationDetail(facetIndex, edgeCount, detail);
213
+ }
187
214
  /** Get the facet index. */
188
215
  get facetIndex() {
189
216
  return this._facetIndex;
@@ -212,7 +239,7 @@ export class NonConvexFacetLocationDetail {
212
239
  get isValid() {
213
240
  return this._isValid && this._detail.isValid;
214
241
  }
215
- /** Whether the facet is convex. */
242
+ /** Whether the facet is convex. Always returns false, as convexity is unknown to this detail. */
216
243
  get isConvex() {
217
244
  return false;
218
245
  }
@@ -282,13 +309,20 @@ export class ConvexFacetLocationDetail extends NonConvexFacetLocationDetail {
282
309
  this._barycentricCoordinates = undefined;
283
310
  }
284
311
  /** Create a detail.
312
+ * @param detail optional, copied if given
285
313
  * @param result optional pre-allocated object to fill and return
286
314
  */
287
- static create(facetIndex, edgeCount, detail, result) {
288
- if (undefined === result)
289
- return new ConvexFacetLocationDetail(facetIndex, edgeCount, detail);
315
+ static create(facetIndex = -1, edgeCount = 0, detail, result) {
316
+ if (!result)
317
+ result = new ConvexFacetLocationDetail();
318
+ else
319
+ result.invalidate(false); // shallow: detail might be owned by result!
290
320
  return super.create(facetIndex, edgeCount, detail, result);
291
321
  }
322
+ /** Create a detail, capturing inputs. */
323
+ static createCapture(facetIndex, edgeCount, detail) {
324
+ return new ConvexFacetLocationDetail(facetIndex, edgeCount, detail);
325
+ }
292
326
  /** Whether the facet is convex. */
293
327
  get isConvex() {
294
328
  return true;
@@ -1 +1 @@
1
- {"version":3,"file":"FacetLocationDetail.js","sourceRoot":"","sources":["../../../src/polyface/FacetLocationDetail.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAW,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAmB,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAG7E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAUzD;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAehC,gCAAgC;IAChC;QACE,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;QACtD,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC,aAAa,CAAC;IACnD,CAAC;CACF;AAuCD;;;GAGG;AACH,MAAM,OAAO,6BAA6B;IAOxC,sCAAsC;IACtC,YAAoB,aAAqB,CAAC,CAAC,EAAE,MAA+B;QAC1E,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,MAAM,EAAE,CAAC;IACnE,CAAC;IACD,8BAA8B;IACvB,UAAU,CAAC,OAAgB,IAAI;QACpC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI;YACN,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAC5B,IAAI,CAAC,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,MAAM,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;YAChF,IAAI,SAAS,KAAK,MAAM,EAAE;gBACxB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;gBAC/B,WAAW,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;aACpD;SACF;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD;;;;;OAKG;IACa,QAAQ,CAAC,WAAsB,EAAE,aAAoC,EAAE,oBAA4B,QAAQ,CAAC,mBAAmB;QAC7I,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,KAAK,IAAI,CAAC,MAAM,IAAI,SAAS,KAAK,WAAW,EAAE;YAClF,MAAM,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;YAChF,IAAI,SAAS,KAAK,MAAM;gBACtB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,yBAAyB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;SAC5E;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD;;;;MAIE;IACc,yBAAyB,CAAC,aAAoC,EAAE,oBAA4B,QAAQ,CAAC,mBAAmB;QACtI,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,KAAK,IAAI,CAAC,uBAAuB,IAAI,SAAS,KAAK,aAAa,EAAE;YACrG,IAAI,CAAC,uBAAuB,GAAG,UAAU,CAAC,4BAA4B,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;SAC9H;QACD,OAAO,IAAI,CAAC,uBAAuB,CAAC;IACtC,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 Polyface\n */\n\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { TriangleLocationDetail } from \"../geometry3d/BarycentricTriangle\";\nimport { Geometry, PolygonLocation } from \"../Geometry\";\nimport { PolyfaceVisitor } from \"./Polyface\";\nimport { PolygonLocationDetail, PolygonOps } from \"../geometry3d/PolygonOps\";\nimport { IndexedXYZCollection } from \"../geometry3d/IndexedXYZCollection\";\nimport { IndexedXYCollection } from \"../geometry3d/IndexedXYCollection\";\nimport { NumberArray } from \"../geometry3d/PointHelpers\";\n\n/** Callback for processing the detail for an intersected facet.\n * @param detail reference to the intersection data, with `detail.IsInsideOn === true`. Note that `detail` is owned by the caller; to persist, use `detail.clone`.\n * @param visitor at currently intersected facet\n * @returns true to accept this intersection and stop processing; false to continue to the next facet\n * @public\n */\nexport type FacetIntersectCallback = (detail: FacetLocationDetail, visitor: PolyfaceVisitor) => boolean;\n\n/** Options for computing and processing facet intersection methods.\n * @see PolyfaceQuery.intersectRay3d\n * @public\n */\nexport class FacetIntersectOptions {\n /** distance tolerance for testing coincidence with facet boundary */\n public distanceTolerance: number;\n /** fractional tolerance for snapping barycentric coordinates to a triangular facet edge */\n public parameterTolerance: number;\n /** whether to compute the normal at the intersection point */\n public needNormal?: boolean;\n /** whether to compute the uv parameter at the intersection point */\n public needParam?: boolean;\n /** whether to compute the color at the intersection point */\n public needColor?: boolean;\n /** whether to compute the barycentric coordinates of the point for a convex facet */\n public needBarycentricCoordinates?: boolean;\n /** optional callback to accept an intersected facet */\n public acceptIntersection?: FacetIntersectCallback;\n /** constructor with defaults */\n public constructor() {\n this.distanceTolerance = Geometry.smallMetricDistance;\n this.parameterTolerance = Geometry.smallFraction;\n }\n}\n/**\n * Carries data about a point in the plane of a facet of a mesh.\n * @see PolyfaceQuery.intersectRay3d\n * @public\n */\nexport interface FacetLocationDetail {\n /** Get the index of the referenced facet. */\n get facetIndex(): number;\n /** Get the number of edges of this facet. */\n get edgeCount(): number;\n /** Get the world coordinates of the point. */\n get point(): Point3d;\n /** Get the application-specific number. */\n get a(): number;\n /** Get the projection of the point onto the closest facet edge. */\n get closestEdge(): { startVertexIndex: number, edgeParam: number };\n /** Whether this instance specifies a valid location. */\n get isValid(): boolean;\n /** Whether the facet is convex. */\n get isConvex(): boolean;\n /** Whether the point is inside or on the facet. */\n get isInsideOrOn(): boolean;\n /** Get the code that classifies the location of the point with respect to the facet. */\n get classify(): PolygonLocation;\n /** Clone the instance */\n clone(): FacetLocationDetail;\n /** Set the instance contents from the other detail */\n copyContentsFrom(other: FacetLocationDetail): void;\n /** Get reference to cached normal interpolated from facet data. Inputs may be used to compute the cache. */\n getNormal(facetNormals?: IndexedXYZCollection, facetVertices?: IndexedXYZCollection, distanceTolerance?: number): Vector3d | undefined;\n /** Get reference to cached uv parameter interpolated from facet data. Inputs may be used to compute the cache. */\n getParam(facetParams?: IndexedXYCollection, facetVertices?: IndexedXYZCollection, distanceTolerance?: number): Point2d | undefined;\n /** Get cached color interpolated from facet data. Inputs may be used to compute the cache. */\n getColor(facetColors?: number[], facetVertices?: IndexedXYZCollection, distanceTolerance?: number): number | undefined;\n /** Get reference to cached barycentric coordinates of the point. Inputs may be used to compute the cache. */\n getBarycentricCoordinates(facetVertices?: IndexedXYZCollection, distanceTolerance?: number): number[] | undefined;\n}\n\n/**\n * Implementation of `FacetLocationDetail` for a triangular facet.\n * @public\n */\nexport class TriangularFacetLocationDetail implements FacetLocationDetail {\n private _facetIndex: number;\n private _detail: TriangleLocationDetail;\n private _normal?: Vector3d;\n private _param?: Point2d;\n private _color?: number;\n\n /** captures the detail if provided */\n private constructor(facetIndex: number = -1, detail?: TriangleLocationDetail) {\n this._facetIndex = facetIndex;\n this._detail = detail ? detail : TriangleLocationDetail.create();\n }\n /** Invalidate this detail. */\n public invalidate(deep: boolean = true) {\n this._facetIndex = -1;\n if (deep)\n this._detail.invalidate();\n this._normal = undefined;\n this._param = undefined;\n this._color = undefined;\n }\n /** Create a detail.\n * @param result optional pre-allocated object to fill and return\n */\n public static create(facetIndex: number, detail?: TriangleLocationDetail, result?: TriangularFacetLocationDetail): TriangularFacetLocationDetail {\n if (undefined === result)\n return new TriangularFacetLocationDetail(facetIndex, detail);\n result.invalidate(false); // detail might be owned by result!\n result._facetIndex = facetIndex;\n if (undefined !== detail)\n result._detail.copyContentsFrom(detail);\n return result;\n }\n /** Get the facet index. */\n public get facetIndex(): number {\n return this._facetIndex;\n }\n /** Get the edge count of this facet. */\n public get edgeCount(): number {\n return 3;\n }\n /** Get the world coordinates of the point. */\n public get point(): Point3d {\n return this._detail.world;\n }\n /** Get the application-specific number. */\n public get a(): number {\n return this._detail.a;\n }\n /** Get the projection of the point onto the closest facet edge. */\n public get closestEdge(): { startVertexIndex: number, edgeParam: number } {\n return { startVertexIndex: this._detail.closestEdgeIndex, edgeParam: this._detail.closestEdgeParam };\n }\n /** Test validity of fields other than _detail. */\n private get _isValid(): boolean {\n return this._facetIndex >= 0;\n }\n /** Whether this instance specifies a valid location. */\n public get isValid(): boolean {\n return this._isValid && this._detail.isValid;\n }\n /** Whether the facet is convex. */\n public get isConvex(): boolean {\n return true;\n }\n /** Whether the point is inside or on the polygon. */\n public get isInsideOrOn(): boolean {\n return this._isValid && this._detail.isInsideOrOn;\n }\n /** Get the code that classifies the location of the point with respect to the facet. */\n public get classify(): PolygonLocation {\n return this._detail.classify;\n }\n /** Clone the instance */\n public clone(): TriangularFacetLocationDetail {\n const detail = new TriangularFacetLocationDetail();\n detail.copyContentsFrom(this);\n return detail;\n }\n /** Set the instance contents from the other detail.\n * @param other detail to clone\n */\n public copyContentsFrom(other: TriangularFacetLocationDetail) {\n this._facetIndex = other._facetIndex;\n this._detail.copyContentsFrom(other._detail);\n this._normal = other._normal?.clone();\n this._param = other._param?.clone();\n this._color = other._color;\n }\n /** Get normal interpolated from facet data.\n * @param facetNormals used to compute the normal cache\n * @returns reference to cached normal\n */\n public getNormal(facetNormals?: IndexedXYZCollection): Vector3d | undefined {\n if (this._detail.isValid && undefined === this._normal && undefined !== facetNormals) {\n this._normal = Vector3d.create();\n const scales = [this._detail.local.x, this._detail.local.y, this._detail.local.z];\n facetNormals.linearCombination(scales, this._normal);\n }\n return this._normal;\n }\n /** Get uv parameter interpolated from facet data.\n * @param facetParams used to compute the uv parameter cache\n * @returns reference to cached uv parameter\n */\n public getParam(facetParams?: IndexedXYCollection): Point2d | undefined {\n if (this._detail.isValid && undefined === this._param && undefined !== facetParams) {\n this._param = Point2d.create();\n const scales = [this._detail.local.x, this._detail.local.y, this._detail.local.z];\n facetParams.linearCombination(scales, this._param);\n }\n return this._param;\n }\n /** Get color interpolated from facet data.\n * * Assumes barycentric coordinates are already computed in the TriangleLocationDetail member.\n * @param facetColors used to compute the color cache\n * @returns cached color\n */\n public getColor(facetColors?: number[]): number | undefined {\n if (this._detail.isValid && undefined === this._color && undefined !== facetColors) {\n const scales = [this._detail.local.x, this._detail.local.y, this._detail.local.z];\n this._color = NumberArray.linearCombinationOfColors(facetColors, scales);\n }\n return this._color;\n }\n /** Get the barycentric coordinates of this location.\n * @returns cached barycentric coordinates\n */\n public getBarycentricCoordinates(): number[] {\n return [this._detail.local.x, this._detail.local.y, this._detail.local.z];\n }\n}\n/**\n * Implementation of `FacetLocationDetail` for a non-convex facet.\n * * Facet vertex data interpolation is not available.\n * @public\n */\nexport class NonConvexFacetLocationDetail implements FacetLocationDetail {\n private _facetIndex: number;\n private _edgeCount: number;\n protected _detail: PolygonLocationDetail;\n\n /** captures the detail if provided */\n protected constructor(facetIndex: number = -1, edgeCount: number = 0, detail?: PolygonLocationDetail) {\n this._facetIndex = facetIndex;\n this._edgeCount = edgeCount;\n this._detail = detail ? detail : PolygonLocationDetail.create();\n }\n /** Invalidate this detail. */\n public invalidate(deep: boolean = true) {\n this._facetIndex = -1;\n this._edgeCount = 0;\n if (deep)\n this._detail.invalidate();\n }\n /** Create a detail.\n * @param result optional pre-allocated object to fill and return\n */\n public static create(facetIndex: number, edgeCount: number, detail?: PolygonLocationDetail, result?: NonConvexFacetLocationDetail): NonConvexFacetLocationDetail {\n if (undefined === result)\n return new NonConvexFacetLocationDetail(facetIndex, edgeCount, detail);\n result.invalidate(false); // detail might be owned by result!\n result._facetIndex = facetIndex;\n result._edgeCount = edgeCount;\n if (undefined !== detail && result._detail !== detail)\n result._detail.copyContentsFrom(detail);\n return result;\n }\n /** Get the facet index. */\n public get facetIndex(): number {\n return this._facetIndex;\n }\n /** Get the edge count of this facet. */\n public get edgeCount(): number {\n return this._edgeCount;\n }\n /** Get the world coordinates of the point. */\n public get point(): Point3d {\n return this._detail.point;\n }\n /** Get the application-specific number. */\n public get a(): number {\n return this._detail.a;\n }\n /** Get the projection of the point onto the closest facet edge. */\n public get closestEdge(): { startVertexIndex: number, edgeParam: number } {\n return { startVertexIndex: this._detail.closestEdgeIndex, edgeParam: this._detail.closestEdgeParam };\n }\n /** Test validity of fields other than _detail. */\n private get _isValid(): boolean {\n return this._facetIndex >= 0 && this._edgeCount >= 3;\n }\n /** Whether this instance specifies a valid location. */\n public get isValid(): boolean {\n return this._isValid && this._detail.isValid;\n }\n /** Whether the facet is convex. */\n public get isConvex(): boolean {\n return false;\n }\n /** Whether the point is inside or on the polygon. */\n public get isInsideOrOn(): boolean {\n return this._isValid && this._detail.isInsideOrOn;\n }\n /** Get the code that classifies the location of the point with respect to the facet. */\n public get classify(): PolygonLocation {\n return this._detail.code;\n }\n /** Clone the instance */\n public clone(): NonConvexFacetLocationDetail {\n const detail = new NonConvexFacetLocationDetail();\n detail.copyContentsFrom(this);\n return detail;\n }\n /** Set the instance contents from the other detail.\n * @param other detail to clone\n */\n public copyContentsFrom(other: NonConvexFacetLocationDetail) {\n this._facetIndex = other._facetIndex;\n this._edgeCount = other._edgeCount;\n this._detail.copyContentsFrom(other._detail);\n }\n /** Interpolated data is not defined for a non-convex facet.\n * @returns undefined\n */\n public getNormal(): Vector3d | undefined {\n return undefined;\n }\n /** Interpolated data is not defined for a non-convex facet.\n * @returns undefined\n */\n public getParam(): Point2d | undefined {\n return undefined;\n }\n /** Interpolated data is not defined for a non-convex facet.\n * @returns undefined\n */\n public getColor(): number | undefined {\n return undefined;\n }\n /** Barycentric coordinates are not defined for a non-convex facet.\n * @returns undefined\n */\n public getBarycentricCoordinates(): number[] | undefined {\n return undefined;\n }\n}\n/**\n * Implementation of `FacetLocationDetail` for a convex facet.\n * * If `edgeCount` is 3, `TriangularFacetLocationDetail` is more efficient.\n * @public\n */\nexport class ConvexFacetLocationDetail extends NonConvexFacetLocationDetail {\n private _normal?: Vector3d;\n private _param?: Point2d;\n private _color?: number;\n private _barycentricCoordinates?: number[];\n\n /** captures the detail if provided */\n private constructor(facetIndex: number = -1, edgeCount: number = 0, detail?: PolygonLocationDetail) {\n super(facetIndex, edgeCount, detail);\n }\n /** Invalidate this detail. */\n public override invalidate(deep: boolean = true) {\n super.invalidate(deep);\n this._normal = undefined;\n this._param = undefined;\n this._color = undefined;\n this._barycentricCoordinates = undefined;\n }\n /** Create a detail.\n * @param result optional pre-allocated object to fill and return\n */\n public static override create(facetIndex: number, edgeCount: number, detail?: PolygonLocationDetail, result?: ConvexFacetLocationDetail): ConvexFacetLocationDetail {\n if (undefined === result)\n return new ConvexFacetLocationDetail(facetIndex, edgeCount, detail);\n return super.create(facetIndex, edgeCount, detail, result);\n }\n /** Whether the facet is convex. */\n public override get isConvex(): boolean {\n return true;\n }\n /** Clone the instance */\n public override clone(): ConvexFacetLocationDetail {\n const detail = new ConvexFacetLocationDetail();\n detail.copyContentsFrom(this);\n return detail;\n }\n /** Set the instance contents from the other detail.\n * @param other detail to clone\n */\n public override copyContentsFrom(other: ConvexFacetLocationDetail) {\n super.copyContentsFrom(other);\n this._normal = other._normal?.clone();\n this._param = other._param?.clone();\n this._color = other._color;\n this._barycentricCoordinates = other._barycentricCoordinates?.slice();\n }\n /** Get normal interpolated from facet data.\n * @param facetNormals used to compute the normal cache\n * @param facetVertices used to compute the barycentric coordinate cache\n * @param distanceTolerance used to compute the barycentric coordinate cache\n * @returns reference to cached normal\n */\n public override getNormal(facetNormals?: IndexedXYZCollection, facetVertices?: IndexedXYZCollection, distanceTolerance: number = Geometry.smallMetricDistance): Vector3d | undefined {\n if (this._detail.isValid && undefined === this._normal && undefined !== facetNormals) {\n const scales = this.getBarycentricCoordinates(facetVertices, distanceTolerance);\n if (undefined !== scales) {\n this._normal = Vector3d.create();\n facetNormals.linearCombination(scales, this._normal);\n }\n }\n return this._normal;\n }\n /** Get uv parameter interpolated from facet data.\n * @param facetParams used to compute the uv parameter cache\n * @param facetVertices used to compute the barycentric coordinate cache\n * @param distanceTolerance used to compute the barycentric coordinate cache\n * @returns reference to cached uv parameter\n */\n public override getParam(facetParams?: IndexedXYCollection, facetVertices?: IndexedXYZCollection, distanceTolerance: number = Geometry.smallMetricDistance): Point2d | undefined {\n if (this._detail.isValid && undefined === this._param && undefined !== facetParams) {\n const scales = this.getBarycentricCoordinates(facetVertices, distanceTolerance);\n if (undefined !== scales) {\n this._param = Point2d.create();\n facetParams.linearCombination(scales, this._param);\n }\n }\n return this._param;\n }\n /** Get color interpolated from facet data.\n * @param facetColors used to compute the color cache\n * @param facetVertices used to compute the barycentric coordinate cache\n * @param distanceTolerance used to compute the barycentric coordinate cache\n * @returns cached color\n */\n public override getColor(facetColors?: number[], facetVertices?: IndexedXYZCollection, distanceTolerance: number = Geometry.smallMetricDistance): number | undefined {\n if (this._detail.isValid && undefined === this._color && undefined !== facetColors) {\n const scales = this.getBarycentricCoordinates(facetVertices, distanceTolerance);\n if (undefined !== scales)\n this._color = NumberArray.linearCombinationOfColors(facetColors, scales);\n }\n return this._color;\n }\n /** Get the barycentric coordinates of this location, if they have been computed.\n * @param facetVertices used to compute the barycentric coordinate cache\n * @param distanceTolerance used to compute the barycentric coordinate cache\n * @returns cached barycentric coordinates\n */\n public override getBarycentricCoordinates(facetVertices?: IndexedXYZCollection, distanceTolerance: number = Geometry.smallMetricDistance): number[] | undefined {\n if (this._detail.isValid && undefined === this._barycentricCoordinates && undefined !== facetVertices) {\n this._barycentricCoordinates = PolygonOps.convexBarycentricCoordinates(facetVertices, this._detail.point, distanceTolerance);\n }\n return this._barycentricCoordinates;\n }\n}\n"]}
1
+ {"version":3,"file":"FacetLocationDetail.js","sourceRoot":"","sources":["../../../src/polyface/FacetLocationDetail.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAW,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAmB,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAG7E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAUzD;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAehC,gCAAgC;IAChC;QACE,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;QACtD,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC,aAAa,CAAC;IACnD,CAAC;CACF;AAuCD;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAMlC,mCAAmC;IACnC,YAAoB,OAA4B,EAAE,OAA4B;QAC5E,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IACD,oDAAoD;IAC7C,MAAM,CAAC,MAAM,CAAC,OAA4B,EAAE,OAA4B;QAC7E,OAAO,IAAI,uBAAuB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,6BAA6B;IAOxC,sCAAsC;IACtC,YAAoB,a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QAAQ,CAAC,WAAsB,EAAE,aAAoC,EAAE,oBAA4B,QAAQ,CAAC,mBAAmB;QAC7I,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,KAAK,IAAI,CAAC,MAAM,IAAI,SAAS,KAAK,WAAW,EAAE;YAClF,MAAM,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;YAChF,IAAI,SAAS,KAAK,MAAM;gBACtB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,yBAAyB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;SAC5E;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD;;;;MAIE;IACc,yBAAyB,CAAC,aAAoC,EAAE,oBAA4B,QAAQ,CAAC,mBAAmB;QACtI,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,KAAK,IAAI,CAAC,uBAAuB,IAAI,SAAS,KAAK,aAAa,EAAE;YACrG,IAAI,CAAC,uBAAuB,GAAG,UAAU,CAAC,4BAA4B,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;SAC9H;QACD,OAAO,IAAI,CAAC,uBAAuB,CAAC;IACtC,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 Polyface\n */\n\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { TriangleLocationDetail } from \"../geometry3d/BarycentricTriangle\";\nimport { Geometry, PolygonLocation } from \"../Geometry\";\nimport { PolyfaceVisitor } from \"./Polyface\";\nimport { PolygonLocationDetail, PolygonOps } from \"../geometry3d/PolygonOps\";\nimport { IndexedXYZCollection } from \"../geometry3d/IndexedXYZCollection\";\nimport { IndexedXYCollection } from \"../geometry3d/IndexedXYCollection\";\nimport { NumberArray } from \"../geometry3d/PointHelpers\";\n\n/** Callback for processing the detail for an intersected facet.\n * @param detail reference to the intersection data, with `detail.IsInsideOn === true`. Note that `detail` is owned by the caller; to persist, use `detail.clone`.\n * @param visitor at currently intersected facet\n * @returns true to accept this intersection and stop processing; false to continue to the next facet\n * @public\n */\nexport type FacetIntersectCallback = (detail: FacetLocationDetail, visitor: PolyfaceVisitor) => boolean;\n\n/** Options for computing and processing facet intersection methods.\n * @see PolyfaceQuery.intersectRay3d\n * @public\n */\nexport class FacetIntersectOptions {\n /** distance tolerance for testing coincidence with facet boundary */\n public distanceTolerance: number;\n /** fractional tolerance for snapping barycentric coordinates to a triangular facet edge */\n public parameterTolerance: number;\n /** whether to compute the normal at the intersection point */\n public needNormal?: boolean;\n /** whether to compute the uv parameter at the intersection point */\n public needParam?: boolean;\n /** whether to compute the color at the intersection point */\n public needColor?: boolean;\n /** whether to compute the barycentric coordinates of the point for a convex facet */\n public needBarycentricCoordinates?: boolean;\n /** optional callback to accept an intersected facet */\n public acceptIntersection?: FacetIntersectCallback;\n /** constructor with defaults */\n public constructor() {\n this.distanceTolerance = Geometry.smallMetricDistance;\n this.parameterTolerance = Geometry.smallFraction;\n }\n}\n/**\n * Carries data about a point in the plane of a facet of a mesh.\n * @see PolyfaceQuery.intersectRay3d\n * @public\n */\nexport interface FacetLocationDetail {\n /** Get the index of the referenced facet. */\n get facetIndex(): number;\n /** Get the number of edges of this facet. */\n get edgeCount(): number;\n /** Get the world coordinates of the point. */\n get point(): Point3d;\n /** Get the application-specific number. */\n get a(): number;\n /** Get the projection of the point onto the closest facet edge. */\n get closestEdge(): { startVertexIndex: number, edgeParam: number };\n /** Whether this instance specifies a valid location. */\n get isValid(): boolean;\n /** Whether the facet is convex. */\n get isConvex(): boolean;\n /** Whether the point is inside or on the facet. */\n get isInsideOrOn(): boolean;\n /** Get the code that classifies the location of the point with respect to the facet. */\n get classify(): PolygonLocation;\n /** Clone the instance */\n clone(): FacetLocationDetail;\n /** Set the instance contents from the other detail */\n copyContentsFrom(other: FacetLocationDetail): void;\n /** Get reference to cached normal interpolated from facet data. Inputs may be used to compute the cache. */\n getNormal(facetNormals?: IndexedXYZCollection, facetVertices?: IndexedXYZCollection, distanceTolerance?: number): Vector3d | undefined;\n /** Get reference to cached uv parameter interpolated from facet data. Inputs may be used to compute the cache. */\n getParam(facetParams?: IndexedXYCollection, facetVertices?: IndexedXYZCollection, distanceTolerance?: number): Point2d | undefined;\n /** Get cached color interpolated from facet data. Inputs may be used to compute the cache. */\n getColor(facetColors?: number[], facetVertices?: IndexedXYZCollection, distanceTolerance?: number): number | undefined;\n /** Get reference to cached barycentric coordinates of the point. Inputs may be used to compute the cache. */\n getBarycentricCoordinates(facetVertices?: IndexedXYZCollection, distanceTolerance?: number): number[] | undefined;\n}\n\n/**\n * A pair of FacetLocationDetail.\n * @public\n */\nexport class FacetLocationDetailPair {\n /** The first of the two details. */\n public detailA: FacetLocationDetail;\n /** The second of the two details. */\n public detailB: FacetLocationDetail;\n\n /** Constructor, captures inputs */\n private constructor(detailA: FacetLocationDetail, detailB: FacetLocationDetail) {\n this.detailA = detailA;\n this.detailB = detailB;\n }\n /** Create a facet detail pair, capturing inputs. */\n public static create(detailA: FacetLocationDetail, detailB: FacetLocationDetail): FacetLocationDetailPair {\n return new FacetLocationDetailPair(detailA, detailB);\n }\n}\n\n/**\n * Implementation of `FacetLocationDetail` for a triangular facet.\n * @public\n */\nexport class TriangularFacetLocationDetail implements FacetLocationDetail {\n private _facetIndex: number;\n private _detail: TriangleLocationDetail;\n private _normal?: Vector3d;\n private _param?: Point2d;\n private _color?: number;\n\n /** captures the detail if provided */\n private constructor(facetIndex: number = -1, detail?: TriangleLocationDetail) {\n this._facetIndex = facetIndex;\n this._detail = detail ? detail : TriangleLocationDetail.create();\n }\n /** Invalidate this detail. */\n public invalidate(deep: boolean = true) {\n this._facetIndex = -1;\n if (deep)\n this._detail.invalidate();\n this._normal = undefined;\n this._param = undefined;\n this._color = undefined;\n }\n /** Create a detail.\n * @param detail optional, copied if given\n * @param result optional pre-allocated object to fill and return\n */\n public static create(facetIndex: number = -1, detail?: TriangleLocationDetail, result?: TriangularFacetLocationDetail): TriangularFacetLocationDetail {\n if (!result)\n result = new TriangularFacetLocationDetail();\n else\n result.invalidate(false); // shallow: detail might be owned by result!\n result._facetIndex = facetIndex;\n if (undefined !== detail && result._detail !== detail)\n result._detail.copyContentsFrom(detail);\n return result;\n }\n /** Create a detail, capturing inputs. */\n public static createCapture(facetIndex: number, detail: TriangleLocationDetail): TriangularFacetLocationDetail {\n return new TriangularFacetLocationDetail(facetIndex, detail);\n }\n /** Get the facet index. */\n public get facetIndex(): number {\n return this._facetIndex;\n }\n /** Get the edge count of this facet. */\n public get edgeCount(): number {\n return 3;\n }\n /** Get the world coordinates of the point. */\n public get point(): Point3d {\n return this._detail.world;\n }\n /** Get the application-specific number. */\n public get a(): number {\n return this._detail.a;\n }\n /** Get the projection of the point onto the closest facet edge. */\n public get closestEdge(): { startVertexIndex: number, edgeParam: number } {\n return { startVertexIndex: this._detail.closestEdgeIndex, edgeParam: this._detail.closestEdgeParam };\n }\n /** Test validity of fields other than _detail. */\n private get _isValid(): boolean {\n return this._facetIndex >= 0;\n }\n /** Whether this instance specifies a valid location. */\n public get isValid(): boolean {\n return this._isValid && this._detail.isValid;\n }\n /** Whether the facet is convex. */\n public get isConvex(): boolean {\n return true;\n }\n /** Whether the point is inside or on the polygon. */\n public get isInsideOrOn(): boolean {\n return this._isValid && this._detail.isInsideOrOn;\n }\n /** Get the code that classifies the location of the point with respect to the facet. */\n public get classify(): PolygonLocation {\n return this._detail.classify;\n }\n /** Clone the instance */\n public clone(): TriangularFacetLocationDetail {\n const detail = new TriangularFacetLocationDetail();\n detail.copyContentsFrom(this);\n return detail;\n }\n /** Set the instance contents from the other detail.\n * @param other detail to clone\n */\n public copyContentsFrom(other: TriangularFacetLocationDetail) {\n this._facetIndex = other._facetIndex;\n this._detail.copyContentsFrom(other._detail);\n this._normal = other._normal?.clone();\n this._param = other._param?.clone();\n this._color = other._color;\n }\n /** Get normal interpolated from facet data.\n * @param facetNormals used to compute the normal cache\n * @returns reference to cached normal\n */\n public getNormal(facetNormals?: IndexedXYZCollection): Vector3d | undefined {\n if (this._detail.isValid && undefined === this._normal && undefined !== facetNormals) {\n this._normal = Vector3d.create();\n const scales = [this._detail.local.x, this._detail.local.y, this._detail.local.z];\n facetNormals.linearCombination(scales, this._normal);\n }\n return this._normal;\n }\n /** Get uv parameter interpolated from facet data.\n * @param facetParams used to compute the uv parameter cache\n * @returns reference to cached uv parameter\n */\n public getParam(facetParams?: IndexedXYCollection): Point2d | undefined {\n if (this._detail.isValid && undefined === this._param && undefined !== facetParams) {\n this._param = Point2d.create();\n const scales = [this._detail.local.x, this._detail.local.y, this._detail.local.z];\n facetParams.linearCombination(scales, this._param);\n }\n return this._param;\n }\n /** Get color interpolated from facet data.\n * * Assumes barycentric coordinates are already computed in the TriangleLocationDetail member.\n * @param facetColors used to compute the color cache\n * @returns cached color\n */\n public getColor(facetColors?: number[]): number | undefined {\n if (this._detail.isValid && undefined === this._color && undefined !== facetColors) {\n const scales = [this._detail.local.x, this._detail.local.y, this._detail.local.z];\n this._color = NumberArray.linearCombinationOfColors(facetColors, scales);\n }\n return this._color;\n }\n /** Get the barycentric coordinates of this location.\n * @returns cached barycentric coordinates\n */\n public getBarycentricCoordinates(): number[] {\n return [this._detail.local.x, this._detail.local.y, this._detail.local.z];\n }\n}\n/**\n * Implementation of `FacetLocationDetail` for a general facet, which may or may not be convex.\n * * Facet vertex data interpolation is not available.\n * @public\n */\nexport class NonConvexFacetLocationDetail implements FacetLocationDetail {\n private _facetIndex: number;\n private _edgeCount: number;\n protected _detail: PolygonLocationDetail;\n\n /** captures the detail if provided */\n protected constructor(facetIndex: number = -1, edgeCount: number = 0, detail?: PolygonLocationDetail) {\n this._facetIndex = facetIndex;\n this._edgeCount = edgeCount;\n this._detail = detail ? detail : PolygonLocationDetail.create();\n }\n /** Invalidate this detail. */\n public invalidate(deep: boolean = true) {\n this._facetIndex = -1;\n this._edgeCount = 0;\n if (deep)\n this._detail.invalidate();\n }\n /** Create a detail.\n * @param detail optional, copied if given\n * @param result optional pre-allocated object to fill and return\n */\n public static create(facetIndex: number = -1, edgeCount: number = 0, detail?: PolygonLocationDetail, result?: NonConvexFacetLocationDetail): NonConvexFacetLocationDetail {\n if (!result)\n result = new NonConvexFacetLocationDetail();\n else\n result.invalidate(false); // shallow: detail might be owned by result!\n result._facetIndex = facetIndex;\n result._edgeCount = edgeCount;\n if (undefined !== detail && result._detail !== detail)\n result._detail.copyContentsFrom(detail);\n return result;\n }\n /** Create a detail, capturing inputs. */\n public static createCapture(facetIndex: number, edgeCount: number, detail: PolygonLocationDetail): NonConvexFacetLocationDetail {\n return new NonConvexFacetLocationDetail(facetIndex, edgeCount, detail);\n }\n /** Get the facet index. */\n public get facetIndex(): number {\n return this._facetIndex;\n }\n /** Get the edge count of this facet. */\n public get edgeCount(): number {\n return this._edgeCount;\n }\n /** Get the world coordinates of the point. */\n public get point(): Point3d {\n return this._detail.point;\n }\n /** Get the application-specific number. */\n public get a(): number {\n return this._detail.a;\n }\n /** Get the projection of the point onto the closest facet edge. */\n public get closestEdge(): { startVertexIndex: number, edgeParam: number } {\n return { startVertexIndex: this._detail.closestEdgeIndex, edgeParam: this._detail.closestEdgeParam };\n }\n /** Test validity of fields other than _detail. */\n private get _isValid(): boolean {\n return this._facetIndex >= 0 && this._edgeCount >= 3;\n }\n /** Whether this instance specifies a valid location. */\n public get isValid(): boolean {\n return this._isValid && this._detail.isValid;\n }\n /** Whether the facet is convex. Always returns false, as convexity is unknown to this detail. */\n public get isConvex(): boolean {\n return false;\n }\n /** Whether the point is inside or on the polygon. */\n public get isInsideOrOn(): boolean {\n return this._isValid && this._detail.isInsideOrOn;\n }\n /** Get the code that classifies the location of the point with respect to the facet. */\n public get classify(): PolygonLocation {\n return this._detail.code;\n }\n /** Clone the instance */\n public clone(): NonConvexFacetLocationDetail {\n const detail = new NonConvexFacetLocationDetail();\n detail.copyContentsFrom(this);\n return detail;\n }\n /** Set the instance contents from the other detail.\n * @param other detail to clone\n */\n public copyContentsFrom(other: NonConvexFacetLocationDetail) {\n this._facetIndex = other._facetIndex;\n this._edgeCount = other._edgeCount;\n this._detail.copyContentsFrom(other._detail);\n }\n /** Interpolated data is not defined for a non-convex facet.\n * @returns undefined\n */\n public getNormal(): Vector3d | undefined {\n return undefined;\n }\n /** Interpolated data is not defined for a non-convex facet.\n * @returns undefined\n */\n public getParam(): Point2d | undefined {\n return undefined;\n }\n /** Interpolated data is not defined for a non-convex facet.\n * @returns undefined\n */\n public getColor(): number | undefined {\n return undefined;\n }\n /** Barycentric coordinates are not defined for a non-convex facet.\n * @returns undefined\n */\n public getBarycentricCoordinates(): number[] | undefined {\n return undefined;\n }\n}\n/**\n * Implementation of `FacetLocationDetail` for a convex facet.\n * * If `edgeCount` is 3, `TriangularFacetLocationDetail` is more efficient.\n * @public\n */\nexport class ConvexFacetLocationDetail extends NonConvexFacetLocationDetail {\n private _normal?: Vector3d;\n private _param?: Point2d;\n private _color?: number;\n private _barycentricCoordinates?: number[];\n\n /** captures the detail if provided */\n private constructor(facetIndex: number = -1, edgeCount: number = 0, detail?: PolygonLocationDetail) {\n super(facetIndex, edgeCount, detail);\n }\n /** Invalidate this detail. */\n public override invalidate(deep: boolean = true) {\n super.invalidate(deep);\n this._normal = undefined;\n this._param = undefined;\n this._color = undefined;\n this._barycentricCoordinates = undefined;\n }\n /** Create a detail.\n * @param detail optional, copied if given\n * @param result optional pre-allocated object to fill and return\n */\n public static override create(facetIndex: number = -1, edgeCount: number = 0, detail?: PolygonLocationDetail, result?: ConvexFacetLocationDetail): ConvexFacetLocationDetail {\n if (!result)\n result = new ConvexFacetLocationDetail();\n else\n result.invalidate(false); // shallow: detail might be owned by result!\n return super.create(facetIndex, edgeCount, detail, result);\n }\n /** Create a detail, capturing inputs. */\n public static override createCapture(facetIndex: number, edgeCount: number, detail: PolygonLocationDetail): ConvexFacetLocationDetail {\n return new ConvexFacetLocationDetail(facetIndex, edgeCount, detail);\n }\n /** Whether the facet is convex. */\n public override get isConvex(): boolean {\n return true;\n }\n /** Clone the instance */\n public override clone(): ConvexFacetLocationDetail {\n const detail = new ConvexFacetLocationDetail();\n detail.copyContentsFrom(this);\n return detail;\n }\n /** Set the instance contents from the other detail.\n * @param other detail to clone\n */\n public override copyContentsFrom(other: ConvexFacetLocationDetail) {\n super.copyContentsFrom(other);\n this._normal = other._normal?.clone();\n this._param = other._param?.clone();\n this._color = other._color;\n this._barycentricCoordinates = other._barycentricCoordinates?.slice();\n }\n /** Get normal interpolated from facet data.\n * @param facetNormals used to compute the normal cache\n * @param facetVertices used to compute the barycentric coordinate cache\n * @param distanceTolerance used to compute the barycentric coordinate cache\n * @returns reference to cached normal\n */\n public override getNormal(facetNormals?: IndexedXYZCollection, facetVertices?: IndexedXYZCollection, distanceTolerance: number = Geometry.smallMetricDistance): Vector3d | undefined {\n if (this._detail.isValid && undefined === this._normal && undefined !== facetNormals) {\n const scales = this.getBarycentricCoordinates(facetVertices, distanceTolerance);\n if (undefined !== scales) {\n this._normal = Vector3d.create();\n facetNormals.linearCombination(scales, this._normal);\n }\n }\n return this._normal;\n }\n /** Get uv parameter interpolated from facet data.\n * @param facetParams used to compute the uv parameter cache\n * @param facetVertices used to compute the barycentric coordinate cache\n * @param distanceTolerance used to compute the barycentric coordinate cache\n * @returns reference to cached uv parameter\n */\n public override getParam(facetParams?: IndexedXYCollection, facetVertices?: IndexedXYZCollection, distanceTolerance: number = Geometry.smallMetricDistance): Point2d | undefined {\n if (this._detail.isValid && undefined === this._param && undefined !== facetParams) {\n const scales = this.getBarycentricCoordinates(facetVertices, distanceTolerance);\n if (undefined !== scales) {\n this._param = Point2d.create();\n facetParams.linearCombination(scales, this._param);\n }\n }\n return this._param;\n }\n /** Get color interpolated from facet data.\n * @param facetColors used to compute the color cache\n * @param facetVertices used to compute the barycentric coordinate cache\n * @param distanceTolerance used to compute the barycentric coordinate cache\n * @returns cached color\n */\n public override getColor(facetColors?: number[], facetVertices?: IndexedXYZCollection, distanceTolerance: number = Geometry.smallMetricDistance): number | undefined {\n if (this._detail.isValid && undefined === this._color && undefined !== facetColors) {\n const scales = this.getBarycentricCoordinates(facetVertices, distanceTolerance);\n if (undefined !== scales)\n this._color = NumberArray.linearCombinationOfColors(facetColors, scales);\n }\n return this._color;\n }\n /** Get the barycentric coordinates of this location, if they have been computed.\n * @param facetVertices used to compute the barycentric coordinate cache\n * @param distanceTolerance used to compute the barycentric coordinate cache\n * @returns cached barycentric coordinates\n */\n public override getBarycentricCoordinates(facetVertices?: IndexedXYZCollection, distanceTolerance: number = Geometry.smallMetricDistance): number[] | undefined {\n if (this._detail.isValid && undefined === this._barycentricCoordinates && undefined !== facetVertices) {\n this._barycentricCoordinates = PolygonOps.convexBarycentricCoordinates(facetVertices, this._detail.point, distanceTolerance);\n }\n return this._barycentricCoordinates;\n }\n}\n"]}
@@ -21,7 +21,7 @@ export declare abstract class Polyface extends GeometryQuery {
21
21
  data: PolyfaceData;
22
22
  protected constructor(data: PolyfaceData);
23
23
  /** create and return a visitor for this concrete polyface. */
24
- abstract createVisitor(_numWrap: number): PolyfaceVisitor;
24
+ abstract createVisitor(numWrap: number): PolyfaceVisitor;
25
25
  /** Flag indicating if the mesh display must assume both sides are visible. */
26
26
  get twoSided(): boolean;
27
27
  set twoSided(value: boolean);
@@ -1 +1 @@
1
- {"version":3,"file":"Polyface.d.ts","sourceRoot":"","sources":["../../../src/polyface/Polyface.ts"],"names":[],"mappings":"AAKA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,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