@itwin/core-geometry 5.2.0-dev.24 → 5.2.0-dev.25
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 +6 -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.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.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.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.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- 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/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/CurveTypes.js.map +1 -1
- package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/cjs/curve/GeometryQuery.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/OffsetOptions.js.map +1 -1
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/PointString3d.js.map +1 -1
- 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.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
- 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/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.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/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
- 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.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.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.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.js.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
- 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.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +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.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.js.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.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.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.js.map +1 -1
- package/lib/cjs/numerics/Quadrature.js.map +1 -1
- package/lib/cjs/numerics/Range1dArray.js.map +1 -1
- package/lib/cjs/numerics/SmallSystem.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.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- 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.js.map +1 -1
- package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +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.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- 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.js.map +1 -1
- package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -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.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/serialization/SerializationHelpers.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.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js.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.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.js.map +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.js.map +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.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.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.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.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.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.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.js.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/esm/core-geometry.js.map +1 -1
- 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/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveExtendMode.js.map +1 -1
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/CurveTypes.js.map +1 -1
- package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/esm/curve/GeometryQuery.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/OffsetOptions.js.map +1 -1
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/PointString3d.js.map +1 -1
- 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.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
- 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/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.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/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
- 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.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.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.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.js.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
- 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.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js.map +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.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Plane3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.js.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.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.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.js.map +1 -1
- package/lib/esm/numerics/Quadrature.js.map +1 -1
- package/lib/esm/numerics/Range1dArray.js.map +1 -1
- package/lib/esm/numerics/SmallSystem.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.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
- package/lib/esm/polyface/Polyface.js.map +1 -1
- 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.js.map +1 -1
- package/lib/esm/polyface/RangeLengthData.js.map +1 -1
- package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -1
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +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.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- 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.js.map +1 -1
- package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -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.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/serialization/SerializationHelpers.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.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.js.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.js.map +1 -1
- package/lib/esm/solid/TorusPipe.js.map +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.js.map +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.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.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.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Point2dVector2d.js","sourceRoot":"","sources":["../../../src/geometry3d/Point2dVector2d.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAmB,QAAQ,EAAuB,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,KAAK,EAA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;QACf,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACvC,4DAA4D;QAC5D,qCAAqC;QACrC,4CAA4C;QAC5C,OAAO,KAAK,GAAG,KAAK,IAAI,gBAAgB,GAAG,EAAE,GAAG,EAAE,CAAC;IACrD,CAAC;IACD;;;;;;;OAOG;IACI,iBAAiB,CACtB,KAAe,EAAE,mCAA4C,KAAK,EAAE,OAA6B;QAEjG,MAAM,gBAAgB,GAAW,OAAO,EAAE,gBAAgB,IAAI,QAAQ,CAAC,wBAAwB,CAAC;QAChG,MAAM,kBAAkB,GAAW,OAAO,EAAE,kBAAkB,IAAI,QAAQ,CAAC,0BAA0B,CAAC;QACtG,MAAM,EAAE,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACnC,MAAM,EAAE,GAAG,KAAK,CAAC,gBAAgB,EAAE,CAAC;QACpC,IAAI,EAAE,GAAG,kBAAkB,IAAI,EAAE,GAAG,kBAAkB;YACpD,OAAO,gCAAgC,CAAC;QAC1C,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,EAAE,GAAG,EAAE,IAAI,gBAAgB,GAAG,EAAE,GAAG,EAAE,CAAC;IAC/C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module CartesianGeometry\n */\n\nimport { BeJSONFunctions, Geometry, PerpParallelOptions } from \"../Geometry\";\nimport { Angle } from \"./Angle\";\nimport { XAndY, XYProps } from \"./XYZProps\";\n\n/**\n * Minimal object containing x,y and operations that are meaningful without change in both point and vector.\n * * `XY` is not instantiable.\n * * The derived (instantiable) classes are\n * * `Point2d`\n * * `Vector2d`\n * @public\n */\nexport class XY implements XAndY {\n /** x component */\n public x: number;\n /** y component */\n public y: number;\n /** Set both x and y. */\n public set(x: number = 0, y: number = 0) {\n this.x = x;\n this.y = y;\n }\n /** Set both x and y to zero */\n public setZero() {\n this.x = 0;\n this.y = 0;\n }\n protected constructor(x: number = 0, y: number = 0) {\n this.x = x;\n this.y = y;\n }\n /** Set both x and y from other. */\n public setFrom(other?: XAndY) {\n if (other) {\n this.x = other.x;\n this.y = other.y;\n } else {\n this.x = 0;\n this.y = 0;\n }\n }\n /** Freeze this instance so it is read-only */\n public freeze(): Readonly<this> {\n return Object.freeze(this);\n }\n /** Returns true if this and other have equal x,y parts within Geometry.smallMetricDistance. */\n public isAlmostEqual(other: XAndY, tol?: number): boolean {\n return Geometry.isSameCoordinate(this.x, other.x, tol) && Geometry.isSameCoordinate(this.y, other.y, tol);\n }\n /** Returns true if this and other have equal x,y parts within Geometry.smallMetricDistance. */\n public isAlmostEqualXY(x: number, y: number, tol?: number): boolean {\n return Geometry.isSameCoordinate(this.x, x, tol) && Geometry.isSameCoordinate(this.y, y, tol);\n }\n /** Return a json array `[x,y]` */\n public toJSON(): XYProps {\n return [this.x, this.y];\n }\n /** Return a json object `{x: 1, y:2}` */\n public toJSONXY(): XYProps {\n return { x: this.x, y: this.y };\n }\n /**\n * Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`\n * * If no JSON input is provided, 0 would be used as default values for x and y.\n * @param json the JSON input\n */\n public setFromJSON(json?: XYProps): void {\n if (Array.isArray(json)) {\n this.set(json[0] || 0, json[1] || 0);\n return;\n }\n if (json) {\n this.set(json.x || 0, json.y || 0);\n return;\n }\n this.set(0, 0);\n }\n /** Return the distance from this point to other */\n public distance(other: XAndY): number {\n const xDist = other.x - this.x;\n const yDist = other.y - this.y;\n return Math.sqrt(xDist * xDist + yDist * yDist);\n }\n /** Return squared distance from this point to other */\n public distanceSquared(other: XAndY): number {\n const xDist = other.x - this.x;\n const yDist = other.y - this.y;\n return xDist * xDist + yDist * yDist;\n }\n /** Return the largest absolute distance between corresponding components */\n public maxDiff(other: XAndY): number {\n return Math.max(Math.abs(this.x - other.x), Math.abs(this.y - other.y));\n }\n /** Return the x,y component corresponding to 0,1 */\n public at(index: number): number {\n if (index < 0.5)\n return this.x;\n return this.y;\n }\n /** Set value at index 0 or 1 */\n public setAt(index: number, value: number): void {\n if (index < 0.5)\n this.x = value;\n else\n this.y = value;\n }\n /** Return the index (0,1) of the x,y component with largest absolute value */\n public indexOfMaxAbs(): number {\n let index = 0;\n const a = Math.abs(this.x);\n const b = Math.abs(this.y);\n if (b > a) {\n index = 1;\n }\n return index;\n }\n /** Returns true if the x,y components are both small by metric metric tolerance */\n public get isAlmostZero(): boolean {\n return Geometry.isSmallMetricDistance(this.x) && Geometry.isSmallMetricDistance(this.y);\n }\n /** Return true if the x and y components are all exactly zero */\n public get isZero(): boolean {\n return this.x === 0.0 && this.y === 0.0;\n }\n /** Return the largest absolute value of any component */\n public maxAbs(): number {\n return Math.max(Math.abs(this.x), Math.abs(this.y));\n }\n /** Return the magnitude of the vector */\n public magnitude(): number {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }\n /** Return the squared magnitude of the vector. */\n public magnitudeSquared(): number {\n return this.x * this.x + this.y * this.y;\n }\n /** Returns true if the x,y components are exactly equal. */\n public isExactEqual(other: XAndY): boolean {\n return this.x === other.x && this.y === other.y;\n }\n /** Returns true if x,y match `other` within metric tolerance */\n public isAlmostEqualMetric(other: XAndY, distanceTol: number = Geometry.smallMetricDistance): boolean {\n return this.maxDiff(other) <= distanceTol;\n }\n /** Return a (full length) vector from this point to other */\n public vectorTo(other: XAndY, result?: Vector2d): Vector2d {\n return Vector2d.create(\n other.x - this.x,\n other.y - this.y,\n result);\n }\n /** Return a unit vector from this point to other */\n public unitVectorTo(other: XAndY, result?: Vector2d): Vector2d | undefined {\n return this.vectorTo(other, result).normalize(result);\n }\n /** Cross product of vectors from origin to targets */\n public static crossProductToPoints(origin: XAndY, targetA: XAndY, targetB: XAndY): number {\n return Geometry.crossProductXYXY(\n targetA.x - origin.x, targetA.y - origin.y, targetB.x - origin.x, targetB.y - origin.y);\n }\n}\n\n/** 2D point with `x`,`y` as properties\n * @public\n */\nexport class Point2d extends XY implements BeJSONFunctions {\n /** Constructor for Point2d */\n constructor(x: number = 0, y: number = 0) {\n super(x, y);\n }\n /** Return a new Point2d with x,y coordinates from this. */\n public clone(result?: Point2d): Point2d {\n return Point2d.create(this.x, this.y, result);\n }\n /**\n * Return a point (newly created unless result provided) with given x,y coordinates\n * @param x x coordinate\n * @param y y coordinate\n * @param result optional result\n */\n public static create(x: number = 0, y: number = 0, result?: Point2d): Point2d {\n if (result) {\n result.x = x;\n result.y = y;\n return result;\n }\n return new Point2d(x, y);\n }\n /**\n * Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`\n * * If no JSON input is provided, 0 would be used as default values for x and y.\n * @param json the JSON input\n */\n public static fromJSON(json?: XYProps): Point2d {\n const val = new Point2d();\n val.setFromJSON(json);\n return val;\n }\n /** Create (or optionally reuse) a Point2d from another object with fields x and y */\n public static createFrom(xy: XAndY | undefined, result?: Point2d): Point2d {\n if (xy)\n return Point2d.create(xy.x, xy.y, result);\n return Point2d.create(0, 0, result);\n }\n /** Create a Point2d with both coordinates zero. */\n public static createZero(result?: Point2d): Point2d {\n return Point2d.create(0, 0, result);\n }\n /**\n * Starting at this point, move along `vector` by `tangentFraction` of its length, and then\n * by `leftFraction` of its length along the left perpendicular.\n * @param tangentFraction distance to move along `vector`, as a fraction of its length\n * @param leftFraction distance to move perpendicular to `vector`, as a fraction of its length\n * @param vector the other vector\n */\n public addForwardLeft(tangentFraction: number, leftFraction: number, vector: Vector2d, result?: Point2d): Point2d {\n const dx = vector.x;\n const dy = vector.y;\n return Point2d.create(\n this.x + tangentFraction * dx - leftFraction * dy,\n this.y + tangentFraction * dy + leftFraction * dx,\n result,\n );\n }\n /**\n * Interpolate at tangentFraction between this instance and point, and then Move by leftFraction\n * along the xy perpendicular of the vector between the points.\n */\n public forwardLeftInterpolate(tangentFraction: number, leftFraction: number, point: XAndY): Point2d {\n const dx = point.x - this.x;\n const dy = point.y - this.y;\n return Point2d.create(\n this.x + tangentFraction * dx - leftFraction * dy,\n this.y + tangentFraction * dy + leftFraction * dx,\n );\n }\n /** Return a point interpolated between this point and the right param. */\n public interpolate(fraction: number, other: XAndY, result?: Point2d): Point2d {\n if (fraction <= 0.5)\n return Point2d.create(\n this.x + fraction * (other.x - this.x),\n this.y + fraction * (other.y - this.y),\n result,\n );\n const t: number = fraction - 1.0;\n return Point2d.create(\n other.x + t * (other.x - this.x),\n other.y + t * (other.y - this.y),\n result,\n );\n }\n /** Return a point with independent x,y fractional interpolation. */\n public interpolateXY(fractionX: number, fractionY: number, other: XAndY, result?: Point2d): Point2d {\n return Point2d.create(\n Geometry.interpolate(this.x, fractionX, other.x),\n Geometry.interpolate(this.y, fractionY, other.y),\n result,\n );\n }\n /** Return this point minus vector */\n public minus(vector: XAndY, result?: Point2d): Point2d {\n return Point2d.create(\n this.x - vector.x,\n this.y - vector.y,\n result,\n );\n }\n /** Return point plus vector */\n public plus(vector: XAndY, result?: Point2d): Point2d {\n return Point2d.create(\n this.x + vector.x,\n this.y + vector.y,\n result,\n );\n }\n /** Return point plus vector */\n public plusXY(dx: number = 0, dy: number = 0, result?: Point2d): Point2d {\n return Point2d.create(\n this.x + dx,\n this.y + dy, result,\n );\n }\n /** Return point + vector * scalar */\n public plusScaled(vector: XAndY, scaleFactor: number, result?: Point2d): Point2d {\n return Point2d.create(\n this.x + vector.x * scaleFactor,\n this.y + vector.y * scaleFactor,\n result,\n );\n }\n /** Return point + vectorA * scalarA + vectorB * scalarB */\n public plus2Scaled(vectorA: XAndY, scalarA: number, vectorB: XAndY, scalarB: number, result?: Point2d): Point2d {\n return Point2d.create(\n this.x + vectorA.x * scalarA + vectorB.x * scalarB,\n this.y + vectorA.y * scalarA + vectorB.y * scalarB,\n result,\n );\n }\n /** Return point + vectorA * scalarA + vectorB * scalarB + vectorC * scalarC */\n public plus3Scaled(vectorA: XAndY, scalarA: number, vectorB: XAndY, scalarB: number,\n vectorC: XAndY, scalarC: number, result?: Point2d): Point2d {\n return Point2d.create(\n this.x + vectorA.x * scalarA + vectorB.x * scalarB + vectorC.x * scalarC,\n this.y + vectorA.y * scalarA + vectorB.y * scalarB + vectorC.y * scalarC,\n result,\n );\n }\n /** Multiply the x, y parts by scale. */\n public scaleInPlace(scale: number) {\n this.x *= scale;\n this.y *= scale;\n }\n /**\n * Return the dot product of vector from this to targetA and vector from this to targetB\n * @param targetA target of first vector\n * @param targetB target of second vector\n */\n public dotVectorsToTargets(targetA: XAndY, targetB: XAndY): number {\n return (targetA.x - this.x) * (targetB.x - this.x) + (targetA.y - this.y) * (targetB.y - this.y);\n }\n /**\n * Returns the (scalar) cross product of vector from this to targetA and vector from this to targetB\n * @param target1 target of first vector\n * @param target2 target of second vector\n */\n public crossProductToPoints(target1: XAndY, target2: XAndY): number {\n const x1 = target1.x - this.x;\n const y1 = target1.y - this.y;\n const x2 = target2.x - this.x;\n const y2 = target2.y - this.y;\n return x1 * y2 - y1 * x2;\n }\n /**\n * Return the fractional coordinate of the projection of this instance x,y onto the\n * line from startPoint to endPoint.\n * @param startPoint start point of line\n * @param endPoint end point of line\n * @param defaultFraction fraction to return if startPoint and endPoint are equal.\n */\n public fractionOfProjectionToLine(startPoint: Point2d, endPoint: Point2d, defaultFraction: number = 0): number {\n const denominator = startPoint.distanceSquared(endPoint);\n if (denominator < Geometry.smallMetricDistanceSquared)\n return defaultFraction;\n const numerator = startPoint.dotVectorsToTargets(endPoint, this);\n return numerator / denominator;\n }\n}\n\n/**\n * 2D vector with `x`,`y` as properties\n * @public\n */\nexport class Vector2d extends XY implements BeJSONFunctions {\n constructor(x: number = 0, y: number = 0) {\n super(x, y);\n }\n /** Return a new Vector2d with the same x,y */\n public clone(result?: Vector2d): Vector2d {\n return Vector2d.create(this.x, this.y, result);\n }\n /** Return a new Vector2d with given x and y */\n public static create(x: number = 0, y: number = 0, result?: Vector2d): Vector2d {\n if (result) {\n result.x = x;\n result.y = y;\n return result;\n }\n return new Vector2d(x, y);\n }\n /**\n * Return a (new) Vector2d with components scale,0\n * If scale is not given default value 1 is used.\n */\n public static unitX(scale: number = 1): Vector2d {\n return new Vector2d(scale, 0);\n }\n /**\n * Return a (new) Vector2d with components 0,scale\n * If scale is not given default value 1 is used.\n */\n public static unitY(scale: number = 1): Vector2d {\n return new Vector2d(0, scale);\n }\n /** Return a Vector2d with components 0,0 */\n public static createZero(result?: Vector2d): Vector2d {\n return Vector2d.create(0, 0, result);\n }\n /** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d, or leading entries of Float64Array */\n public static createFrom(data: XAndY | Float64Array, result?: Vector2d): Vector2d {\n if (data instanceof Float64Array) {\n if (data.length >= 2)\n return Vector2d.create(data[0], data[1]);\n if (data.length >= 1)\n return Vector2d.create(data[0], 0);\n return Vector2d.create(0, 0);\n }\n return Vector2d.create(data.x, data.y, result);\n }\n /**\n * Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`\n * * If no JSON input is provided, 0 would be used as default values for x and y.\n * @param json the JSON input\n */\n public static fromJSON(json?: XYProps): Vector2d {\n const val = new Vector2d();\n val.setFromJSON(json);\n return val;\n }\n /** Return a new Vector2d from polar coordinates for radius and Angle from x axis */\n public static createPolar(r: number, theta: Angle): Vector2d {\n return Vector2d.create(r * theta.cos(), r * theta.sin());\n }\n /** Return a new Vector2d extending from point0 to point1 */\n public static createStartEnd(point0: XAndY, point1: XAndY, result?: Vector2d): Vector2d {\n return Vector2d.create(point1.x - point0.x, point1.y - point0.y, result);\n }\n /**\n * Return a vector that bisects the angle between two normals and extends to the intersection of two offset lines\n * * returns `undefined` if `unitPerpA = -unitPerpB` (i.e., are opposite)\n * * math details can be found at docs/learning/geometry/PointVector.md\n * @param unitPerpA unit perpendicular to incoming direction\n * @param unitPerpB unit perpendicular to outgoing direction\n * @param offset offset distance\n */\n public static createOffsetBisector(unitPerpA: Vector2d, unitPerpB: Vector2d, offset: number): Vector2d | undefined {\n let bisector: Vector2d | undefined = unitPerpA.plus(unitPerpB);\n bisector = bisector.normalize();\n if (bisector) {\n const c = bisector.dotProduct(unitPerpA);\n bisector.scale(offset, bisector);\n return bisector.safeDivideOrNull(c);\n }\n return undefined;\n }\n /**\n * Return a (new or optionally reused) vector which is `this` divided by `denominator`\n * * return undefined if denominator is zero.\n */\n public safeDivideOrNull(denominator: number, result?: Vector2d): Vector2d | undefined {\n if (denominator !== 0.0) {\n return this.scale(1.0 / denominator, result);\n }\n return undefined;\n }\n /** Return a unit vector in direction of this instance (undefined if this instance has near zero length) */\n public normalize(result?: Vector2d): Vector2d | undefined {\n const mag = Geometry.correctSmallFraction(this.magnitude());\n result = result ? result : new Vector2d();\n return this.safeDivideOrNull(mag, result);\n }\n /**\n * Return fractional length of the projection of the instance onto the target vector.\n * @param target the target vector\n * @param defaultFraction the returned value in case the magnitude of `target` is too small\n * @returns the signed length of the projection divided by the length of `target`\n */\n public fractionOfProjectionToVector(target: Vector2d, defaultFraction?: number): number {\n /*\n * projection length is (this.target)/||target||\n * but here we return (this.target)/||target||^2\n */\n const denominator = target.magnitudeSquared();\n if (denominator < Geometry.smallMetricDistanceSquared)\n return defaultFraction ? defaultFraction : 0;\n const numerator = this.dotProduct(target);\n return numerator / denominator;\n }\n /** Return a new vector with components negated from this instance. */\n public negate(result?: Vector2d): Vector2d {\n result = result ? result : new Vector2d();\n result.x = -this.x;\n result.y = -this.y;\n return result;\n }\n /** Return a vector same length as this but rotated 90 degrees counter clockwise */\n public rotate90CCWXY(result?: Vector2d): Vector2d {\n result = result ? result : new Vector2d();\n // save x,y to allow aliasing (\"this\" can be passed to the function as \"result\")\n const xx: number = this.x;\n const yy: number = this.y;\n result.x = -yy;\n result.y = xx;\n return result;\n }\n /** Return a vector same length as this but rotated 90 degrees clockwise */\n public rotate90CWXY(result?: Vector2d): Vector2d {\n result = result ? result : new Vector2d();\n // save x,y to allow aliasing (\"this\" can be passed to the function as \"result\")\n const xx: number = this.x;\n const yy: number = this.y;\n result.x = yy;\n result.y = -xx;\n return result;\n }\n /** Return a unit vector perpendicular to this instance. */\n public unitPerpendicularXY(result?: Vector2d): Vector2d {\n result = result ? result : new Vector2d();\n const xx: number = this.x;\n const yy: number = this.y;\n // save x,y to allow aliasing (\"this\" can be passed to the function as \"result\")\n result.x = -yy;\n result.y = xx;\n const d2: number = xx * xx + yy * yy;\n if (d2 !== 0.0) {\n const a = 1.0 / Math.sqrt(d2);\n result.x *= a;\n result.y *= a;\n }\n return result;\n }\n /** Return a new Vector2d rotated CCW by given angle */\n public rotateXY(angle: Angle, result?: Vector2d): Vector2d {\n const s = angle.sin();\n const c = angle.cos();\n // save x,y to allow aliasing (\"this\" can be passed to the function as \"result\")\n const xx: number = this.x;\n const yy: number = this.y;\n result = result ? result : new Vector2d();\n result.x = xx * c - yy * s;\n result.y = xx * s + yy * c;\n return result;\n }\n /**\n * Return a vector computed at fractional position between this vector and vectorB\n * @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`.\n * True fractions are \"between\", negatives are \"before this\", beyond 1 is \"beyond vectorB\".\n * @param vectorB second vector\n * @param result optional preallocated result.\n */\n public interpolate(fraction: number, vectorB: Vector2d, result?: Vector2d): Vector2d {\n result = result ? result : new Vector2d();\n /*\n * For best last-bit behavior, if fraction is below 0.5, use this as base point.\n * If above 0.5, use vectorB as base point.\n */\n if (fraction <= 0.5) {\n result.x = this.x + fraction * (vectorB.x - this.x);\n result.y = this.y + fraction * (vectorB.y - this.y);\n } else {\n const t: number = fraction - 1.0;\n result.x = vectorB.x + t * (vectorB.x - this.x);\n result.y = vectorB.y + t * (vectorB.y - this.y);\n }\n return result;\n }\n /** Return {this + vector}. */\n public plus(vector: XAndY, result?: Vector2d): Vector2d {\n result = result ? result : new Vector2d();\n result.x = this.x + vector.x;\n result.y = this.y + vector.y;\n return result;\n }\n /** Return {this - vector}. */\n public minus(vector: XAndY, result?: Vector2d): Vector2d {\n result = result ? result : new Vector2d();\n result.x = this.x - vector.x;\n result.y = this.y - vector.y;\n return result;\n }\n /** Return {point + vector \\* scalar} */\n public plusScaled(vector: XAndY, scaleFactor: number, result?: Vector2d): Vector2d {\n result = result ? result : new Vector2d();\n result.x = this.x + vector.x * scaleFactor;\n result.y = this.y + vector.y * scaleFactor;\n return result;\n }\n /** Return {point + vectorA \\* scalarA + vectorB \\* scalarB} */\n public plus2Scaled(vectorA: XAndY, scalarA: number, vectorB: XAndY, scalarB: number, result?: Vector2d): Vector2d {\n result = result ? result : new Vector2d();\n result.x = this.x + vectorA.x * scalarA + vectorB.x * scalarB;\n result.y = this.y + vectorA.y * scalarA + vectorB.y * scalarB;\n return result;\n }\n /** Return {this + vectorA \\* scalarA + vectorB \\* scalarB + vectorC \\* scalarC} */\n public plus3Scaled(vectorA: XAndY, scalarA: number, vectorB: XAndY, scalarB: number, vectorC: XAndY, scalarC: number, result?: Vector2d): Vector2d {\n result = result ? result : new Vector2d();\n result.x = this.x + vectorA.x * scalarA + vectorB.x * scalarB + vectorC.x * scalarC;\n result.y = this.y + vectorA.y * scalarA + vectorB.y * scalarB + vectorC.y * scalarC;\n return result;\n }\n /** Return {this * scale} */\n public scale(scale: number, result?: Vector2d): Vector2d {\n result = result ? result : new Vector2d();\n result.x = this.x * scale;\n result.y = this.y * scale;\n return result;\n }\n /** Return a vector parallel to this but with specified length */\n public scaleToLength(length: number, result?: Vector2d): Vector2d | undefined {\n const mag = Geometry.correctSmallFraction(this.magnitude());\n if (mag === 0)\n return undefined;\n return this.scale(length / mag, result);\n }\n /** Return the dot product of this with vectorB */\n public dotProduct(vectorB: XAndY): number {\n return this.x * vectorB.x + this.y * vectorB.y;\n }\n /** Dot product with vector from pointA to pointB */\n public dotProductStartEnd(pointA: XAndY, pointB: XAndY): number {\n return this.x * (pointB.x - pointA.x) + this.y * (pointB.y - pointA.y);\n }\n /** Vector cross product {this CROSS vectorB} */\n public crossProduct(vectorB: XAndY): number {\n return this.x * vectorB.y - this.y * vectorB.x;\n }\n /**\n * Return the radians (as a simple number, not strongly typed Angle) signed angle from this to vectorB.\n * This is positive if the shortest turn is counterclockwise, negative if clockwise.\n */\n public radiansTo(vectorB: XAndY): number {\n return Math.atan2(this.crossProduct(vectorB), this.dotProduct(vectorB));\n }\n /**\n * Return the (strongly typed) signed angle from this to vectorB.\n * This is positive if the shortest turn is counterclockwise, negative if clockwise.\n */\n public angleTo(vectorB: XAndY): Angle {\n return Angle.createRadians(this.radiansTo(vectorB));\n }\n /**\n * Test if this vector is parallel to other.\n * * The input tolerances in `options`, if given, are considered to be squared for efficiency's sake,\n * so if you have a distance or angle tolerance t, you should pass in t * t.\n * @param other second vector for comparison.\n * @param oppositeIsParallel whether to consider diametrically opposed vectors as parallel.\n * @param options optional radian and distance tolerances.\n */\n public isParallelTo(other: Vector2d, oppositeIsParallel: boolean = false,\n returnValueIfAnInputIsZeroLength: boolean = false, options?: PerpParallelOptions): boolean {\n const radianSquaredTol: number = options?.radianSquaredTol ?? Geometry.smallAngleRadiansSquared;\n const distanceSquaredTol: number = options?.distanceSquaredTol ?? Geometry.smallMetricDistanceSquared;\n const a2 = this.magnitudeSquared();\n const b2 = other.magnitudeSquared();\n if (a2 < distanceSquaredTol || b2 < distanceSquaredTol)\n return returnValueIfAnInputIsZeroLength;\n const dot = this.dotProduct(other);\n if (dot < 0.0 && !oppositeIsParallel)\n return false;\n const cross = this.crossProduct(other);\n /* a2,b2,cross2 are squared lengths of respective vectors */\n /* cross2 = sin^2(theta) * a2 * b2 */\n /* For small theta, sin^2(theta)~~theta^2 */\n return cross * cross <= radianSquaredTol * a2 * b2;\n }\n /**\n * Test if this vector is perpendicular to other.\n * * The input tolerances in `options`, if given, are considered to be squared for efficiency's sake,\n * so if you have a distance or angle tolerance t, you should pass in t * t.\n * @param other second vector in comparison.\n * @param returnValueIfAnInputIsZeroLength if either vector is near zero length, return this value.\n * @param options optional radian and distance tolerances.\n */\n public isPerpendicularTo(\n other: Vector2d, returnValueIfAnInputIsZeroLength: boolean = false, options?: PerpParallelOptions,\n ): boolean {\n const radianSquaredTol: number = options?.radianSquaredTol ?? Geometry.smallAngleRadiansSquared;\n const distanceSquaredTol: number = options?.distanceSquaredTol ?? Geometry.smallMetricDistanceSquared;\n const aa = this.magnitudeSquared();\n const bb = other.magnitudeSquared();\n if (aa < distanceSquaredTol || bb < distanceSquaredTol)\n return returnValueIfAnInputIsZeroLength;\n const ab = this.dotProduct(other);\n return ab * ab <= radianSquaredTol * aa * bb;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Point2dVector2d.js","sourceRoot":"","sources":["../../../src/geometry3d/Point2dVector2d.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAmB,QAAQ,EAAuB,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC;;;;;;;GAOG;AACH,MAAM,OAAO,EAAE;IACb,kBAAkB;IACX,CAAC,CAAS;IACjB,kBAAkB;IACX,CAAC,CAAS;IACjB,wBAAwB;IACjB,GAAG,CAAC,IAAY,CAAC,EAAE,IAAY,CAAC;QACrC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IACD,+BAA+B;IACxB,OAAO;QACZ,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IACD,YAAsB,IAAY,CAAC,EAAE,IAAY,CAAC;QAChD,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IACD,mCAAmC;IAC5B,OAAO,CAAC,KAAa;QAC1B,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;YACjB,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;QACnB,CAAC;aAAM,CAAC;YACN,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AAgB,GAAG,EAAE,GAAG,EAAE,CAAC;IAC/C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\n\r\nimport { BeJSONFunctions, Geometry, PerpParallelOptions } from \"../Geometry\";\r\nimport { Angle } from \"./Angle\";\r\nimport { XAndY, XYProps } from \"./XYZProps\";\r\n\r\n/**\r\n * Minimal object containing x,y and operations that are meaningful without change in both point and vector.\r\n * * `XY` is not instantiable.\r\n * * The derived (instantiable) classes are\r\n * * `Point2d`\r\n * * `Vector2d`\r\n * @public\r\n */\r\nexport class XY implements XAndY {\r\n /** x component */\r\n public x: number;\r\n /** y component */\r\n public y: number;\r\n /** Set both x and y. */\r\n public set(x: number = 0, y: number = 0) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n /** Set both x and y to zero */\r\n public setZero() {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n protected constructor(x: number = 0, y: number = 0) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n /** Set both x and y from other. */\r\n public setFrom(other?: XAndY) {\r\n if (other) {\r\n this.x = other.x;\r\n this.y = other.y;\r\n } else {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n }\r\n /** Freeze this instance so it is read-only */\r\n public freeze(): Readonly<this> {\r\n return Object.freeze(this);\r\n }\r\n /** Returns true if this and other have equal x,y parts within Geometry.smallMetricDistance. */\r\n public isAlmostEqual(other: XAndY, tol?: number): boolean {\r\n return Geometry.isSameCoordinate(this.x, other.x, tol) && Geometry.isSameCoordinate(this.y, other.y, tol);\r\n }\r\n /** Returns true if this and other have equal x,y parts within Geometry.smallMetricDistance. */\r\n public isAlmostEqualXY(x: number, y: number, tol?: number): boolean {\r\n return Geometry.isSameCoordinate(this.x, x, tol) && Geometry.isSameCoordinate(this.y, y, tol);\r\n }\r\n /** Return a json array `[x,y]` */\r\n public toJSON(): XYProps {\r\n return [this.x, this.y];\r\n }\r\n /** Return a json object `{x: 1, y:2}` */\r\n public toJSONXY(): XYProps {\r\n return { x: this.x, y: this.y };\r\n }\r\n /**\r\n * Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`\r\n * * If no JSON input is provided, 0 would be used as default values for x and y.\r\n * @param json the JSON input\r\n */\r\n public setFromJSON(json?: XYProps): void {\r\n if (Array.isArray(json)) {\r\n this.set(json[0] || 0, json[1] || 0);\r\n return;\r\n }\r\n if (json) {\r\n this.set(json.x || 0, json.y || 0);\r\n return;\r\n }\r\n this.set(0, 0);\r\n }\r\n /** Return the distance from this point to other */\r\n public distance(other: XAndY): number {\r\n const xDist = other.x - this.x;\r\n const yDist = other.y - this.y;\r\n return Math.sqrt(xDist * xDist + yDist * yDist);\r\n }\r\n /** Return squared distance from this point to other */\r\n public distanceSquared(other: XAndY): number {\r\n const xDist = other.x - this.x;\r\n const yDist = other.y - this.y;\r\n return xDist * xDist + yDist * yDist;\r\n }\r\n /** Return the largest absolute distance between corresponding components */\r\n public maxDiff(other: XAndY): number {\r\n return Math.max(Math.abs(this.x - other.x), Math.abs(this.y - other.y));\r\n }\r\n /** Return the x,y component corresponding to 0,1 */\r\n public at(index: number): number {\r\n if (index < 0.5)\r\n return this.x;\r\n return this.y;\r\n }\r\n /** Set value at index 0 or 1 */\r\n public setAt(index: number, value: number): void {\r\n if (index < 0.5)\r\n this.x = value;\r\n else\r\n this.y = value;\r\n }\r\n /** Return the index (0,1) of the x,y component with largest absolute value */\r\n public indexOfMaxAbs(): number {\r\n let index = 0;\r\n const a = Math.abs(this.x);\r\n const b = Math.abs(this.y);\r\n if (b > a) {\r\n index = 1;\r\n }\r\n return index;\r\n }\r\n /** Returns true if the x,y components are both small by metric metric tolerance */\r\n public get isAlmostZero(): boolean {\r\n return Geometry.isSmallMetricDistance(this.x) && Geometry.isSmallMetricDistance(this.y);\r\n }\r\n /** Return true if the x and y components are all exactly zero */\r\n public get isZero(): boolean {\r\n return this.x === 0.0 && this.y === 0.0;\r\n }\r\n /** Return the largest absolute value of any component */\r\n public maxAbs(): number {\r\n return Math.max(Math.abs(this.x), Math.abs(this.y));\r\n }\r\n /** Return the magnitude of the vector */\r\n public magnitude(): number {\r\n return Math.sqrt(this.x * this.x + this.y * this.y);\r\n }\r\n /** Return the squared magnitude of the vector. */\r\n public magnitudeSquared(): number {\r\n return this.x * this.x + this.y * this.y;\r\n }\r\n /** Returns true if the x,y components are exactly equal. */\r\n public isExactEqual(other: XAndY): boolean {\r\n return this.x === other.x && this.y === other.y;\r\n }\r\n /** Returns true if x,y match `other` within metric tolerance */\r\n public isAlmostEqualMetric(other: XAndY, distanceTol: number = Geometry.smallMetricDistance): boolean {\r\n return this.maxDiff(other) <= distanceTol;\r\n }\r\n /** Return a (full length) vector from this point to other */\r\n public vectorTo(other: XAndY, result?: Vector2d): Vector2d {\r\n return Vector2d.create(\r\n other.x - this.x,\r\n other.y - this.y,\r\n result);\r\n }\r\n /** Return a unit vector from this point to other */\r\n public unitVectorTo(other: XAndY, result?: Vector2d): Vector2d | undefined {\r\n return this.vectorTo(other, result).normalize(result);\r\n }\r\n /** Cross product of vectors from origin to targets */\r\n public static crossProductToPoints(origin: XAndY, targetA: XAndY, targetB: XAndY): number {\r\n return Geometry.crossProductXYXY(\r\n targetA.x - origin.x, targetA.y - origin.y, targetB.x - origin.x, targetB.y - origin.y);\r\n }\r\n}\r\n\r\n/** 2D point with `x`,`y` as properties\r\n * @public\r\n */\r\nexport class Point2d extends XY implements BeJSONFunctions {\r\n /** Constructor for Point2d */\r\n constructor(x: number = 0, y: number = 0) {\r\n super(x, y);\r\n }\r\n /** Return a new Point2d with x,y coordinates from this. */\r\n public clone(result?: Point2d): Point2d {\r\n return Point2d.create(this.x, this.y, result);\r\n }\r\n /**\r\n * Return a point (newly created unless result provided) with given x,y coordinates\r\n * @param x x coordinate\r\n * @param y y coordinate\r\n * @param result optional result\r\n */\r\n public static create(x: number = 0, y: number = 0, result?: Point2d): Point2d {\r\n if (result) {\r\n result.x = x;\r\n result.y = y;\r\n return result;\r\n }\r\n return new Point2d(x, y);\r\n }\r\n /**\r\n * Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`\r\n * * If no JSON input is provided, 0 would be used as default values for x and y.\r\n * @param json the JSON input\r\n */\r\n public static fromJSON(json?: XYProps): Point2d {\r\n const val = new Point2d();\r\n val.setFromJSON(json);\r\n return val;\r\n }\r\n /** Create (or optionally reuse) a Point2d from another object with fields x and y */\r\n public static createFrom(xy: XAndY | undefined, result?: Point2d): Point2d {\r\n if (xy)\r\n return Point2d.create(xy.x, xy.y, result);\r\n return Point2d.create(0, 0, result);\r\n }\r\n /** Create a Point2d with both coordinates zero. */\r\n public static createZero(result?: Point2d): Point2d {\r\n return Point2d.create(0, 0, result);\r\n }\r\n /**\r\n * Starting at this point, move along `vector` by `tangentFraction` of its length, and then\r\n * by `leftFraction` of its length along the left perpendicular.\r\n * @param tangentFraction distance to move along `vector`, as a fraction of its length\r\n * @param leftFraction distance to move perpendicular to `vector`, as a fraction of its length\r\n * @param vector the other vector\r\n */\r\n public addForwardLeft(tangentFraction: number, leftFraction: number, vector: Vector2d, result?: Point2d): Point2d {\r\n const dx = vector.x;\r\n const dy = vector.y;\r\n return Point2d.create(\r\n this.x + tangentFraction * dx - leftFraction * dy,\r\n this.y + tangentFraction * dy + leftFraction * dx,\r\n result,\r\n );\r\n }\r\n /**\r\n * Interpolate at tangentFraction between this instance and point, and then Move by leftFraction\r\n * along the xy perpendicular of the vector between the points.\r\n */\r\n public forwardLeftInterpolate(tangentFraction: number, leftFraction: number, point: XAndY): Point2d {\r\n const dx = point.x - this.x;\r\n const dy = point.y - this.y;\r\n return Point2d.create(\r\n this.x + tangentFraction * dx - leftFraction * dy,\r\n this.y + tangentFraction * dy + leftFraction * dx,\r\n );\r\n }\r\n /** Return a point interpolated between this point and the right param. */\r\n public interpolate(fraction: number, other: XAndY, result?: Point2d): Point2d {\r\n if (fraction <= 0.5)\r\n return Point2d.create(\r\n this.x + fraction * (other.x - this.x),\r\n this.y + fraction * (other.y - this.y),\r\n result,\r\n );\r\n const t: number = fraction - 1.0;\r\n return Point2d.create(\r\n other.x + t * (other.x - this.x),\r\n other.y + t * (other.y - this.y),\r\n result,\r\n );\r\n }\r\n /** Return a point with independent x,y fractional interpolation. */\r\n public interpolateXY(fractionX: number, fractionY: number, other: XAndY, result?: Point2d): Point2d {\r\n return Point2d.create(\r\n Geometry.interpolate(this.x, fractionX, other.x),\r\n Geometry.interpolate(this.y, fractionY, other.y),\r\n result,\r\n );\r\n }\r\n /** Return this point minus vector */\r\n public minus(vector: XAndY, result?: Point2d): Point2d {\r\n return Point2d.create(\r\n this.x - vector.x,\r\n this.y - vector.y,\r\n result,\r\n );\r\n }\r\n /** Return point plus vector */\r\n public plus(vector: XAndY, result?: Point2d): Point2d {\r\n return Point2d.create(\r\n this.x + vector.x,\r\n this.y + vector.y,\r\n result,\r\n );\r\n }\r\n /** Return point plus vector */\r\n public plusXY(dx: number = 0, dy: number = 0, result?: Point2d): Point2d {\r\n return Point2d.create(\r\n this.x + dx,\r\n this.y + dy, result,\r\n );\r\n }\r\n /** Return point + vector * scalar */\r\n public plusScaled(vector: XAndY, scaleFactor: number, result?: Point2d): Point2d {\r\n return Point2d.create(\r\n this.x + vector.x * scaleFactor,\r\n this.y + vector.y * scaleFactor,\r\n result,\r\n );\r\n }\r\n /** Return point + vectorA * scalarA + vectorB * scalarB */\r\n public plus2Scaled(vectorA: XAndY, scalarA: number, vectorB: XAndY, scalarB: number, result?: Point2d): Point2d {\r\n return Point2d.create(\r\n this.x + vectorA.x * scalarA + vectorB.x * scalarB,\r\n this.y + vectorA.y * scalarA + vectorB.y * scalarB,\r\n result,\r\n );\r\n }\r\n /** Return point + vectorA * scalarA + vectorB * scalarB + vectorC * scalarC */\r\n public plus3Scaled(vectorA: XAndY, scalarA: number, vectorB: XAndY, scalarB: number,\r\n vectorC: XAndY, scalarC: number, result?: Point2d): Point2d {\r\n return Point2d.create(\r\n this.x + vectorA.x * scalarA + vectorB.x * scalarB + vectorC.x * scalarC,\r\n this.y + vectorA.y * scalarA + vectorB.y * scalarB + vectorC.y * scalarC,\r\n result,\r\n );\r\n }\r\n /** Multiply the x, y parts by scale. */\r\n public scaleInPlace(scale: number) {\r\n this.x *= scale;\r\n this.y *= scale;\r\n }\r\n /**\r\n * Return the dot product of vector from this to targetA and vector from this to targetB\r\n * @param targetA target of first vector\r\n * @param targetB target of second vector\r\n */\r\n public dotVectorsToTargets(targetA: XAndY, targetB: XAndY): number {\r\n return (targetA.x - this.x) * (targetB.x - this.x) + (targetA.y - this.y) * (targetB.y - this.y);\r\n }\r\n /**\r\n * Returns the (scalar) cross product of vector from this to targetA and vector from this to targetB\r\n * @param target1 target of first vector\r\n * @param target2 target of second vector\r\n */\r\n public crossProductToPoints(target1: XAndY, target2: XAndY): number {\r\n const x1 = target1.x - this.x;\r\n const y1 = target1.y - this.y;\r\n const x2 = target2.x - this.x;\r\n const y2 = target2.y - this.y;\r\n return x1 * y2 - y1 * x2;\r\n }\r\n /**\r\n * Return the fractional coordinate of the projection of this instance x,y onto the\r\n * line from startPoint to endPoint.\r\n * @param startPoint start point of line\r\n * @param endPoint end point of line\r\n * @param defaultFraction fraction to return if startPoint and endPoint are equal.\r\n */\r\n public fractionOfProjectionToLine(startPoint: Point2d, endPoint: Point2d, defaultFraction: number = 0): number {\r\n const denominator = startPoint.distanceSquared(endPoint);\r\n if (denominator < Geometry.smallMetricDistanceSquared)\r\n return defaultFraction;\r\n const numerator = startPoint.dotVectorsToTargets(endPoint, this);\r\n return numerator / denominator;\r\n }\r\n}\r\n\r\n/**\r\n * 2D vector with `x`,`y` as properties\r\n * @public\r\n */\r\nexport class Vector2d extends XY implements BeJSONFunctions {\r\n constructor(x: number = 0, y: number = 0) {\r\n super(x, y);\r\n }\r\n /** Return a new Vector2d with the same x,y */\r\n public clone(result?: Vector2d): Vector2d {\r\n return Vector2d.create(this.x, this.y, result);\r\n }\r\n /** Return a new Vector2d with given x and y */\r\n public static create(x: number = 0, y: number = 0, result?: Vector2d): Vector2d {\r\n if (result) {\r\n result.x = x;\r\n result.y = y;\r\n return result;\r\n }\r\n return new Vector2d(x, y);\r\n }\r\n /**\r\n * Return a (new) Vector2d with components scale,0\r\n * If scale is not given default value 1 is used.\r\n */\r\n public static unitX(scale: number = 1): Vector2d {\r\n return new Vector2d(scale, 0);\r\n }\r\n /**\r\n * Return a (new) Vector2d with components 0,scale\r\n * If scale is not given default value 1 is used.\r\n */\r\n public static unitY(scale: number = 1): Vector2d {\r\n return new Vector2d(0, scale);\r\n }\r\n /** Return a Vector2d with components 0,0 */\r\n public static createZero(result?: Vector2d): Vector2d {\r\n return Vector2d.create(0, 0, result);\r\n }\r\n /** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d, or leading entries of Float64Array */\r\n public static createFrom(data: XAndY | Float64Array, result?: Vector2d): Vector2d {\r\n if (data instanceof Float64Array) {\r\n if (data.length >= 2)\r\n return Vector2d.create(data[0], data[1]);\r\n if (data.length >= 1)\r\n return Vector2d.create(data[0], 0);\r\n return Vector2d.create(0, 0);\r\n }\r\n return Vector2d.create(data.x, data.y, result);\r\n }\r\n /**\r\n * Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`\r\n * * If no JSON input is provided, 0 would be used as default values for x and y.\r\n * @param json the JSON input\r\n */\r\n public static fromJSON(json?: XYProps): Vector2d {\r\n const val = new Vector2d();\r\n val.setFromJSON(json);\r\n return val;\r\n }\r\n /** Return a new Vector2d from polar coordinates for radius and Angle from x axis */\r\n public static createPolar(r: number, theta: Angle): Vector2d {\r\n return Vector2d.create(r * theta.cos(), r * theta.sin());\r\n }\r\n /** Return a new Vector2d extending from point0 to point1 */\r\n public static createStartEnd(point0: XAndY, point1: XAndY, result?: Vector2d): Vector2d {\r\n return Vector2d.create(point1.x - point0.x, point1.y - point0.y, result);\r\n }\r\n /**\r\n * Return a vector that bisects the angle between two normals and extends to the intersection of two offset lines\r\n * * returns `undefined` if `unitPerpA = -unitPerpB` (i.e., are opposite)\r\n * * math details can be found at docs/learning/geometry/PointVector.md\r\n * @param unitPerpA unit perpendicular to incoming direction\r\n * @param unitPerpB unit perpendicular to outgoing direction\r\n * @param offset offset distance\r\n */\r\n public static createOffsetBisector(unitPerpA: Vector2d, unitPerpB: Vector2d, offset: number): Vector2d | undefined {\r\n let bisector: Vector2d | undefined = unitPerpA.plus(unitPerpB);\r\n bisector = bisector.normalize();\r\n if (bisector) {\r\n const c = bisector.dotProduct(unitPerpA);\r\n bisector.scale(offset, bisector);\r\n return bisector.safeDivideOrNull(c);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Return a (new or optionally reused) vector which is `this` divided by `denominator`\r\n * * return undefined if denominator is zero.\r\n */\r\n public safeDivideOrNull(denominator: number, result?: Vector2d): Vector2d | undefined {\r\n if (denominator !== 0.0) {\r\n return this.scale(1.0 / denominator, result);\r\n }\r\n return undefined;\r\n }\r\n /** Return a unit vector in direction of this instance (undefined if this instance has near zero length) */\r\n public normalize(result?: Vector2d): Vector2d | undefined {\r\n const mag = Geometry.correctSmallFraction(this.magnitude());\r\n result = result ? result : new Vector2d();\r\n return this.safeDivideOrNull(mag, result);\r\n }\r\n /**\r\n * Return fractional length of the projection of the instance onto the target vector.\r\n * @param target the target vector\r\n * @param defaultFraction the returned value in case the magnitude of `target` is too small\r\n * @returns the signed length of the projection divided by the length of `target`\r\n */\r\n public fractionOfProjectionToVector(target: Vector2d, defaultFraction?: number): number {\r\n /*\r\n * projection length is (this.target)/||target||\r\n * but here we return (this.target)/||target||^2\r\n */\r\n const denominator = target.magnitudeSquared();\r\n if (denominator < Geometry.smallMetricDistanceSquared)\r\n return defaultFraction ? defaultFraction : 0;\r\n const numerator = this.dotProduct(target);\r\n return numerator / denominator;\r\n }\r\n /** Return a new vector with components negated from this instance. */\r\n public negate(result?: Vector2d): Vector2d {\r\n result = result ? result : new Vector2d();\r\n result.x = -this.x;\r\n result.y = -this.y;\r\n return result;\r\n }\r\n /** Return a vector same length as this but rotated 90 degrees counter clockwise */\r\n public rotate90CCWXY(result?: Vector2d): Vector2d {\r\n result = result ? result : new Vector2d();\r\n // save x,y to allow aliasing (\"this\" can be passed to the function as \"result\")\r\n const xx: number = this.x;\r\n const yy: number = this.y;\r\n result.x = -yy;\r\n result.y = xx;\r\n return result;\r\n }\r\n /** Return a vector same length as this but rotated 90 degrees clockwise */\r\n public rotate90CWXY(result?: Vector2d): Vector2d {\r\n result = result ? result : new Vector2d();\r\n // save x,y to allow aliasing (\"this\" can be passed to the function as \"result\")\r\n const xx: number = this.x;\r\n const yy: number = this.y;\r\n result.x = yy;\r\n result.y = -xx;\r\n return result;\r\n }\r\n /** Return a unit vector perpendicular to this instance. */\r\n public unitPerpendicularXY(result?: Vector2d): Vector2d {\r\n result = result ? result : new Vector2d();\r\n const xx: number = this.x;\r\n const yy: number = this.y;\r\n // save x,y to allow aliasing (\"this\" can be passed to the function as \"result\")\r\n result.x = -yy;\r\n result.y = xx;\r\n const d2: number = xx * xx + yy * yy;\r\n if (d2 !== 0.0) {\r\n const a = 1.0 / Math.sqrt(d2);\r\n result.x *= a;\r\n result.y *= a;\r\n }\r\n return result;\r\n }\r\n /** Return a new Vector2d rotated CCW by given angle */\r\n public rotateXY(angle: Angle, result?: Vector2d): Vector2d {\r\n const s = angle.sin();\r\n const c = angle.cos();\r\n // save x,y to allow aliasing (\"this\" can be passed to the function as \"result\")\r\n const xx: number = this.x;\r\n const yy: number = this.y;\r\n result = result ? result : new Vector2d();\r\n result.x = xx * c - yy * s;\r\n result.y = xx * s + yy * c;\r\n return result;\r\n }\r\n /**\r\n * Return a vector computed at fractional position between this vector and vectorB\r\n * @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`.\r\n * True fractions are \"between\", negatives are \"before this\", beyond 1 is \"beyond vectorB\".\r\n * @param vectorB second vector\r\n * @param result optional preallocated result.\r\n */\r\n public interpolate(fraction: number, vectorB: Vector2d, result?: Vector2d): Vector2d {\r\n result = result ? result : new Vector2d();\r\n /*\r\n * For best last-bit behavior, if fraction is below 0.5, use this as base point.\r\n * If above 0.5, use vectorB as base point.\r\n */\r\n if (fraction <= 0.5) {\r\n result.x = this.x + fraction * (vectorB.x - this.x);\r\n result.y = this.y + fraction * (vectorB.y - this.y);\r\n } else {\r\n const t: number = fraction - 1.0;\r\n result.x = vectorB.x + t * (vectorB.x - this.x);\r\n result.y = vectorB.y + t * (vectorB.y - this.y);\r\n }\r\n return result;\r\n }\r\n /** Return {this + vector}. */\r\n public plus(vector: XAndY, result?: Vector2d): Vector2d {\r\n result = result ? result : new Vector2d();\r\n result.x = this.x + vector.x;\r\n result.y = this.y + vector.y;\r\n return result;\r\n }\r\n /** Return {this - vector}. */\r\n public minus(vector: XAndY, result?: Vector2d): Vector2d {\r\n result = result ? result : new Vector2d();\r\n result.x = this.x - vector.x;\r\n result.y = this.y - vector.y;\r\n return result;\r\n }\r\n /** Return {point + vector \\* scalar} */\r\n public plusScaled(vector: XAndY, scaleFactor: number, result?: Vector2d): Vector2d {\r\n result = result ? result : new Vector2d();\r\n result.x = this.x + vector.x * scaleFactor;\r\n result.y = this.y + vector.y * scaleFactor;\r\n return result;\r\n }\r\n /** Return {point + vectorA \\* scalarA + vectorB \\* scalarB} */\r\n public plus2Scaled(vectorA: XAndY, scalarA: number, vectorB: XAndY, scalarB: number, result?: Vector2d): Vector2d {\r\n result = result ? result : new Vector2d();\r\n result.x = this.x + vectorA.x * scalarA + vectorB.x * scalarB;\r\n result.y = this.y + vectorA.y * scalarA + vectorB.y * scalarB;\r\n return result;\r\n }\r\n /** Return {this + vectorA \\* scalarA + vectorB \\* scalarB + vectorC \\* scalarC} */\r\n public plus3Scaled(vectorA: XAndY, scalarA: number, vectorB: XAndY, scalarB: number, vectorC: XAndY, scalarC: number, result?: Vector2d): Vector2d {\r\n result = result ? result : new Vector2d();\r\n result.x = this.x + vectorA.x * scalarA + vectorB.x * scalarB + vectorC.x * scalarC;\r\n result.y = this.y + vectorA.y * scalarA + vectorB.y * scalarB + vectorC.y * scalarC;\r\n return result;\r\n }\r\n /** Return {this * scale} */\r\n public scale(scale: number, result?: Vector2d): Vector2d {\r\n result = result ? result : new Vector2d();\r\n result.x = this.x * scale;\r\n result.y = this.y * scale;\r\n return result;\r\n }\r\n /** Return a vector parallel to this but with specified length */\r\n public scaleToLength(length: number, result?: Vector2d): Vector2d | undefined {\r\n const mag = Geometry.correctSmallFraction(this.magnitude());\r\n if (mag === 0)\r\n return undefined;\r\n return this.scale(length / mag, result);\r\n }\r\n /** Return the dot product of this with vectorB */\r\n public dotProduct(vectorB: XAndY): number {\r\n return this.x * vectorB.x + this.y * vectorB.y;\r\n }\r\n /** Dot product with vector from pointA to pointB */\r\n public dotProductStartEnd(pointA: XAndY, pointB: XAndY): number {\r\n return this.x * (pointB.x - pointA.x) + this.y * (pointB.y - pointA.y);\r\n }\r\n /** Vector cross product {this CROSS vectorB} */\r\n public crossProduct(vectorB: XAndY): number {\r\n return this.x * vectorB.y - this.y * vectorB.x;\r\n }\r\n /**\r\n * Return the radians (as a simple number, not strongly typed Angle) signed angle from this to vectorB.\r\n * This is positive if the shortest turn is counterclockwise, negative if clockwise.\r\n */\r\n public radiansTo(vectorB: XAndY): number {\r\n return Math.atan2(this.crossProduct(vectorB), this.dotProduct(vectorB));\r\n }\r\n /**\r\n * Return the (strongly typed) signed angle from this to vectorB.\r\n * This is positive if the shortest turn is counterclockwise, negative if clockwise.\r\n */\r\n public angleTo(vectorB: XAndY): Angle {\r\n return Angle.createRadians(this.radiansTo(vectorB));\r\n }\r\n /**\r\n * Test if this vector is parallel to other.\r\n * * The input tolerances in `options`, if given, are considered to be squared for efficiency's sake,\r\n * so if you have a distance or angle tolerance t, you should pass in t * t.\r\n * @param other second vector for comparison.\r\n * @param oppositeIsParallel whether to consider diametrically opposed vectors as parallel.\r\n * @param options optional radian and distance tolerances.\r\n */\r\n public isParallelTo(other: Vector2d, oppositeIsParallel: boolean = false,\r\n returnValueIfAnInputIsZeroLength: boolean = false, options?: PerpParallelOptions): boolean {\r\n const radianSquaredTol: number = options?.radianSquaredTol ?? Geometry.smallAngleRadiansSquared;\r\n const distanceSquaredTol: number = options?.distanceSquaredTol ?? Geometry.smallMetricDistanceSquared;\r\n const a2 = this.magnitudeSquared();\r\n const b2 = other.magnitudeSquared();\r\n if (a2 < distanceSquaredTol || b2 < distanceSquaredTol)\r\n return returnValueIfAnInputIsZeroLength;\r\n const dot = this.dotProduct(other);\r\n if (dot < 0.0 && !oppositeIsParallel)\r\n return false;\r\n const cross = this.crossProduct(other);\r\n /* a2,b2,cross2 are squared lengths of respective vectors */\r\n /* cross2 = sin^2(theta) * a2 * b2 */\r\n /* For small theta, sin^2(theta)~~theta^2 */\r\n return cross * cross <= radianSquaredTol * a2 * b2;\r\n }\r\n /**\r\n * Test if this vector is perpendicular to other.\r\n * * The input tolerances in `options`, if given, are considered to be squared for efficiency's sake,\r\n * so if you have a distance or angle tolerance t, you should pass in t * t.\r\n * @param other second vector in comparison.\r\n * @param returnValueIfAnInputIsZeroLength if either vector is near zero length, return this value.\r\n * @param options optional radian and distance tolerances.\r\n */\r\n public isPerpendicularTo(\r\n other: Vector2d, returnValueIfAnInputIsZeroLength: boolean = false, options?: PerpParallelOptions,\r\n ): boolean {\r\n const radianSquaredTol: number = options?.radianSquaredTol ?? Geometry.smallAngleRadiansSquared;\r\n const distanceSquaredTol: number = options?.distanceSquaredTol ?? Geometry.smallMetricDistanceSquared;\r\n const aa = this.magnitudeSquared();\r\n const bb = other.magnitudeSquared();\r\n if (aa < distanceSquaredTol || bb < distanceSquaredTol)\r\n return returnValueIfAnInputIsZeroLength;\r\n const ab = this.dotProduct(other);\r\n return ab * ab <= radianSquaredTol * aa * bb;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Point3dArrayCarrier.js","sourceR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;OAIG;IACI,kBAAkB,CAAC,MAAc,EAAE,MAAc;QACtD,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3D,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,yDAAyD;IACzC,WAAW,CAAC,CAAS;QACnC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ArraysAndInterfaces\n */\n\nimport { IndexedReadWriteXYZCollection } from \"./IndexedXYZCollection\";\nimport { Point3d, Vector3d } from \"./Point3dVector3d\";\nimport { XYAndZ } from \"./XYZProps\";\n\n/**\n * Helper object to access members of a Point3d[] 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 Point3dArrayCarrier extends IndexedReadWriteXYZCollection {\n /** Reference to array being queried. */\n public data: Point3d[];\n /** CAPTURE caller supplied array ... */\n public constructor(data: Point3d[]) {\n super();\n this.data = data;\n }\n /** Test if `index` is a valid index into the array. */\n public isValidIndex(index: number): boolean {\n return this.isIndexValid(index);\n }\n /**\n * Access by index, returning strongly typed Point3d\n * * This returns the xyz 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 getPoint3dAtCheckedPointIndex(index: number, result?: Point3d): Point3d | undefined {\n if (this.isValidIndex(index)) {\n const source = this.data[index];\n return Point3d.create(source.x, source.y, source.z, result);\n }\n return undefined;\n }\n /**\n * Access by index, returning strongly typed Point3d\n * * This returns the xyz 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 */\n public getPoint3dAtUncheckedPointIndex(index: number, result?: Point3d): Point3d {\n const source = this.data[index];\n return Point3d.create(source.x, source.y, source.z, result);\n }\n /**\n * Access by index, returning strongly typed Vector3d\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 getVector3dAtCheckedVectorIndex(index: number, result?: Vector3d): Vector3d | undefined {\n if (this.isValidIndex(index)) {\n const source = this.data[index];\n return Vector3d.create(source.x, source.y, source.z, result);\n }\n return undefined;\n }\n /**\n * Access x of indexed point\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\n */\n public getXAtUncheckedPointIndex(pointIndex: number): number {\n return this.data[pointIndex].x;\n }\n /**\n * Access y of indexed point\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\n */\n public getYAtUncheckedPointIndex(pointIndex: number): number {\n return this.data[pointIndex].y;\n }\n /**\n * Access z of indexed point\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\n */\n public getZAtUncheckedPointIndex(pointIndex: number): number {\n return this.data[pointIndex].z;\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 vectorIndexIndex(indexA: number, indexB: number, result?: Vector3d): Vector3d | undefined {\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\n return Vector3d.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 vectorXYAndZIndex(origin: XYAndZ, indexB: number, result?: Vector3d): Vector3d | undefined {\n if (this.isValidIndex(indexB))\n return Vector3d.createStartEnd(origin, this.data[indexB], result);\n return undefined;\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 crossProductXYAndZIndexIndex(\n origin: XYAndZ, indexA: number, indexB: number, result?: Vector3d,\n ): Vector3d | undefined {\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\n return Vector3d.createCrossProductToPoints(origin, this.data[indexA], this.data[indexB], result);\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 crossProductIndexIndexIndex(\n originIndex: number, indexA: number, indexB: number, result?: Vector3d,\n ): Vector3d | undefined {\n if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))\n return Vector3d.createCrossProductToPoints(this.data[originIndex], this.data[indexA], this.data[indexB], result);\n return undefined;\n }\n /**\n * Compute the cross product of vectors from point at originIndex to points at indexA and indexB, and accumulate it to the result.\n * @param origin 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 accumulateCrossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number, result: Vector3d): void {\n const data = this.data;\n if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))\n result.addCrossProductToTargetsInPlace(\n data[originIndex].x, data[originIndex].y, data[originIndex].z,\n data[indexA].x, data[indexA].y, data[indexA].z,\n data[indexB].x, data[indexB].y, data[indexB].z,\n );\n }\n /** Accumulate scale times the x,y,z values at index to the sum. No action if index is out of bounds */\n public accumulateScaledXYZ(index: number, scale: number, sum: Point3d): void {\n if (this.isValidIndex(index)) {\n const point = this.data[index];\n sum.x += scale * point.x;\n sum.y += scale * point.y;\n sum.z += scale * point.z;\n }\n }\n /** Read-only property for number of XYZ in the collection */\n public get length(): number {\n return this.data.length;\n }\n /**\n * Push a (clone of) point onto the collection\n * * point itself is not pushed -- xyz data is extracted into the native form of the collection.\n */\n public push(data: Point3d): void {\n this.data.push(data.clone());\n }\n /**\n * Push a new point (given by coordinates) onto the collection\n * @param x x coordinate\n * @param y y coordinate\n * @param z z coordinate\n */\n public pushXYZ(x?: number, y?: number, z?: number): void {\n this.data.push(\n Point3d.create(x === undefined ? 0.0 : x, y === undefined ? 0.0 : y, z === undefined ? 0.0 : z),\n );\n }\n /** Extract (copy) the final point */\n public override back(result?: Point3d): Point3d | undefined {\n if (this.data.length > 0) {\n return this.data[this.data.length - 1].clone(result);\n }\n return undefined;\n }\n /** Extract (copy) the first point */\n public override front(result?: Point3d): Point3d | undefined {\n if (this.data.length > 0) {\n return this.data[0].clone(result);\n }\n return undefined;\n }\n /** Remove the final point. */\n public pop(): void {\n if (this.data.length > 0)\n this.data.pop();\n }\n /** Remove all points. */\n public clear(): void {\n this.data.length = 0;\n }\n /** Reverse the points in place */\n public reverseInPlace(): void {\n this.data.reverse();\n }\n /**\n * Return distance squared between indicated points.\n * @param index0 first point index\n * @param index1 second point index\n */\n public distanceSquaredIndexIndex(index0: number, index1: number): number | undefined {\n const n = this.data.length;\n if (index0 >= 0 && index0 < n && index1 >= 0 && index1 < n) {\n return this.data[index0].distanceSquared(this.data[index1]);\n }\n return undefined;\n }\n /**\n * Return distance between indicated points.\n * @param index0 first point index\n * @param index1 second point index\n */\n public distanceIndexIndex(index0: number, index1: number): number | undefined {\n const n = this.data.length;\n if (index0 >= 0 && index0 < n && index1 >= 0 && index1 < n) {\n return this.data[index0].distance(this.data[index1]);\n }\n return undefined;\n }\n /** Adjust index into range by modulo with the length. */\n public override cyclicIndex(i: number): number {\n return (i % this.data.length);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Point3dArrayCarrier.js","sourceRoot":"","sources":["../../../src/geometry3d/Point3dArrayCarrier.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGtD;;;;;;GAMG;AACH,MAAM,OAAO,mBAAoB,SAAQ,6BAA6B;IACpE,wCAAwC;IACjC,IAAI,CAAY;IACvB,wCAAwC;IACxC,YAAmB,IAAe;QAChC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IACD,uDAAuD;IAChD,YAAY,CAAC,KAAa;QAC/B,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IACD;;;;;;OAMG;IACI,6BAA6B,CAAC,KAAa,EAAE,MAAgB;QAClE,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChC,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;;OAKG;IACI,+BAA+B,CAAC,KAAa,EAAE,MAAgB;QACpE,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IACD;;;;;OAKG;IACI,+BAA+B,CA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AC,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;OAIG;IACI,kBAAkB,CAAC,MAAc,EAAE,MAAc;QACtD,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3D,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,yDAAyD;IACzC,WAAW,CAAC,CAAS;QACnC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ArraysAndInterfaces\r\n */\r\n\r\nimport { IndexedReadWriteXYZCollection } from \"./IndexedXYZCollection\";\r\nimport { Point3d, Vector3d } from \"./Point3dVector3d\";\r\nimport { XYAndZ } from \"./XYZProps\";\r\n\r\n/**\r\n * Helper object to access members of a Point3d[] in geometric calculations.\r\n * * The collection holds only a reference to the actual array.\r\n * * The actual array may be replaced by the user as needed.\r\n * * When replaced, there is no cached data to be updated.\r\n * @public\r\n */\r\nexport class Point3dArrayCarrier extends IndexedReadWriteXYZCollection {\r\n /** Reference to array being queried. */\r\n public data: Point3d[];\r\n /** CAPTURE caller supplied array ... */\r\n public constructor(data: Point3d[]) {\r\n super();\r\n this.data = data;\r\n }\r\n /** Test if `index` is a valid index into the array. */\r\n public isValidIndex(index: number): boolean {\r\n return this.isIndexValid(index);\r\n }\r\n /**\r\n * Access by index, returning strongly typed Point3d\r\n * * This returns the xyz value but NOT reference to the point in the \"carried\" array.\r\n * @param index index of point within the array\r\n * @param result caller-allocated destination\r\n * @returns undefined if the index is out of bounds\r\n */\r\n public getPoint3dAtCheckedPointIndex(index: number, result?: Point3d): Point3d | undefined {\r\n if (this.isValidIndex(index)) {\r\n const source = this.data[index];\r\n return Point3d.create(source.x, source.y, source.z, result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Access by index, returning strongly typed Point3d\r\n * * This returns the xyz value but NOT reference to the point in the \"carried\" array.\r\n * @param index index of point within the array\r\n * @param result caller-allocated destination\r\n */\r\n public getPoint3dAtUncheckedPointIndex(index: number, result?: Point3d): Point3d {\r\n const source = this.data[index];\r\n return Point3d.create(source.x, source.y, source.z, result);\r\n }\r\n /**\r\n * Access by index, returning strongly typed Vector3d\r\n * @param index index of point within the array\r\n * @param result caller-allocated destination\r\n * @returns undefined if the index is out of bounds\r\n */\r\n public getVector3dAtCheckedVectorIndex(index: number, result?: Vector3d): Vector3d | undefined {\r\n if (this.isValidIndex(index)) {\r\n const source = this.data[index];\r\n return Vector3d.create(source.x, source.y, source.z, result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Access x of indexed point\r\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\r\n */\r\n public getXAtUncheckedPointIndex(pointIndex: number): number {\r\n return this.data[pointIndex].x;\r\n }\r\n /**\r\n * Access y of indexed point\r\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\r\n */\r\n public getYAtUncheckedPointIndex(pointIndex: number): number {\r\n return this.data[pointIndex].y;\r\n }\r\n /**\r\n * Access z of indexed point\r\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\r\n */\r\n public getZAtUncheckedPointIndex(pointIndex: number): number {\r\n return this.data[pointIndex].z;\r\n }\r\n /**\r\n * Return a vector from the point at indexA to the point at indexB\r\n * @param indexA index of point within the array\r\n * @param indexB index of point within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if either index is out of bounds\r\n */\r\n public vectorIndexIndex(indexA: number, indexB: number, result?: Vector3d): Vector3d | undefined {\r\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return Vector3d.createStartEnd(this.data[indexA], this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Return a vector from given origin to point at indexB\r\n * @param origin origin for vector\r\n * @param indexB index of point within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if index is out of bounds\r\n */\r\n public vectorXYAndZIndex(origin: XYAndZ, indexB: number, result?: Vector3d): Vector3d | undefined {\r\n if (this.isValidIndex(indexB))\r\n return Vector3d.createStartEnd(origin, this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Return the cross product of vectors from origin to points at indexA and indexB\r\n * @param origin origin for vector\r\n * @param indexA index of first target within the array\r\n * @param indexB index of second target within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if either index is out of bounds\r\n */\r\n public crossProductXYAndZIndexIndex(\r\n origin: XYAndZ, indexA: number, indexB: number, result?: Vector3d,\r\n ): Vector3d | undefined {\r\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return Vector3d.createCrossProductToPoints(origin, this.data[indexA], this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Return the cross product of vectors from point at originIndex to points at indexA and indexB\r\n * @param originIndex index of origin\r\n * @param indexA index of first target within the array\r\n * @param indexB index of second target within the array\r\n * @param result caller-allocated vector.\r\n * @returns return true if indexA, indexB both valid\r\n */\r\n public crossProductIndexIndexIndex(\r\n originIndex: number, indexA: number, indexB: number, result?: Vector3d,\r\n ): Vector3d | undefined {\r\n if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return Vector3d.createCrossProductToPoints(this.data[originIndex], this.data[indexA], this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Compute the cross product of vectors from point at originIndex to points at indexA and indexB, and accumulate it to the result.\r\n * @param origin index of origin\r\n * @param indexA index of first target within the array\r\n * @param indexB index of second target within the array\r\n * @param result caller-allocated vector.\r\n * @returns return true if indexA, indexB both valid\r\n */\r\n public accumulateCrossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number, result: Vector3d): void {\r\n const data = this.data;\r\n if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n result.addCrossProductToTargetsInPlace(\r\n data[originIndex].x, data[originIndex].y, data[originIndex].z,\r\n data[indexA].x, data[indexA].y, data[indexA].z,\r\n data[indexB].x, data[indexB].y, data[indexB].z,\r\n );\r\n }\r\n /** Accumulate scale times the x,y,z values at index to the sum. No action if index is out of bounds */\r\n public accumulateScaledXYZ(index: number, scale: number, sum: Point3d): void {\r\n if (this.isValidIndex(index)) {\r\n const point = this.data[index];\r\n sum.x += scale * point.x;\r\n sum.y += scale * point.y;\r\n sum.z += scale * point.z;\r\n }\r\n }\r\n /** Read-only property for number of XYZ in the collection */\r\n public get length(): number {\r\n return this.data.length;\r\n }\r\n /**\r\n * Push a (clone of) point onto the collection\r\n * * point itself is not pushed -- xyz data is extracted into the native form of the collection.\r\n */\r\n public push(data: Point3d): void {\r\n this.data.push(data.clone());\r\n }\r\n /**\r\n * Push a new point (given by coordinates) onto the collection\r\n * @param x x coordinate\r\n * @param y y coordinate\r\n * @param z z coordinate\r\n */\r\n public pushXYZ(x?: number, y?: number, z?: number): void {\r\n this.data.push(\r\n Point3d.create(x === undefined ? 0.0 : x, y === undefined ? 0.0 : y, z === undefined ? 0.0 : z),\r\n );\r\n }\r\n /** Extract (copy) the final point */\r\n public override back(result?: Point3d): Point3d | undefined {\r\n if (this.data.length > 0) {\r\n return this.data[this.data.length - 1].clone(result);\r\n }\r\n return undefined;\r\n }\r\n /** Extract (copy) the first point */\r\n public override front(result?: Point3d): Point3d | undefined {\r\n if (this.data.length > 0) {\r\n return this.data[0].clone(result);\r\n }\r\n return undefined;\r\n }\r\n /** Remove the final point. */\r\n public pop(): void {\r\n if (this.data.length > 0)\r\n this.data.pop();\r\n }\r\n /** Remove all points. */\r\n public clear(): void {\r\n this.data.length = 0;\r\n }\r\n /** Reverse the points in place */\r\n public reverseInPlace(): void {\r\n this.data.reverse();\r\n }\r\n /**\r\n * Return distance squared between indicated points.\r\n * @param index0 first point index\r\n * @param index1 second point index\r\n */\r\n public distanceSquaredIndexIndex(index0: number, index1: number): number | undefined {\r\n const n = this.data.length;\r\n if (index0 >= 0 && index0 < n && index1 >= 0 && index1 < n) {\r\n return this.data[index0].distanceSquared(this.data[index1]);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Return distance between indicated points.\r\n * @param index0 first point index\r\n * @param index1 second point index\r\n */\r\n public distanceIndexIndex(index0: number, index1: number): number | undefined {\r\n const n = this.data.length;\r\n if (index0 >= 0 && index0 < n && index1 >= 0 && index1 < n) {\r\n return this.data[index0].distance(this.data[index1]);\r\n }\r\n return undefined;\r\n }\r\n /** Adjust index into range by modulo with the length. */\r\n public override cyclicIndex(i: number): number {\r\n return (i % this.data.length);\r\n }\r\n}\r\n"]}
|