@itwin/core-geometry 4.1.0-dev.8 → 4.1.0-dev.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -1
- package/lib/cjs/Constant.js.map +1 -1
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js +2 -2
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.js +1 -1
- package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
- package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.d.ts +1 -1
- package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js +2 -2
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/cjs/bspline/KnotVector.js.map +1 -1
- package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts +15 -17
- package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js +24 -20
- package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.d.ts +28 -28
- package/lib/cjs/clipping/BooleanClipFactory.d.ts.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.js +28 -28
- package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.d.ts +11 -11
- package/lib/cjs/clipping/BooleanClipNode.d.ts.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.js +11 -11
- package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.d.ts +73 -76
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +105 -86
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.d.ts +78 -47
- package/lib/cjs/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js +112 -54
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.d.ts +54 -44
- package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +33 -29
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.d.ts +39 -25
- package/lib/cjs/clipping/ClipVector.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipVector.js +35 -23
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +61 -38
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +64 -41
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +49 -30
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +50 -30
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.d.ts +2 -2
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.d.ts.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js +2 -2
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +5 -1
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +5 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +4 -3
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +7 -5
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveChain.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +62 -42
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +71 -48
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +36 -26
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +46 -39
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.d.ts +6 -2
- package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurve.js +13 -9
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts +74 -68
- package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveCloseApproachXY.js +100 -108
- package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.d.ts +46 -48
- package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.js +72 -61
- package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts +32 -38
- package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.js +86 -97
- package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +67 -3
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +75 -7
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts +6 -6
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +9 -7
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.d.ts +77 -0
- package/lib/cjs/curve/CurveOps.d.ts.map +1 -0
- package/lib/cjs/curve/CurveOps.js +160 -0
- package/lib/cjs/curve/CurveOps.js.map +1 -0
- package/lib/cjs/curve/CurvePrimitive.d.ts +26 -18
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +4 -3
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/cjs/curve/GeometryQuery.d.ts +2 -2
- package/lib/cjs/curve/GeometryQuery.d.ts.map +1 -1
- package/lib/cjs/curve/GeometryQuery.js +2 -2
- package/lib/cjs/curve/GeometryQuery.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.d.ts +7 -5
- package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +6 -6
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +2 -2
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +3 -3
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.d.ts +7 -5
- package/lib/cjs/curve/Loop.d.ts.map +1 -1
- package/lib/cjs/curve/Loop.js +18 -6
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/OffsetOptions.d.ts +97 -0
- package/lib/cjs/curve/OffsetOptions.d.ts.map +1 -0
- package/lib/cjs/curve/OffsetOptions.js +166 -0
- package/lib/cjs/curve/OffsetOptions.js.map +1 -0
- package/lib/cjs/curve/ParityRegion.d.ts +7 -7
- package/lib/cjs/curve/ParityRegion.d.ts.map +1 -1
- package/lib/cjs/curve/ParityRegion.js +19 -11
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Path.d.ts +6 -6
- package/lib/cjs/curve/Path.d.ts.map +1 -1
- package/lib/cjs/curve/Path.js +15 -9
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/PointString3d.js.map +1 -1
- package/lib/cjs/curve/ProxyCurve.d.ts +5 -7
- package/lib/cjs/curve/ProxyCurve.d.ts.map +1 -1
- package/lib/cjs/curve/ProxyCurve.js +7 -7
- package/lib/cjs/curve/ProxyCurve.js.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +76 -56
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +83 -60
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +2 -2
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js +6 -2
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.d.ts +6 -5
- package/lib/cjs/curve/UnionRegion.d.ts.map +1 -1
- package/lib/cjs/curve/UnionRegion.js +17 -8
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/{ChainCollectorContext.d.ts → internalContexts/ChainCollectorContext.d.ts} +4 -4
- package/lib/cjs/curve/internalContexts/ChainCollectorContext.d.ts.map +1 -0
- package/lib/cjs/curve/{ChainCollectorContext.js → internalContexts/ChainCollectorContext.js} +4 -4
- package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -0
- package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts +2 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.js +6 -2
- package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +59 -70
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js +130 -220
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts +23 -95
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +89 -178
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js +4 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js +2 -2
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +9 -0
- package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +13 -0
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.d.ts +43 -48
- package/lib/cjs/geometry3d/BilinearPatch.d.ts.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.js +51 -55
- package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.d.ts +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js +13 -11
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.d.ts +103 -97
- package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js +247 -124
- package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +18 -0
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +32 -5
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.d.ts +41 -32
- package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.js +11 -8
- package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +37 -34
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +65 -43
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +36 -32
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +37 -32
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts +8 -9
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +9 -10
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +12 -4
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +18 -5
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js +5 -5
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +6 -2
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +31 -22
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts +16 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js +55 -0
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +134 -94
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js +297 -145
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.d.ts +69 -0
- package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -0
- package/lib/cjs/geometry3d/Ray2d.js +146 -0
- package/lib/cjs/geometry3d/Ray2d.js.map +1 -0
- package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +10 -3
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +18 -6
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/geometry4d/Map4d.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/geometry4d/MomentData.js.map +1 -1
- package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/BandedSystem.js.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
- package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
- package/lib/cjs/numerics/Complex.js.map +1 -1
- package/lib/cjs/numerics/ConvexPolygon2d.d.ts +7 -49
- package/lib/cjs/numerics/ConvexPolygon2d.d.ts.map +1 -1
- package/lib/cjs/numerics/ConvexPolygon2d.js +16 -107
- package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
- package/lib/cjs/numerics/PolarData.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +0 -2
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/Quadrature.js +5 -5
- package/lib/cjs/numerics/Quadrature.js.map +1 -1
- package/lib/cjs/numerics/Range1dArray.js.map +1 -1
- package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/cjs/numerics/UnionFind.js.map +1 -1
- package/lib/cjs/numerics/UsageSums.js.map +1 -1
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/BoxTopology.js.map +1 -1
- package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
- package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +2 -2
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +93 -14
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +173 -34
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
- package/lib/cjs/polyface/TaggedNumericData.js +1 -1
- package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
- package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.d.ts +27 -19
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js +30 -12
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts +12 -8
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +18 -4
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.d.ts +3 -4
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js +3 -5
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.d.ts +15 -12
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +38 -0
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +104 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/cjs/serialization/DeepCompare.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +11 -0
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +30 -0
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.d.ts +2 -7
- package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js +2 -7
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +2 -1
- package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts +2 -1
- package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts +2 -1
- package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts +2 -2
- package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
- package/lib/cjs/solid/SweepContour.js +9 -0
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.js +1 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/cjs/topology/MaskManager.js.map +1 -1
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/RegularizeFace.js +3 -3
- package/lib/cjs/topology/RegularizeFace.js.map +1 -1
- package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
- package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
- package/lib/cjs/topology/Triangulation.js +1 -1
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
- package/lib/esm/Constant.js.map +1 -1
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js +1 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineSurface.js +1 -1
- package/lib/esm/bspline/BSplineSurface.js.map +1 -1
- package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.d.ts +1 -1
- package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js +1 -1
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/esm/bspline/KnotVector.js.map +1 -1
- package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.d.ts +15 -17
- package/lib/esm/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js +24 -20
- package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.d.ts +28 -28
- package/lib/esm/clipping/BooleanClipFactory.d.ts.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.js +28 -28
- package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.d.ts +11 -11
- package/lib/esm/clipping/BooleanClipNode.d.ts.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.js +11 -11
- package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.d.ts +73 -76
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +105 -86
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.d.ts +78 -47
- package/lib/esm/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js +112 -54
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.d.ts +54 -44
- package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +33 -29
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.d.ts +39 -25
- package/lib/esm/clipping/ClipVector.d.ts.map +1 -1
- package/lib/esm/clipping/ClipVector.js +35 -23
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +61 -38
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +64 -41
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +49 -30
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +50 -30
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.d.ts +2 -2
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.d.ts.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js +2 -2
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +5 -1
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +5 -1
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +4 -3
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +6 -4
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
- package/lib/esm/curve/CurveChain.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +62 -42
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +70 -47
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +36 -26
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +46 -39
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.d.ts +6 -2
- package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurve.js +13 -9
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts +74 -68
- package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveCloseApproachXY.js +100 -108
- package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.d.ts +46 -48
- package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.js +72 -61
- package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts +32 -38
- package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.js +86 -97
- package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/CurveExtendMode.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +67 -3
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +74 -6
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts +6 -6
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +9 -7
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.d.ts +77 -0
- package/lib/esm/curve/CurveOps.d.ts.map +1 -0
- package/lib/esm/curve/CurveOps.js +156 -0
- package/lib/esm/curve/CurveOps.js.map +1 -0
- package/lib/esm/curve/CurvePrimitive.d.ts +26 -18
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +4 -3
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/esm/curve/GeometryQuery.d.ts +2 -2
- package/lib/esm/curve/GeometryQuery.d.ts.map +1 -1
- package/lib/esm/curve/GeometryQuery.js +2 -2
- package/lib/esm/curve/GeometryQuery.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.d.ts +7 -5
- package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +5 -5
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +2 -2
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +2 -2
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.d.ts +7 -5
- package/lib/esm/curve/Loop.d.ts.map +1 -1
- package/lib/esm/curve/Loop.js +18 -6
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/OffsetOptions.d.ts +97 -0
- package/lib/esm/curve/OffsetOptions.d.ts.map +1 -0
- package/lib/esm/curve/OffsetOptions.js +161 -0
- package/lib/esm/curve/OffsetOptions.js.map +1 -0
- package/lib/esm/curve/ParityRegion.d.ts +7 -7
- package/lib/esm/curve/ParityRegion.d.ts.map +1 -1
- package/lib/esm/curve/ParityRegion.js +19 -11
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Path.d.ts +6 -6
- package/lib/esm/curve/Path.d.ts.map +1 -1
- package/lib/esm/curve/Path.js +15 -9
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/PointString3d.js.map +1 -1
- package/lib/esm/curve/ProxyCurve.d.ts +5 -7
- package/lib/esm/curve/ProxyCurve.d.ts.map +1 -1
- package/lib/esm/curve/ProxyCurve.js +7 -7
- package/lib/esm/curve/ProxyCurve.js.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/esm/curve/Query/InOutTests.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +76 -56
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +84 -61
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +2 -2
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/esm/curve/StrokeOptions.js +6 -2
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.d.ts +6 -5
- package/lib/esm/curve/UnionRegion.d.ts.map +1 -1
- package/lib/esm/curve/UnionRegion.js +17 -8
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/esm/curve/{ChainCollectorContext.d.ts → internalContexts/ChainCollectorContext.d.ts} +4 -4
- package/lib/esm/curve/internalContexts/ChainCollectorContext.d.ts.map +1 -0
- package/lib/esm/curve/{ChainCollectorContext.js → internalContexts/ChainCollectorContext.js} +4 -4
- package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -0
- package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.d.ts +2 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.js +6 -2
- package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +59 -70
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.js +129 -218
- package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts +23 -95
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +86 -173
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js +4 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +9 -0
- package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
- package/lib/esm/geometry3d/Angle.js +13 -0
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.d.ts +43 -48
- package/lib/esm/geometry3d/BilinearPatch.d.ts.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js +51 -55
- package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.d.ts +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js +13 -11
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.d.ts +103 -97
- package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js +247 -124
- package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +18 -0
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +32 -5
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Plane3d.d.ts +41 -32
- package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3d.js +11 -8
- package/lib/esm/geometry3d/Plane3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +37 -34
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +65 -43
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +36 -32
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +37 -32
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts +8 -9
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +9 -10
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +12 -4
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +18 -5
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js +5 -5
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +6 -2
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +31 -22
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts +16 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js +56 -1
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +134 -94
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js +297 -145
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.d.ts +69 -0
- package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -0
- package/lib/esm/geometry3d/Ray2d.js +142 -0
- package/lib/esm/geometry3d/Ray2d.js.map +1 -0
- package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/esm/geometry3d/Segment1d.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +10 -3
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +18 -6
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/esm/geometry3d/XYZProps.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/geometry4d/Map4d.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/geometry4d/MomentData.js.map +1 -1
- package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/BandedSystem.js.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
- package/lib/esm/numerics/ClusterableArray.js.map +1 -1
- package/lib/esm/numerics/Complex.js.map +1 -1
- package/lib/esm/numerics/ConvexPolygon2d.d.ts +7 -49
- package/lib/esm/numerics/ConvexPolygon2d.d.ts.map +1 -1
- package/lib/esm/numerics/ConvexPolygon2d.js +14 -104
- package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
- package/lib/esm/numerics/PolarData.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +0 -2
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/Quadrature.js +5 -5
- package/lib/esm/numerics/Quadrature.js.map +1 -1
- package/lib/esm/numerics/Range1dArray.js.map +1 -1
- package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/esm/numerics/UnionFind.js.map +1 -1
- package/lib/esm/numerics/UsageSums.js.map +1 -1
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/BoxTopology.js.map +1 -1
- package/lib/esm/polyface/FacetFaceData.js.map +1 -1
- package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/esm/polyface/FacetOrientation.js.map +1 -1
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +2 -2
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +93 -14
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +173 -35
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeLengthData.js.map +1 -1
- package/lib/esm/polyface/TaggedNumericData.js +1 -1
- package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
- package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.d.ts +27 -19
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js +30 -12
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts +12 -8
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +18 -4
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.d.ts +3 -4
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js +3 -5
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.d.ts +15 -12
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +38 -0
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +102 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/esm/serialization/DeepCompare.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +11 -0
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +30 -0
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.d.ts +2 -7
- package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js +2 -7
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +2 -1
- package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts +2 -1
- package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.d.ts +2 -1
- package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/SolidPrimitive.js.map +1 -1
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts +2 -2
- package/lib/esm/solid/SweepContour.d.ts.map +1 -1
- package/lib/esm/solid/SweepContour.js +9 -0
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.js +1 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.js +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/esm/topology/MaskManager.js.map +1 -1
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/RegularizeFace.js +3 -3
- package/lib/esm/topology/RegularizeFace.js.map +1 -1
- package/lib/esm/topology/SignedDataSummary.js.map +1 -1
- package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
- package/lib/esm/topology/Triangulation.js +1 -1
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
- package/package.json +6 -17
- package/lib/cjs/curve/ChainCollectorContext.d.ts.map +0 -1
- package/lib/cjs/curve/ChainCollectorContext.js.map +0 -1
- package/lib/esm/curve/ChainCollectorContext.d.ts.map +0 -1
- package/lib/esm/curve/ChainCollectorContext.js.map +0 -1
|
@@ -21,10 +21,12 @@ const Matrix3d_1 = require("./Matrix3d");
|
|
|
21
21
|
* * are NOT required to be unit vectors.
|
|
22
22
|
* * are NOT required to be perpendicular vectors.
|
|
23
23
|
* * The skewed, non-uniform scaling of the grid directions is the primary focus of this class.
|
|
24
|
-
* * Queries of altitude, velocity, normalX, normalY, and normalZ use the NORMALIZED cross product of vectorU
|
|
24
|
+
* * Queries of altitude, velocity, normalX, normalY, and normalZ use the NORMALIZED cross product of vectorU
|
|
25
|
+
* and vectorV as plane normal.
|
|
25
26
|
* * Hence these are cartesian distances.
|
|
26
27
|
* * If numerous calls to these are expected, the repeated normalization may be a performance issue.
|
|
27
|
-
* * Using a [[Plane3dByOriginAndUnitNormal]] or the rigid transform returned by [[toRigidFrame]] would provide
|
|
28
|
+
* * Using a [[Plane3dByOriginAndUnitNormal]] or the rigid transform returned by [[toRigidFrame]] would provide
|
|
29
|
+
* better performance.
|
|
28
30
|
* @public
|
|
29
31
|
*/
|
|
30
32
|
class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
@@ -34,7 +36,7 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
34
36
|
this.vectorU = vectorU;
|
|
35
37
|
this.vectorV = vectorV;
|
|
36
38
|
}
|
|
37
|
-
/**
|
|
39
|
+
/** Create a new plane from origin and 2 in-plane vectors. */
|
|
38
40
|
static createOriginAndVectors(origin, vectorU, vectorV, result) {
|
|
39
41
|
if (result) {
|
|
40
42
|
result.origin.setFrom(origin);
|
|
@@ -44,13 +46,14 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
44
46
|
}
|
|
45
47
|
return new Plane3dByOriginAndVectors(origin.clone(), vectorU.clone(), vectorV.clone());
|
|
46
48
|
}
|
|
47
|
-
/**
|
|
49
|
+
/** Clone to a new plane. */
|
|
48
50
|
clone(result) {
|
|
49
51
|
if (result !== undefined)
|
|
50
52
|
result.setOriginAndVectors(this.origin, this.vectorU, this.vectorV);
|
|
51
53
|
return new Plane3dByOriginAndVectors(this.origin.clone(), this.vectorU.clone(), this.vectorV.clone());
|
|
52
54
|
}
|
|
53
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Create a new Plane3dByOriginAndVectors from a variety of plane types.
|
|
54
57
|
* * The input is NOT captured.
|
|
55
58
|
*/
|
|
56
59
|
static createFrom(source, result) {
|
|
@@ -109,7 +112,8 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
109
112
|
this.vectorV.set(vx, vy, vz);
|
|
110
113
|
return this;
|
|
111
114
|
}
|
|
112
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Set all origin and both vectors from coordinates in given origin and vectors.
|
|
113
117
|
* * Note that coordinates are copied out of the parameters -- the given parameters are NOT retained by reference.
|
|
114
118
|
*/
|
|
115
119
|
setOriginAndVectors(origin, vectorU, vectorV) {
|
|
@@ -124,7 +128,8 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
124
128
|
return result.setOriginAndVectorsXYZ(x0, y0, z0, ux, uy, uz, vx, vy, vz);
|
|
125
129
|
return new Plane3dByOriginAndVectors(Point3dVector3d_1.Point3d.create(x0, y0, z0), Point3dVector3d_1.Vector3d.create(ux, uy, uz), Point3dVector3d_1.Vector3d.create(vx, vy, vz));
|
|
126
130
|
}
|
|
127
|
-
/**
|
|
131
|
+
/**
|
|
132
|
+
* Define a plane by three points in the plane.
|
|
128
133
|
* @param origin origin for the parameterization.
|
|
129
134
|
* @param targetU target point for the vectorU starting at the origin.
|
|
130
135
|
* @param targetV target point for the vectorV originating at the origin.
|
|
@@ -137,7 +142,8 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
137
142
|
static createXYPlane(result) {
|
|
138
143
|
return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(0, 0, 0, 1, 0, 0, 0, 1, 0, result);
|
|
139
144
|
}
|
|
140
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* Create a plane from data presented as Float64Arrays.
|
|
141
147
|
* @param origin x,y,z of origin.
|
|
142
148
|
* @param vectorU x,y,z of vectorU
|
|
143
149
|
* @param vectorV x,y,z of vectorV
|
|
@@ -145,7 +151,8 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
145
151
|
static createOriginAndVectorsArrays(origin, vectorU, vectorV, result) {
|
|
146
152
|
return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(origin[0], origin[1], origin[2], vectorU[0], vectorU[1], vectorU[2], vectorV[0], vectorV[1], vectorV[2], result);
|
|
147
153
|
}
|
|
148
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* Create a plane from data presented as Float64Array with weights
|
|
149
156
|
* @param origin x,y,z,w of origin.
|
|
150
157
|
* @param vectorU x,y,z,w of vectorU
|
|
151
158
|
* @param vectorV x,y,z,w of vectorV
|
|
@@ -209,7 +216,7 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
209
216
|
vectorV: this.vectorV.toJSON(),
|
|
210
217
|
};
|
|
211
218
|
}
|
|
212
|
-
/**
|
|
219
|
+
/** Create a new plane. See `setFromJSON` for layout example. */
|
|
213
220
|
static fromJSON(json) {
|
|
214
221
|
const result = Plane3dByOriginAndVectors.createXYPlane();
|
|
215
222
|
result.setFromJSON(json);
|
|
@@ -221,7 +228,8 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
221
228
|
&& this.vectorU.isAlmostEqual(other.vectorU)
|
|
222
229
|
&& this.vectorV.isAlmostEqual(other.vectorV);
|
|
223
230
|
}
|
|
224
|
-
/**
|
|
231
|
+
/**
|
|
232
|
+
* Normalize both `vectorU` and `vectorV` in place. This does NOT make them perpendicular.
|
|
225
233
|
* * Return true if both succeeded.
|
|
226
234
|
*/
|
|
227
235
|
normalizeInPlace() {
|
|
@@ -229,9 +237,7 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
229
237
|
const okV = this.vectorV.normalizeInPlace();
|
|
230
238
|
return okU && okV;
|
|
231
239
|
}
|
|
232
|
-
/**
|
|
233
|
-
* Return (if possible) a unit normal to the plane.
|
|
234
|
-
*/
|
|
240
|
+
/** Return (if possible) a unit normal to the plane */
|
|
235
241
|
getUnitNormal(result) {
|
|
236
242
|
return this.vectorU.unitCrossProduct(this.vectorV, result);
|
|
237
243
|
}
|
|
@@ -246,11 +252,11 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
246
252
|
* Return some point on the plane.
|
|
247
253
|
*/
|
|
248
254
|
getAnyPointOnPlane(result) {
|
|
255
|
+
// This function returns the plane origin. In general, a point x is on the plane if
|
|
256
|
+
// and only if x = o + a*u + b*v, where a and b are scalars.
|
|
249
257
|
return this.origin.clone(result);
|
|
250
258
|
}
|
|
251
|
-
/**
|
|
252
|
-
* Return (if possible) a ray with origin at plane origin, direction as unit normal to the plane.
|
|
253
|
-
*/
|
|
259
|
+
/** Return (if possible) a ray with origin at plane origin, direction as unit normal to the plane */
|
|
254
260
|
unitNormalRay(result) {
|
|
255
261
|
if (!Plane3dByOriginAndVectors._workVector)
|
|
256
262
|
Plane3dByOriginAndVectors._workVector = Point3dVector3d_1.Vector3d.create();
|
|
@@ -270,27 +276,24 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
270
276
|
toRigidFrame(result) {
|
|
271
277
|
return Transform_1.Transform.createRigidFromOriginAndColumns(this.origin, this.vectorU, this.vectorV, Geometry_1.AxisOrder.XYZ, result);
|
|
272
278
|
}
|
|
273
|
-
/**
|
|
274
|
-
* Apply the transform to the origin and vectors in place.
|
|
275
|
-
*/
|
|
279
|
+
/** Apply the transform to the origin and vectors in place */
|
|
276
280
|
transformInPlace(transform) {
|
|
277
281
|
transform.multiplyPoint3d(this.origin, this.origin);
|
|
278
282
|
transform.multiplyVector(this.vectorU, this.vectorU);
|
|
279
283
|
transform.multiplyVector(this.vectorV, this.vectorV);
|
|
280
284
|
}
|
|
281
|
-
// Implement PlaneAltitudeEvaluator methods . . .
|
|
282
285
|
/**
|
|
283
286
|
* Return x component of the (normalized!) {vectorU CROSS vectorV}.
|
|
284
287
|
* Return 0 if the cross product is zero.
|
|
285
|
-
|
|
288
|
+
*/
|
|
286
289
|
normalX() {
|
|
287
290
|
const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
|
|
288
291
|
return unitNormal !== undefined ? unitNormal.x : 0.0;
|
|
289
292
|
}
|
|
290
293
|
/**
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
+
* Return y component of the (normalized!) {vectorU CROSS vectorV}.
|
|
295
|
+
* Return 0 if the cross product is zero.
|
|
296
|
+
*/
|
|
294
297
|
normalY() {
|
|
295
298
|
const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
|
|
296
299
|
return unitNormal !== undefined ? unitNormal.y : 0.0;
|
|
@@ -298,41 +301,43 @@ class Plane3dByOriginAndVectors extends Plane3d_1.Plane3d {
|
|
|
298
301
|
/**
|
|
299
302
|
* Return z component of the (normalized!) {vectorU CROSS vectorV}.
|
|
300
303
|
* Return 0 if the cross product is zero.
|
|
301
|
-
|
|
304
|
+
*/
|
|
302
305
|
normalZ() {
|
|
303
306
|
const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
|
|
304
307
|
return unitNormal !== undefined ? unitNormal.z : 0.0;
|
|
305
308
|
}
|
|
306
|
-
/** Return signed cartesian altitude perpendicular to the plane.
|
|
309
|
+
/** Return signed cartesian altitude perpendicular to the plane. This uses the normalized cross product as normal. */
|
|
307
310
|
altitude(xyz) {
|
|
308
311
|
const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
|
|
309
312
|
if (unitNormal === undefined)
|
|
310
313
|
return 0.0;
|
|
311
314
|
return Geometry_1.Geometry.dotProductXYZXYZ((xyz.x - this.origin.x), (xyz.y - this.origin.y), (xyz.z - this.origin.z), unitNormal.x, unitNormal.y, unitNormal.z);
|
|
312
315
|
}
|
|
313
|
-
/** Return signed cartesian altitude perpendicular to the plane.
|
|
316
|
+
/** Return signed cartesian altitude perpendicular to the plane. This uses the normalized cross product as normal. */
|
|
314
317
|
altitudeXYZ(x, y, z) {
|
|
315
318
|
const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
|
|
316
319
|
if (unitNormal === undefined)
|
|
317
320
|
return 0.0;
|
|
318
321
|
return Geometry_1.Geometry.dotProductXYZXYZ((x - this.origin.x), (y - this.origin.y), (z - this.origin.z), unitNormal.x, unitNormal.y, unitNormal.z);
|
|
319
322
|
}
|
|
320
|
-
/** Return signed projection of the input vector to the plane normal.
|
|
323
|
+
/** Return signed projection of the input vector to the plane normal. This uses the normalized cross product as normal. */
|
|
321
324
|
velocity(xyzVector) {
|
|
322
325
|
const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
|
|
323
326
|
if (unitNormal === undefined)
|
|
324
327
|
return 0.0;
|
|
325
328
|
return Geometry_1.Geometry.dotProductXYZXYZ(xyzVector.x, xyzVector.y, xyzVector.z, unitNormal.x, unitNormal.y, unitNormal.z);
|
|
326
329
|
}
|
|
327
|
-
/** Return signed projection of the input vector to the plane normal.
|
|
330
|
+
/** Return signed projection of the input vector to the plane normal. This uses the normalized cross product as normal. */
|
|
328
331
|
velocityXYZ(x, y, z) {
|
|
329
332
|
const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);
|
|
330
333
|
if (unitNormal === undefined)
|
|
331
334
|
return 0.0;
|
|
332
335
|
return Geometry_1.Geometry.dotProductXYZXYZ(x, y, z, unitNormal.x, unitNormal.y, unitNormal.z);
|
|
333
336
|
}
|
|
334
|
-
/**
|
|
335
|
-
*
|
|
337
|
+
/**
|
|
338
|
+
* Return triple product of homogeneous difference {(xyzw - w * origin)} with vectorU and vectorV.
|
|
339
|
+
* * In the usual manner of homogeneous calculations, this is proportional to true cartesian distance from the
|
|
340
|
+
* plane but is not a physical distance.
|
|
336
341
|
*/
|
|
337
342
|
weightedAltitude(xyzw) {
|
|
338
343
|
const w = xyzw.w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plane3dByOriginAndVectors.js","sourceRoot":"","sources":["../../../src/geometry3d/Plane3dByOriginAndVectors.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,0CAAmE;AACnE,uCAAoC;AAEpC,uDAAsD;AACtD,mCAAgC;AAChC,2CAAwC;AAExC,yCAAsC;AAEtC;;;;;;;;;;;;GAYG;AACH,MAAa,yBAA0B,SAAQ,iBAAO;IAOpD,YAAoB,MAAe,EAAE,OAAiB,EAAE,OAAiB;QACvE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IACD,6DAA6D;IACtD,MAAM,CAAC,sBAAsB,CAAC,MAAe,EAAE,OAAiB,EAAE,OAAiB,EAAE,MAAkC;QAC5H,IAAI,MAAM,EAAE;YACV,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC9B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAChC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAChC,OAAO,MAAM,CAAC;SACf;QACD,OAAO,IAAI,yBAAyB,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC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ClE,IAAI,CAAC,KAAK,SAAS;gBACjB,OAAO,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;SACzD;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;CACF;AA7WD,8DA6WC","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\nimport { AxisOrder, BeJSONFunctions, Geometry } from \"../Geometry\";\r\nimport { Plane3d } from \"./Plane3d\";\r\nimport { Point4d } from \"../geometry4d/Point4d\";\r\nimport { Point3d, Vector3d } from \"./Point3dVector3d\";\r\nimport { Ray3d } from \"./Ray3d\";\r\nimport { Transform } from \"./Transform\";\r\nimport { XYAndZ } from \"./XYZProps\";\r\nimport { Matrix3d } from \"./Matrix3d\";\r\n\r\n/**\r\n * A Plane3dByOriginAndVectors is an origin and a pair of vectors.\r\n * This defines a plane with a (possibly skewed) uv coordinate grid\r\n * * The grid directions (`vectorU` and `vectorV`)\r\n * * are NOT required to be unit vectors.\r\n * * are NOT required to be perpendicular vectors.\r\n * * The skewed, non-uniform scaling of the grid directions is the primary focus of this class.\r\n * * Queries of altitude, velocity, normalX, normalY, and normalZ use the NORMALIZED cross product of vectorU and vectorV as plane normal.\r\n * * Hence these are cartesian distances.\r\n * * If numerous calls to these are expected, the repeated normalization may be a performance issue.\r\n * * Using a [[Plane3dByOriginAndUnitNormal]] or the rigid transform returned by [[toRigidFrame]] would provide better performance.\r\n * @public\r\n */\r\nexport class Plane3dByOriginAndVectors extends Plane3d implements BeJSONFunctions {\r\n /** origin of plane grid */\r\n public origin: Point3d;\r\n /** u direction in plane grid */\r\n public vectorU: Vector3d;\r\n /** v direction in plane grid */\r\n public vectorV: Vector3d;\r\n private constructor(origin: Point3d, vectorU: Vector3d, vectorV: Vector3d) {\r\n super();\r\n this.origin = origin;\r\n this.vectorU = vectorU;\r\n this.vectorV = vectorV;\r\n }\r\n /** create a new plane from origin and 2 in-plane vectors. */\r\n public static createOriginAndVectors(origin: Point3d, vectorU: Vector3d, vectorV: Vector3d, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n if (result) {\r\n result.origin.setFrom(origin);\r\n result.vectorU.setFrom(vectorU);\r\n result.vectorV.setFrom(vectorV);\r\n return result;\r\n }\r\n return new Plane3dByOriginAndVectors(origin.clone(), vectorU.clone(), vectorV.clone());\r\n }\r\n /** clone to a new plane. */\r\n public clone(result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n if (result !== undefined)\r\n result.setOriginAndVectors(this.origin, this.vectorU, this.vectorV);\r\n return new Plane3dByOriginAndVectors(this.origin.clone(), this.vectorU.clone(), this.vectorV.clone());\r\n }\r\n /** create a new Plane3dByOriginAndVectors from a variety of plane types.\r\n * * The input is NOT captured.\r\n */\r\n public static createFrom(source: Plane3d, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors | undefined {\r\n if (source instanceof Plane3dByOriginAndVectors)\r\n return source.clone(result);\r\n const normal = source.getUnitNormal();\r\n if (normal === undefined)\r\n return undefined;\r\n const origin = source.getAnyPointOnPlane();\r\n const vectorU = Matrix3d.createPerpendicularVectorFavorXYPlane(normal);\r\n if (vectorU.tryNormalizeInPlace()) {\r\n const vectorV = normal.unitCrossProduct(vectorU);\r\n if (vectorV !== undefined)\r\n return new Plane3dByOriginAndVectors(origin, vectorU, vectorV);\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Return a Plane3dByOriginAndVectors, with\r\n * * origin is the translation (aka origin) from the Transform\r\n * * vectorU is the X column of the transform\r\n * * vectorV is the Y column of the transform.\r\n * @param transform source transform\r\n * @param xLength optional length to impose on vectorU.\r\n * @param yLength optional length to impose on vectorV.\r\n * @param result optional preexisting result\r\n */\r\n public static createFromTransformColumnsXYAndLengths(transform: Transform,\r\n xLength: number | undefined, yLength: number | undefined,\r\n result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n if (result) {\r\n result.origin.setFrom(transform.getOrigin());\r\n transform.matrix.columnX(result.vectorU);\r\n transform.matrix.columnY(result.vectorV);\r\n } else {\r\n result = new Plane3dByOriginAndVectors(\r\n transform.getOrigin(),\r\n transform.matrix.columnX(),\r\n transform.matrix.columnY());\r\n }\r\n if (xLength !== undefined)\r\n result.vectorU.scaleToLength(xLength, result.vectorU);\r\n if (yLength !== undefined)\r\n result.vectorV.scaleToLength(yLength, result.vectorV);\r\n return result;\r\n }\r\n /** Capture origin and directions in a new plane. */\r\n public static createCapture(origin: Point3d, vectorU: Vector3d, vectorV: Vector3d, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n if (!result)\r\n return new Plane3dByOriginAndVectors(origin, vectorU, vectorV);\r\n result.origin = origin;\r\n result.vectorU = vectorU;\r\n result.vectorV = vectorV;\r\n return result;\r\n }\r\n\r\n /** Set all origin and both vectors from direct numeric parameters */\r\n public setOriginAndVectorsXYZ(x0: number, y0: number, z0: number, ux: number, uy: number, uz: number, vx: number, vy: number, vz: number): Plane3dByOriginAndVectors {\r\n this.origin.set(x0, y0, z0);\r\n this.vectorU.set(ux, uy, uz);\r\n this.vectorV.set(vx, vy, vz);\r\n return this;\r\n }\r\n /** Set all origin and both vectors from coordinates in given origin and vectors.\r\n * * Note that coordinates are copied out of the parameters -- the given parameters are NOT retained by reference.\r\n */\r\n public setOriginAndVectors(origin: Point3d, vectorU: Vector3d, vectorV: Vector3d): Plane3dByOriginAndVectors {\r\n this.origin.setFrom(origin);\r\n this.vectorU.setFrom(vectorU);\r\n this.vectorV.setFrom(vectorV);\r\n return this;\r\n }\r\n /** Create a new plane from direct numeric parameters */\r\n public static createOriginAndVectorsXYZ(x0: number, y0: number, z0: number, ux: number, uy: number, uz: number, vx: number, vy: number, vz: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n if (result)\r\n return result.setOriginAndVectorsXYZ(x0, y0, z0, ux, uy, uz, vx, vy, vz);\r\n return new Plane3dByOriginAndVectors(Point3d.create(x0, y0, z0), Vector3d.create(ux, uy, uz), Vector3d.create(vx, vy, vz));\r\n }\r\n /** Define a plane by three points in the plane.\r\n * @param origin origin for the parameterization.\r\n * @param targetU target point for the vectorU starting at the origin.\r\n * @param targetV target point for the vectorV originating at the origin.\r\n * @param result optional result.\r\n */\r\n public static createOriginAndTargets(origin: Point3d, targetU: Point3d, targetV: Point3d, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(origin.x, origin.y, origin.z, targetU.x - origin.x, targetU.y - origin.y, targetU.z - origin.z, targetV.x - origin.x, targetV.y - origin.y, targetV.z - origin.z, result);\r\n }\r\n /** Create a plane with origin at 000, unit vectorU in x direction, and unit vectorV in the y direction. */\r\n public static createXYPlane(result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(0, 0, 0, 1, 0, 0, 0, 1, 0, result);\r\n }\r\n /** create a plane from data presented as Float64Arrays.\r\n * @param origin x,y,z of origin.\r\n * @param vectorU x,y,z of vectorU\r\n * @param vectorV x,y,z of vectorV\r\n */\r\n public static createOriginAndVectorsArrays(origin: Float64Array, vectorU: Float64Array, vectorV: Float64Array, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(origin[0], origin[1], origin[2], vectorU[0], vectorU[1], vectorU[2], vectorV[0], vectorV[1], vectorV[2], result);\r\n }\r\n /** create a plane from data presented as Float64Array with weights\r\n * @param origin x,y,z,w of origin.\r\n * @param vectorU x,y,z,w of vectorU\r\n * @param vectorV x,y,z,w of vectorV\r\n */\r\n public static createOriginAndVectorsWeightedArrays(originW: Float64Array, vectorUw: Float64Array, vectorVw: Float64Array, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n const w = originW[3];\r\n result = Plane3dByOriginAndVectors.createXYPlane(result);\r\n if (Geometry.isSmallMetricDistance(w))\r\n return result;\r\n const dw = 1.0 / w;\r\n const au = vectorUw[3] * dw * dw;\r\n const av = vectorVw[3] * dw * dw;\r\n // for homogeneous function X, with w its weight:\r\n // (X/w) is the cartesian point.\r\n // (X/w)' = (X' w - X w')/(w*w)\r\n // = X'/w - (X/w)(w'/w)\r\n // = X'/w - X w'/w^2)\r\n // The w parts of the formal xyzw sums are identically 0.\r\n // Here the X' and its w' are taken from each vectorUw and vectorVw\r\n result.origin.set(originW[0] * dw, originW[1] * dw, originW[2] * dw);\r\n Vector3d.createAdd2ScaledXYZ(vectorUw[0], vectorUw[1], vectorUw[2], dw, originW[0], originW[1], originW[2], -au, result.vectorU);\r\n Vector3d.createAdd2ScaledXYZ(vectorVw[0], vectorVw[1], vectorVw[2], dw, originW[0], originW[1], originW[2], -av, result.vectorV);\r\n return result;\r\n }\r\n /**\r\n * Evaluate a point a grid coordinates on the plane.\r\n * * The computed point is `origin + vectorU * u + vectorV * v`\r\n * @param u coordinate along vectorU\r\n * @param v coordinate along vectorV\r\n * @param result optional result destination.\r\n * @returns Return the computed coordinate.\r\n */\r\n public fractionToPoint(u: number, v: number, result?: Point3d): Point3d {\r\n return this.origin.plus2Scaled(this.vectorU, u, this.vectorV, v, result);\r\n }\r\n /** Return the vector from the plane origin to parametric coordinate (u.v) */\r\n public fractionToVector(u: number, v: number, result?: Vector3d): Vector3d {\r\n return Vector3d.createAdd2Scaled(this.vectorU, u, this.vectorV, v, result);\r\n }\r\n /** Set coordinates from a json object such as `{origin: [1,2,3], vectorU:[4,5,6], vectorV[3,2,1]}` */\r\n public setFromJSON(json?: any) {\r\n if (!json || !json.origin || !json.vectorV) {\r\n this.origin.set(0, 0, 0);\r\n this.vectorU.set(1, 0, 0);\r\n this.vectorV.set(0, 1, 0);\r\n } else {\r\n this.origin.setFromJSON(json.origin);\r\n this.vectorU.setFromJSON(json.vectorU);\r\n this.vectorV.setFromJSON(json.vectorV);\r\n }\r\n }\r\n /**\r\n * Convert an Angle to a JSON object.\r\n * @return {*} [origin,normal]\r\n */\r\n public toJSON(): any {\r\n return {\r\n origin: this.origin.toJSON(),\r\n vectorU: this.vectorU.toJSON(),\r\n vectorV: this.vectorV.toJSON(),\r\n };\r\n }\r\n /** create a new plane. See `setFromJSON` for layout example. */\r\n public static fromJSON(json?: any): Plane3dByOriginAndVectors {\r\n const result = Plane3dByOriginAndVectors.createXYPlane();\r\n result.setFromJSON(json);\r\n return result;\r\n }\r\n /** Test origin and vectors for isAlmostEqual with `other` */\r\n public isAlmostEqual(other: Plane3dByOriginAndVectors): boolean {\r\n return this.origin.isAlmostEqual(other.origin)\r\n && this.vectorU.isAlmostEqual(other.vectorU)\r\n && this.vectorV.isAlmostEqual(other.vectorV);\r\n }\r\n /** Normalize both `vectorU` and `vectorV` in place. This does NOT make them perpendicular.\r\n * * Return true if both succeeded.\r\n */\r\n public normalizeInPlace(): boolean {\r\n const okU = this.vectorU.normalizeInPlace();\r\n const okV = this.vectorV.normalizeInPlace();\r\n return okU && okV;\r\n }\r\n /**\r\n * Return (if possible) a unit normal to the plane.\r\n */\r\n public override getUnitNormal(result?: Vector3d): Vector3d | undefined {\r\n return this.vectorU.unitCrossProduct(this.vectorV, result);\r\n }\r\n /**\r\n * Return (if possible) a unit normal to the plane.\r\n * * This method is the same as getUnitNormal, which was created later as part of the abstract base class Plane3d.\r\n */\r\n public unitNormal(result?: Vector3d): Vector3d | undefined {\r\n return this.vectorU.unitCrossProduct(this.vectorV, result);\r\n }\r\n\r\n /**\r\n * Return some point on the plane.\r\n */\r\n public override getAnyPointOnPlane(result?: Point3d): Point3d {\r\n return this.origin.clone(result);\r\n }\r\n private static _workVector: Vector3d;\r\n /**\r\n * Return (if possible) a ray with origin at plane origin, direction as unit normal to the plane.\r\n */\r\n public unitNormalRay(result?: Ray3d): Ray3d | undefined {\r\n if (!Plane3dByOriginAndVectors._workVector)\r\n Plane3dByOriginAndVectors._workVector = Vector3d.create();\r\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV, Plane3dByOriginAndVectors._workVector);\r\n if (unitNormal === undefined)\r\n return undefined;\r\n return Ray3d.create(this.origin, unitNormal, result);\r\n }\r\n\r\n /**\r\n * Create a rigid frame (i.e. frenet frame) with\r\n * * origin at the plane origin\r\n * * x axis along the (normalized) vectorU\r\n * * y axis normalized vectorU to vectorV plane, and perpendicular to x axis\r\n * * z axis perpendicular to both.\r\n * @param result optional result\r\n */\r\n public toRigidFrame(result?: Transform): Transform | undefined {\r\n return Transform.createRigidFromOriginAndColumns(this.origin, this.vectorU, this.vectorV, AxisOrder.XYZ, result);\r\n }\r\n\r\n /**\r\n * Apply the transform to the origin and vectors in place.\r\n */\r\n public transformInPlace(transform: Transform) {\r\n transform.multiplyPoint3d(this.origin, this.origin);\r\n transform.multiplyVector(this.vectorU, this.vectorU);\r\n transform.multiplyVector(this.vectorV, this.vectorV);\r\n }\r\n // Implement PlaneAltitudeEvaluator methods . . .\r\n /**\r\n * Return x component of the (normalized!) {vectorU CROSS vectorV}.\r\n * Return 0 if the cross product is zero.\r\n * */\r\n public normalX(): number {\r\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\r\n return unitNormal !== undefined ? unitNormal.x : 0.0;\r\n }\r\n /**\r\n* Return y component of the (normalized!) {vectorU CROSS vectorV}.\r\n* Return 0 if the cross product is zero.\r\n* */\r\n public normalY(): number {\r\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\r\n return unitNormal !== undefined ? unitNormal.y : 0.0;\r\n }\r\n /**\r\n * Return z component of the (normalized!) {vectorU CROSS vectorV}.\r\n * Return 0 if the cross product is zero.\r\n * */\r\n public normalZ(): number {\r\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\r\n return unitNormal !== undefined ? unitNormal.z : 0.0;\r\n }\r\n /** Return signed cartesian altitude perpendicular to the plane. This uses the normalized cross product as normal. */\r\n public altitude(xyz: XYAndZ): number {\r\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\r\n if (unitNormal === undefined)\r\n return 0.0;\r\n return Geometry.dotProductXYZXYZ(\r\n (xyz.x - this.origin.x), (xyz.y - this.origin.y), (xyz.z - this.origin.z),\r\n unitNormal.x, unitNormal.y, unitNormal.z);\r\n }\r\n /** Return signed cartesian altitude perpendicular to the plane. This uses the normalized cross product as normal. */\r\n public altitudeXYZ(x: number, y: number, z: number): number {\r\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\r\n if (unitNormal === undefined)\r\n return 0.0;\r\n return Geometry.dotProductXYZXYZ(\r\n (x - this.origin.x), (y - this.origin.y), (z - this.origin.z),\r\n unitNormal.x, unitNormal.y, unitNormal.z);\r\n }\r\n /** Return signed projection of the input vector to the plane normal. This uses the normalized cross product as normal. */\r\n public velocity(xyzVector: XYAndZ): number {\r\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\r\n if (unitNormal === undefined)\r\n return 0.0;\r\n return Geometry.dotProductXYZXYZ(\r\n xyzVector.x, xyzVector.y, xyzVector.z,\r\n unitNormal.x, unitNormal.y, unitNormal.z);\r\n }\r\n /** Return signed projection of the input vector to the plane normal. This uses the normalized cross product as normal. */\r\n public velocityXYZ(x: number, y: number, z: number): number {\r\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\r\n if (unitNormal === undefined)\r\n return 0.0;\r\n return Geometry.dotProductXYZXYZ(\r\n x, y, z,\r\n unitNormal.x, unitNormal.y, unitNormal.z);\r\n }\r\n /** Return triple product of homogeneous difference {(xyzw - w * origin)} with vectorU and vectorV.\r\n * * In the usual manner of homogeneous calculations, this is proportional to true cartesian distance from the plane but is not a physical distance.\r\n */\r\n public weightedAltitude(xyzw: Point4d) {\r\n const w = xyzw.w;\r\n return Geometry.tripleProduct(\r\n (xyzw.x - this.origin.x * w), (xyzw.y - this.origin.y * w), (xyzw.z - this.origin.z * w),\r\n this.vectorU.x, this.vectorU.y, this.vectorU.z,\r\n this.vectorV.x, this.vectorV.y, this.vectorV.z);\r\n }\r\n /**\r\n * Return the projection of spacePoint onto the plane.\r\n * If the plane is degenerate to a ray, project to the ray.\r\n * If the plane is degenerate to its origin, return the point\r\n */\r\n public projectPointToPlane(spacePoint: Point3d, result?: Point3d): Point3d {\r\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\r\n if (unitNormal !== undefined) {\r\n const w = unitNormal.dotProductStartEnd(this.origin, spacePoint);\r\n return spacePoint.plusScaled(unitNormal, -w, result);\r\n }\r\n // uh oh. vectorU and vectorV are colinear or zero.\r\n // project to ray defined by the longer one, or just to origin.\r\n const dotUU = this.vectorU.magnitudeSquared();\r\n const dotVV = this.vectorV.magnitudeSquared();\r\n if (dotUU >= dotVV) {\r\n const dotUW = this.vectorU.dotProductStartEnd(this.origin, spacePoint);\r\n const f = Geometry.conditionalDivideCoordinate(dotUW, dotUU, 0.0);\r\n if (f !== undefined)\r\n return spacePoint.plusScaled(this.vectorU, f, result);\r\n } else {\r\n const dotVW = this.vectorV.dotProductStartEnd(this.origin, spacePoint);\r\n const f = Geometry.conditionalDivideCoordinate(dotVW, dotVV, 0.0);\r\n if (f !== undefined)\r\n return spacePoint.plusScaled(this.vectorV, f, result);\r\n }\r\n return this.origin.clone(result);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Plane3dByOriginAndVectors.js","sourceRoot":"","sources":["../../../src/geometry3d/Plane3dByOriginAndVectors.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,0CAAmE;AACnE,uCAAoC;AAEpC,uDAAsD;AACtD,mCAAgC;AAChC,2CAAwC;AAExC,yCAAsC;AAEtC;;;;;;;;;;;;;;GAcG;AACH,MAAa,yBAA0B,SAAQ,iBAAO;IAOpD,YAAoB,MAAe,EAAE,OAAiB,EAAE,OAAi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AE,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC9C,IAAI,KAAK,IAAI,KAAK,EAAE;YAClB,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;YACvE,MAAM,CAAC,GAAG,mBAAQ,CAAC,2BAA2B,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;YAClE,IAAI,CAAC,KAAK,SAAS;gBACjB,OAAO,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;SACzD;aAAM;YACL,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;YACvE,MAAM,CAAC,GAAG,mBAAQ,CAAC,2BAA2B,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;YAClE,IAAI,CAAC,KAAK,SAAS;gBACjB,OAAO,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;SACzD;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;CACF;AA9YD,8DA8YC","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 */\nimport { AxisOrder, BeJSONFunctions, Geometry } from \"../Geometry\";\nimport { Plane3d } from \"./Plane3d\";\nimport { Point4d } from \"../geometry4d/Point4d\";\nimport { Point3d, Vector3d } from \"./Point3dVector3d\";\nimport { Ray3d } from \"./Ray3d\";\nimport { Transform } from \"./Transform\";\nimport { XYAndZ } from \"./XYZProps\";\nimport { Matrix3d } from \"./Matrix3d\";\n\n/**\n * A Plane3dByOriginAndVectors is an origin and a pair of vectors.\n * This defines a plane with a (possibly skewed) uv coordinate grid\n * * The grid directions (`vectorU` and `vectorV`)\n * * are NOT required to be unit vectors.\n * * are NOT required to be perpendicular vectors.\n * * The skewed, non-uniform scaling of the grid directions is the primary focus of this class.\n * * Queries of altitude, velocity, normalX, normalY, and normalZ use the NORMALIZED cross product of vectorU\n * and vectorV as plane normal.\n * * Hence these are cartesian distances.\n * * If numerous calls to these are expected, the repeated normalization may be a performance issue.\n * * Using a [[Plane3dByOriginAndUnitNormal]] or the rigid transform returned by [[toRigidFrame]] would provide\n * better performance.\n * @public\n */\nexport class Plane3dByOriginAndVectors extends Plane3d implements BeJSONFunctions {\n /** Origin of plane grid */\n public origin: Point3d;\n /** u direction in plane grid */\n public vectorU: Vector3d;\n /** v direction in plane grid */\n public vectorV: Vector3d;\n private constructor(origin: Point3d, vectorU: Vector3d, vectorV: Vector3d) {\n super();\n this.origin = origin;\n this.vectorU = vectorU;\n this.vectorV = vectorV;\n }\n /** Create a new plane from origin and 2 in-plane vectors. */\n public static createOriginAndVectors(\n origin: Point3d, vectorU: Vector3d, vectorV: Vector3d, result?: Plane3dByOriginAndVectors,\n ): Plane3dByOriginAndVectors {\n if (result) {\n result.origin.setFrom(origin);\n result.vectorU.setFrom(vectorU);\n result.vectorV.setFrom(vectorV);\n return result;\n }\n return new Plane3dByOriginAndVectors(origin.clone(), vectorU.clone(), vectorV.clone());\n }\n /** Clone to a new plane. */\n public clone(result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n if (result !== undefined)\n result.setOriginAndVectors(this.origin, this.vectorU, this.vectorV);\n return new Plane3dByOriginAndVectors(this.origin.clone(), this.vectorU.clone(), this.vectorV.clone());\n }\n /**\n * Create a new Plane3dByOriginAndVectors from a variety of plane types.\n * * The input is NOT captured.\n */\n public static createFrom(source: Plane3d, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors | undefined {\n if (source instanceof Plane3dByOriginAndVectors)\n return source.clone(result);\n const normal = source.getUnitNormal();\n if (normal === undefined)\n return undefined;\n const origin = source.getAnyPointOnPlane();\n const vectorU = Matrix3d.createPerpendicularVectorFavorXYPlane(normal);\n if (vectorU.tryNormalizeInPlace()) {\n const vectorV = normal.unitCrossProduct(vectorU);\n if (vectorV !== undefined)\n return new Plane3dByOriginAndVectors(origin, vectorU, vectorV);\n }\n return undefined;\n }\n\n /**\n * Return a Plane3dByOriginAndVectors, with\n * * origin is the translation (aka origin) from the Transform\n * * vectorU is the X column of the transform\n * * vectorV is the Y column of the transform.\n * @param transform source transform\n * @param xLength optional length to impose on vectorU.\n * @param yLength optional length to impose on vectorV.\n * @param result optional preexisting result\n */\n public static createFromTransformColumnsXYAndLengths(\n transform: Transform, xLength: number | undefined, yLength: number | undefined, result?: Plane3dByOriginAndVectors,\n ): Plane3dByOriginAndVectors {\n if (result) {\n result.origin.setFrom(transform.getOrigin());\n transform.matrix.columnX(result.vectorU);\n transform.matrix.columnY(result.vectorV);\n } else {\n result = new Plane3dByOriginAndVectors(\n transform.getOrigin(),\n transform.matrix.columnX(),\n transform.matrix.columnY());\n }\n if (xLength !== undefined)\n result.vectorU.scaleToLength(xLength, result.vectorU);\n if (yLength !== undefined)\n result.vectorV.scaleToLength(yLength, result.vectorV);\n return result;\n }\n /** Capture origin and directions in a new plane. */\n public static createCapture(\n origin: Point3d, vectorU: Vector3d, vectorV: Vector3d, result?: Plane3dByOriginAndVectors,\n ): Plane3dByOriginAndVectors {\n if (!result)\n return new Plane3dByOriginAndVectors(origin, vectorU, vectorV);\n result.origin = origin;\n result.vectorU = vectorU;\n result.vectorV = vectorV;\n return result;\n }\n\n /** Set all origin and both vectors from direct numeric parameters */\n public setOriginAndVectorsXYZ(\n x0: number, y0: number, z0: number, ux: number, uy: number, uz: number, vx: number, vy: number, vz: number,\n ): Plane3dByOriginAndVectors {\n this.origin.set(x0, y0, z0);\n this.vectorU.set(ux, uy, uz);\n this.vectorV.set(vx, vy, vz);\n return this;\n }\n /**\n * Set all origin and both vectors from coordinates in given origin and vectors.\n * * Note that coordinates are copied out of the parameters -- the given parameters are NOT retained by reference.\n */\n public setOriginAndVectors(origin: Point3d, vectorU: Vector3d, vectorV: Vector3d): Plane3dByOriginAndVectors {\n this.origin.setFrom(origin);\n this.vectorU.setFrom(vectorU);\n this.vectorV.setFrom(vectorV);\n return this;\n }\n /** Create a new plane from direct numeric parameters */\n public static createOriginAndVectorsXYZ(\n x0: number, y0: number, z0: number,\n ux: number, uy: number, uz: number,\n vx: number, vy: number, vz: number,\n result?: Plane3dByOriginAndVectors,\n ): Plane3dByOriginAndVectors {\n if (result)\n return result.setOriginAndVectorsXYZ(x0, y0, z0, ux, uy, uz, vx, vy, vz);\n return new Plane3dByOriginAndVectors(\n Point3d.create(x0, y0, z0), Vector3d.create(ux, uy, uz), Vector3d.create(vx, vy, vz),\n );\n }\n /**\n * Define a plane by three points in the plane.\n * @param origin origin for the parameterization.\n * @param targetU target point for the vectorU starting at the origin.\n * @param targetV target point for the vectorV originating at the origin.\n * @param result optional result.\n */\n public static createOriginAndTargets(\n origin: Point3d, targetU: Point3d, targetV: Point3d, result?: Plane3dByOriginAndVectors,\n ): Plane3dByOriginAndVectors {\n return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(\n origin.x, origin.y, origin.z,\n targetU.x - origin.x, targetU.y - origin.y, targetU.z - origin.z,\n targetV.x - origin.x, targetV.y - origin.y, targetV.z - origin.z,\n result,\n );\n }\n /** Create a plane with origin at 000, unit vectorU in x direction, and unit vectorV in the y direction. */\n public static createXYPlane(result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(0, 0, 0, 1, 0, 0, 0, 1, 0, result);\n }\n /**\n * Create a plane from data presented as Float64Arrays.\n * @param origin x,y,z of origin.\n * @param vectorU x,y,z of vectorU\n * @param vectorV x,y,z of vectorV\n */\n public static createOriginAndVectorsArrays(\n origin: Float64Array, vectorU: Float64Array, vectorV: Float64Array, result?: Plane3dByOriginAndVectors,\n ): Plane3dByOriginAndVectors {\n return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(\n origin[0], origin[1], origin[2],\n vectorU[0], vectorU[1], vectorU[2],\n vectorV[0], vectorV[1], vectorV[2],\n result,\n );\n }\n /**\n * Create a plane from data presented as Float64Array with weights\n * @param origin x,y,z,w of origin.\n * @param vectorU x,y,z,w of vectorU\n * @param vectorV x,y,z,w of vectorV\n */\n public static createOriginAndVectorsWeightedArrays(\n originW: Float64Array, vectorUw: Float64Array, vectorVw: Float64Array, result?: Plane3dByOriginAndVectors,\n ): Plane3dByOriginAndVectors {\n const w = originW[3];\n result = Plane3dByOriginAndVectors.createXYPlane(result);\n if (Geometry.isSmallMetricDistance(w))\n return result;\n const dw = 1.0 / w;\n const au = vectorUw[3] * dw * dw;\n const av = vectorVw[3] * dw * dw;\n // for homogeneous function X, with w its weight:\n // (X/w) is the cartesian point.\n // (X/w)' = (X' w - X w')/(w*w)\n // = X'/w - (X/w)(w'/w)\n // = X'/w - X w'/w^2)\n // The w parts of the formal xyzw sums are identically 0.\n // Here the X' and its w' are taken from each vectorUw and vectorVw\n result.origin.set(originW[0] * dw, originW[1] * dw, originW[2] * dw);\n Vector3d.createAdd2ScaledXYZ(\n vectorUw[0], vectorUw[1], vectorUw[2], dw, originW[0], originW[1], originW[2], -au, result.vectorU,\n );\n Vector3d.createAdd2ScaledXYZ(\n vectorVw[0], vectorVw[1], vectorVw[2], dw, originW[0], originW[1], originW[2], -av, result.vectorV,\n );\n return result;\n }\n /**\n * Evaluate a point a grid coordinates on the plane.\n * * The computed point is `origin + vectorU * u + vectorV * v`\n * @param u coordinate along vectorU\n * @param v coordinate along vectorV\n * @param result optional result destination.\n * @returns Return the computed coordinate.\n */\n public fractionToPoint(u: number, v: number, result?: Point3d): Point3d {\n return this.origin.plus2Scaled(this.vectorU, u, this.vectorV, v, result);\n }\n /** Return the vector from the plane origin to parametric coordinate (u.v) */\n public fractionToVector(u: number, v: number, result?: Vector3d): Vector3d {\n return Vector3d.createAdd2Scaled(this.vectorU, u, this.vectorV, v, result);\n }\n /** Set coordinates from a json object such as `{origin: [1,2,3], vectorU:[4,5,6], vectorV[3,2,1]}` */\n public setFromJSON(json?: any) {\n if (!json || !json.origin || !json.vectorV) {\n this.origin.set(0, 0, 0);\n this.vectorU.set(1, 0, 0);\n this.vectorV.set(0, 1, 0);\n } else {\n this.origin.setFromJSON(json.origin);\n this.vectorU.setFromJSON(json.vectorU);\n this.vectorV.setFromJSON(json.vectorV);\n }\n }\n /**\n * Convert an Angle to a JSON object.\n * @return {*} [origin,normal]\n */\n public toJSON(): any {\n return {\n origin: this.origin.toJSON(),\n vectorU: this.vectorU.toJSON(),\n vectorV: this.vectorV.toJSON(),\n };\n }\n /** Create a new plane. See `setFromJSON` for layout example. */\n public static fromJSON(json?: any): Plane3dByOriginAndVectors {\n const result = Plane3dByOriginAndVectors.createXYPlane();\n result.setFromJSON(json);\n return result;\n }\n /** Test origin and vectors for isAlmostEqual with `other` */\n public isAlmostEqual(other: Plane3dByOriginAndVectors): boolean {\n return this.origin.isAlmostEqual(other.origin)\n && this.vectorU.isAlmostEqual(other.vectorU)\n && this.vectorV.isAlmostEqual(other.vectorV);\n }\n /**\n * Normalize both `vectorU` and `vectorV` in place. This does NOT make them perpendicular.\n * * Return true if both succeeded.\n */\n public normalizeInPlace(): boolean {\n const okU = this.vectorU.normalizeInPlace();\n const okV = this.vectorV.normalizeInPlace();\n return okU && okV;\n }\n /** Return (if possible) a unit normal to the plane */\n public override getUnitNormal(result?: Vector3d): Vector3d | undefined {\n return this.vectorU.unitCrossProduct(this.vectorV, result);\n }\n /**\n * Return (if possible) a unit normal to the plane.\n * * This method is the same as getUnitNormal, which was created later as part of the abstract base class Plane3d.\n */\n public unitNormal(result?: Vector3d): Vector3d | undefined {\n return this.vectorU.unitCrossProduct(this.vectorV, result);\n }\n /**\n * Return some point on the plane.\n */\n public override getAnyPointOnPlane(result?: Point3d): Point3d {\n // This function returns the plane origin. In general, a point x is on the plane if\n // and only if x = o + a*u + b*v, where a and b are scalars.\n return this.origin.clone(result);\n }\n private static _workVector: Vector3d;\n /** Return (if possible) a ray with origin at plane origin, direction as unit normal to the plane */\n public unitNormalRay(result?: Ray3d): Ray3d | undefined {\n if (!Plane3dByOriginAndVectors._workVector)\n Plane3dByOriginAndVectors._workVector = Vector3d.create();\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV, Plane3dByOriginAndVectors._workVector);\n if (unitNormal === undefined)\n return undefined;\n return Ray3d.create(this.origin, unitNormal, result);\n }\n /**\n * Create a rigid frame (i.e. frenet frame) with\n * * origin at the plane origin\n * * x axis along the (normalized) vectorU\n * * y axis normalized vectorU to vectorV plane, and perpendicular to x axis\n * * z axis perpendicular to both.\n * @param result optional result\n */\n public toRigidFrame(result?: Transform): Transform | undefined {\n return Transform.createRigidFromOriginAndColumns(this.origin, this.vectorU, this.vectorV, AxisOrder.XYZ, result);\n }\n /** Apply the transform to the origin and vectors in place */\n public transformInPlace(transform: Transform) {\n transform.multiplyPoint3d(this.origin, this.origin);\n transform.multiplyVector(this.vectorU, this.vectorU);\n transform.multiplyVector(this.vectorV, this.vectorV);\n }\n /**\n * Return x component of the (normalized!) {vectorU CROSS vectorV}.\n * Return 0 if the cross product is zero.\n */\n public normalX(): number {\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\n return unitNormal !== undefined ? unitNormal.x : 0.0;\n }\n /**\n * Return y component of the (normalized!) {vectorU CROSS vectorV}.\n * Return 0 if the cross product is zero.\n */\n public normalY(): number {\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\n return unitNormal !== undefined ? unitNormal.y : 0.0;\n }\n /**\n * Return z component of the (normalized!) {vectorU CROSS vectorV}.\n * Return 0 if the cross product is zero.\n */\n public normalZ(): number {\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\n return unitNormal !== undefined ? unitNormal.z : 0.0;\n }\n /** Return signed cartesian altitude perpendicular to the plane. This uses the normalized cross product as normal. */\n public altitude(xyz: XYAndZ): number {\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\n if (unitNormal === undefined)\n return 0.0;\n return Geometry.dotProductXYZXYZ(\n (xyz.x - this.origin.x), (xyz.y - this.origin.y), (xyz.z - this.origin.z),\n unitNormal.x, unitNormal.y, unitNormal.z);\n }\n /** Return signed cartesian altitude perpendicular to the plane. This uses the normalized cross product as normal. */\n public altitudeXYZ(x: number, y: number, z: number): number {\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\n if (unitNormal === undefined)\n return 0.0;\n return Geometry.dotProductXYZXYZ(\n (x - this.origin.x), (y - this.origin.y), (z - this.origin.z),\n unitNormal.x, unitNormal.y, unitNormal.z);\n }\n /** Return signed projection of the input vector to the plane normal. This uses the normalized cross product as normal. */\n public velocity(xyzVector: XYAndZ): number {\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\n if (unitNormal === undefined)\n return 0.0;\n return Geometry.dotProductXYZXYZ(\n xyzVector.x, xyzVector.y, xyzVector.z,\n unitNormal.x, unitNormal.y, unitNormal.z);\n }\n /** Return signed projection of the input vector to the plane normal. This uses the normalized cross product as normal. */\n public velocityXYZ(x: number, y: number, z: number): number {\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\n if (unitNormal === undefined)\n return 0.0;\n return Geometry.dotProductXYZXYZ(\n x, y, z,\n unitNormal.x, unitNormal.y, unitNormal.z);\n }\n /**\n * Return triple product of homogeneous difference {(xyzw - w * origin)} with vectorU and vectorV.\n * * In the usual manner of homogeneous calculations, this is proportional to true cartesian distance from the\n * plane but is not a physical distance.\n */\n public weightedAltitude(xyzw: Point4d) {\n const w = xyzw.w;\n return Geometry.tripleProduct(\n (xyzw.x - this.origin.x * w), (xyzw.y - this.origin.y * w), (xyzw.z - this.origin.z * w),\n this.vectorU.x, this.vectorU.y, this.vectorU.z,\n this.vectorV.x, this.vectorV.y, this.vectorV.z);\n }\n /**\n * Return the projection of spacePoint onto the plane.\n * If the plane is degenerate to a ray, project to the ray.\n * If the plane is degenerate to its origin, return the point\n */\n public projectPointToPlane(spacePoint: Point3d, result?: Point3d): Point3d {\n const unitNormal = this.vectorU.unitCrossProduct(this.vectorV);\n if (unitNormal !== undefined) {\n const w = unitNormal.dotProductStartEnd(this.origin, spacePoint);\n return spacePoint.plusScaled(unitNormal, -w, result);\n }\n // uh oh. vectorU and vectorV are colinear or zero.\n // project to ray defined by the longer one, or just to origin.\n const dotUU = this.vectorU.magnitudeSquared();\n const dotVV = this.vectorV.magnitudeSquared();\n if (dotUU >= dotVV) {\n const dotUW = this.vectorU.dotProductStartEnd(this.origin, spacePoint);\n const f = Geometry.conditionalDivideCoordinate(dotUW, dotUU, 0.0);\n if (f !== undefined)\n return spacePoint.plusScaled(this.vectorU, f, result);\n } else {\n const dotVW = this.vectorV.dotProductStartEnd(this.origin, spacePoint);\n const f = Geometry.conditionalDivideCoordinate(dotVW, dotVV, 0.0);\n if (f !== undefined)\n return spacePoint.plusScaled(this.vectorV, f, result);\n }\n return this.origin.clone(result);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Point2dArrayCarrier.js","sourceRoot":"","sources":["../../../src/geometry3d/Point2dArrayCarrier.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,mEAAmE;;;AAEnE,+DAA4D;AAC5D,uDAA0D;AAG1D;;;;;;EAME;AACF,MAAa,mBAAoB,SAAQ,yCAAmB;IAG1D,wCAAwC;IACxC,YAAmB,IAAe;QAChC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IACD,8BAA8B;IACvB,YAAY,CAAC,KAAa;QAC/B,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;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,SAAS,CAAC;IACnB,CAAC;IAED;;;;;;;OAOG;IACa,2BAA2B,CAAC,MAAa,EAAE,MAAc,EAAE,MAAc;QACvF,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;YACxD,OAAO,oBAAE,CAAC,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/E,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;;;;OAOG;IACa,2BAA2B,CAAC,WAAmB,EAAE,MAAc,EAAE,MAAc;QAC7F,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;YAC1F,OAAO,oBAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/F,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,8DAA8D;IAC9D,IAAoB,MAAM;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACa,yBAAyB,CAAC,UAAkB;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;IAED;;;OAGG;IACa,yBAAyB,CAAC,UAAkB;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;CACF;AA9GD,kDA8GC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"Point2dArrayCarrier.js","sourceRoot":"","sources":["../../../src/geometry3d/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AAI,CAAC,MAAM,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACa,yBAAyB,CAAC,UAAkB;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;IAED;;;OAGG;IACa,yBAAyB,CAAC,UAAkB;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;CACF;AA9GD,kDA8GC","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 */\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\n\nimport { IndexedXYCollection } from \"./IndexedXYCollection\";\nimport { Point2d, Vector2d, XY } from \"./Point2dVector2d\";\nimport { XAndY } from \"./XYZProps\";\n\n/**\n * Helper object to access members of a Point2d[] in geometric calculations.\n * * The collection holds only a reference to the actual array.\n * * The actual array may be replaced by the user as needed.\n * * When replaced, there is no cached data to be updated.\n * @public\n*/\nexport class Point2dArrayCarrier extends IndexedXYCollection {\n /** reference to array being queried. */\n public data: Point2d[];\n /** CAPTURE caller supplied array ... */\n public constructor(data: Point2d[]) {\n super();\n this.data = data;\n }\n /** test if index is valid */\n public isValidIndex(index: number): boolean {\n return index >= 0 && index < this.data.length;\n }\n /**\n * Access by index, returning strongly typed Point2d\n * * This returns the xy value but NOT reference to the point in the \"carried\" array.\n * @param index index of point within the array\n * @param result caller-allocated destination\n * @returns undefined if the index is out of bounds\n */\n public override getPoint2dAtCheckedPointIndex(index: number, result?: Point2d): Point2d | undefined {\n if (this.isValidIndex(index)) {\n const source = this.data[index];\n return Point2d.create(source.x, source.y, result);\n }\n return undefined;\n }\n /**\n * Access by index, returning strongly typed Vector2d\n * @param index index of point within the array\n * @param result caller-allocated destination\n * @returns undefined if the index is out of bounds\n */\n public override getVector2dAtCheckedVectorIndex(index: number, result?: Vector2d): Vector2d | undefined {\n if (this.isValidIndex(index)) {\n const source = this.data[index];\n return Vector2d.create(source.x, source.y, result);\n }\n return undefined;\n }\n /**\n * Return a vector from the point at indexA to the point at indexB\n * @param indexA index of point within the array\n * @param indexB index of point within the array\n * @param result caller-allocated vector.\n * @returns undefined if either index is out of bounds\n */\n public override vectorIndexIndex(indexA: number, indexB: number, result?: Vector2d): Vector2d | undefined {\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\n return Vector2d.createStartEnd(this.data[indexA], this.data[indexB], result);\n return undefined;\n }\n /**\n * Return a vector from given origin to point at indexB\n * @param origin origin for vector\n * @param indexB index of point within the array\n * @param result caller-allocated vector.\n * @returns undefined if index is out of bounds\n */\n public override vectorXAndYIndex(origin: XAndY, indexB: number, result?: Vector2d): Vector2d | undefined {\n if (this.isValidIndex(indexB))\n return Vector2d.createStartEnd(origin, this.data[indexB], result);\n return undefined;\n }\n\n /**\n * Return the cross product of vectors from origin to points at indexA and indexB\n * @param origin origin for vector\n * @param indexA index of first target within the array\n * @param indexB index of second target within the array\n * @param result caller-allocated vector.\n * @returns undefined if either index is out of bounds\n */\n public override crossProductXAndYIndexIndex(origin: XAndY, indexA: number, indexB: number): number | undefined {\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\n return XY.crossProductToPoints(origin, this.data[indexA], this.data[indexB]);\n return undefined;\n }\n /**\n * Return the cross product of vectors from point at originIndex to points at indexA and indexB\n * @param originIndex index of origin\n * @param indexA index of first target within the array\n * @param indexB index of second target within the array\n * @param result caller-allocated vector.\n * @returns return true if indexA, indexB both valid\n */\n public override crossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number): number | undefined {\n if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))\n return XY.crossProductToPoints(this.data[originIndex], this.data[indexA], this.data[indexB]);\n return undefined;\n }\n /** Read-only property for number of XYZ in the collection. */\n public override get length(): number {\n return this.data.length;\n }\n\n /**\n * Get x coordinate by point index, with no index checking\n * @param pointIndex index to access\n */\n public override getXAtUncheckedPointIndex(pointIndex: number): number {\n return this.data[pointIndex].x;\n }\n\n /**\n * Get y coordinate by point index, with no index checking\n * @param pointIndex index to access\n */\n public override getYAtUncheckedPointIndex(pointIndex: number): number {\n return this.data[pointIndex].y;\n }\n}\n"]}
|
|
@@ -97,13 +97,13 @@ export declare class Point2d extends XY implements BeJSONFunctions {
|
|
|
97
97
|
/** Create a Point2d with both coordinates zero. */
|
|
98
98
|
static createZero(result?: Point2d): Point2d;
|
|
99
99
|
/**
|
|
100
|
-
* Starting at this point, move along vector by tangentFraction of
|
|
101
|
-
*
|
|
102
|
-
* @param tangentFraction distance to move along
|
|
103
|
-
* @param leftFraction distance to move perpendicular to
|
|
100
|
+
* Starting at this point, move along `vector` by `tangentFraction` of its length, and then
|
|
101
|
+
* by `leftFraction` of its length along the left perpendicular.
|
|
102
|
+
* @param tangentFraction distance to move along `vector`, as a fraction of its length
|
|
103
|
+
* @param leftFraction distance to move perpendicular to `vector`, as a fraction of its length
|
|
104
104
|
* @param vector the other vector
|
|
105
105
|
*/
|
|
106
|
-
addForwardLeft(tangentFraction: number, leftFraction: number, vector: Vector2d): Point2d;
|
|
106
|
+
addForwardLeft(tangentFraction: number, leftFraction: number, vector: Vector2d, result?: Point2d): Point2d;
|
|
107
107
|
/**
|
|
108
108
|
* Interpolate at tangentFraction between this instance and point, and then Move by leftFraction
|
|
109
109
|
* along the xy perpendicular of the vector between the points.
|
|
@@ -197,11 +197,10 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
197
197
|
/** Return a unit vector in direction of this instance (undefined if this instance has near zero length) */
|
|
198
198
|
normalize(result?: Vector2d): Vector2d | undefined;
|
|
199
199
|
/**
|
|
200
|
-
* Return fractional projection of
|
|
201
|
-
* * It's returning the signed projection magnitude divided by the target magnitude. In other words,
|
|
202
|
-
* it's returning the length of the projection as a fraction of the target magnitude.
|
|
200
|
+
* Return fractional length of the projection of the instance onto the target vector.
|
|
203
201
|
* @param target the target vector
|
|
204
|
-
* @param defaultFraction the returned value in case magnitude
|
|
202
|
+
* @param defaultFraction the returned value in case the magnitude of `target` is too small
|
|
203
|
+
* @returns the signed length of the projection divided by the length of `target`
|
|
205
204
|
*/
|
|
206
205
|
fractionOfProjectionToVector(target: Vector2d, defaultFraction?: number): number;
|
|
207
206
|
/** Return a new vector with components negated from this instance. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Point2dVector2d.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/Point2dVector2d.ts"],"names":[],"mappings":"AAKA;;GAEG;AAIH,OAAO,EAAE,eAAe,EAAY,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;GAOG;AACH,qBAAa,EAAG,YAAW,KAAK;IAC9B,kBAAkB;IACX,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB;IACX,CAAC,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACjB,GAAG,CAAC,CAAC,GAAE,MAAU,EAAE,CAAC,GAAE,MAAU;IAIvC,+BAA+B;IACxB,OAAO;IAId,SAAS,aAAa,CAAC,GAAE,MAAU,EAAE,CAAC,GAAE,MAAU;IAIlD,mCAAmC;IAC5B,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK;IAS5B,8CAA8C;IACvC,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC;IAG/B,+FAA+F;IACxF,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO;IAGzD,+FAA+F;IACxF,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO;IAGnE,qCAAqC;IAC9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,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ;IAMlJ,4BAA4B;IACrB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ;IAMxD,iEAAiE;IAC1D,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS;IAM7E,kDAAkD;IAC3C,UAAU,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM;IAGzC,oDAAoD;IAC7C,kBAAkB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,MAAM;IAG/D,gDAAgD;IACzC,YAAY,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM;IAG3C;;;OAGG;IACI,SAAS,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM;IAGxC;;;OAGG;IACI,OAAO,CAAC,OAAO,EAAE,KAAK,GAAG,KAAK;IAGrC;;;;;;;OAOG;IACI,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,kBAAkB,GAAE,OAAe,EACtE,gCAAgC,GAAE,OAAe,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO;IAgB5F;;;;;;;OAOG;IACI,iBAAiB,CACtB,KAAK,EAAE,QAAQ,EAAE,gCAAgC,GAAE,OAAe,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAChG,OAAO;CAUX"}
|
|
@@ -206,16 +206,16 @@ class Point2d extends XY {
|
|
|
206
206
|
return Point2d.create(0, 0, result);
|
|
207
207
|
}
|
|
208
208
|
/**
|
|
209
|
-
* Starting at this point, move along vector by tangentFraction of
|
|
210
|
-
*
|
|
211
|
-
* @param tangentFraction distance to move along
|
|
212
|
-
* @param leftFraction distance to move perpendicular to
|
|
209
|
+
* Starting at this point, move along `vector` by `tangentFraction` of its length, and then
|
|
210
|
+
* by `leftFraction` of its length along the left perpendicular.
|
|
211
|
+
* @param tangentFraction distance to move along `vector`, as a fraction of its length
|
|
212
|
+
* @param leftFraction distance to move perpendicular to `vector`, as a fraction of its length
|
|
213
213
|
* @param vector the other vector
|
|
214
214
|
*/
|
|
215
|
-
addForwardLeft(tangentFraction, leftFraction, vector) {
|
|
215
|
+
addForwardLeft(tangentFraction, leftFraction, vector, result) {
|
|
216
216
|
const dx = vector.x;
|
|
217
217
|
const dy = vector.y;
|
|
218
|
-
return Point2d.create(this.x + tangentFraction * dx - leftFraction * dy, this.y + tangentFraction * dy + leftFraction * dx);
|
|
218
|
+
return Point2d.create(this.x + tangentFraction * dx - leftFraction * dy, this.y + tangentFraction * dy + leftFraction * dx, result);
|
|
219
219
|
}
|
|
220
220
|
/**
|
|
221
221
|
* Interpolate at tangentFraction between this instance and point, and then Move by leftFraction
|
|
@@ -400,11 +400,10 @@ class Vector2d extends XY {
|
|
|
400
400
|
return this.safeDivideOrNull(mag, result);
|
|
401
401
|
}
|
|
402
402
|
/**
|
|
403
|
-
* Return fractional projection of
|
|
404
|
-
* * It's returning the signed projection magnitude divided by the target magnitude. In other words,
|
|
405
|
-
* it's returning the length of the projection as a fraction of the target magnitude.
|
|
403
|
+
* Return fractional length of the projection of the instance onto the target vector.
|
|
406
404
|
* @param target the target vector
|
|
407
|
-
* @param defaultFraction the returned value in case magnitude
|
|
405
|
+
* @param defaultFraction the returned value in case the magnitude of `target` is too small
|
|
406
|
+
* @returns the signed length of the projection divided by the length of `target`
|
|
408
407
|
*/
|
|
409
408
|
fractionOfProjectionToVector(target, defaultFraction) {
|
|
410
409
|
/*
|