@itwin/core-geometry 4.0.0-dev.54 → 4.0.0-dev.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/Constant.js.map +1 -1
- package/lib/cjs/Geometry.d.ts +5 -1
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +5 -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/ChainCollectorContext.js.map +1 -1
- package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveChain.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.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/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.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/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/cjs/curve/GeometryQuery.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/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/AppendPlaneIntersectionStrokeHandler.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/CurveLengthContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.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/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.d.ts +29 -34
- package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +31 -36
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +48 -43
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +48 -43
- 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.d.ts +5 -8
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +5 -8
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts +3 -3
- package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js +3 -3
- package/lib/cjs/geometry3d/OrderedRotationAngles.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.d.ts +8 -10
- package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js +8 -10
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts +37 -34
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +38 -35
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts +17 -21
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js +16 -20
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +84 -67
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +84 -67
- 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/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +76 -66
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +88 -77
- 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.d.ts +15 -16
- package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js +14 -15
- 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/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/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/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.d.ts +72 -58
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +132 -108
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.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.d.ts +5 -1
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +5 -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/ChainCollectorContext.js.map +1 -1
- package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
- package/lib/esm/curve/CurveChain.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.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/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.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/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/esm/curve/GeometryQuery.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/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/AppendPlaneIntersectionStrokeHandler.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/CurveLengthContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.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/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.d.ts +29 -34
- package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
- package/lib/esm/geometry3d/Angle.js +31 -36
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +48 -43
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +48 -43
- 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.d.ts +5 -8
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +5 -8
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.d.ts +3 -3
- package/lib/esm/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js +3 -3
- package/lib/esm/geometry3d/OrderedRotationAngles.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.d.ts +8 -10
- package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js +8 -10
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts +37 -34
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +38 -35
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts +17 -21
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js +16 -20
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +84 -67
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +84 -67
- 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/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/esm/geometry3d/Segment1d.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +76 -66
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +88 -77
- 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.d.ts +15 -16
- package/lib/esm/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js +14 -15
- 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/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/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/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.d.ts +72 -58
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +132 -108
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.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
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
import { BeJSONFunctions, PerpParallelOptions } from "../Geometry";
|
|
5
5
|
import { Angle } from "./Angle";
|
|
6
6
|
import { XAndY, XYProps } from "./XYZProps";
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Minimal object containing x,y and operations that are meaningful without change in both point and vector.
|
|
8
9
|
* * `XY` is not instantiable.
|
|
9
10
|
* * The derived (instantiable) classes are
|
|
10
11
|
* * `Point2d`
|
|
@@ -29,15 +30,15 @@ export declare class XY implements XAndY {
|
|
|
29
30
|
isAlmostEqual(other: XAndY, tol?: number): boolean;
|
|
30
31
|
/** Returns true if this and other have equal x,y parts within Geometry.smallMetricDistance. */
|
|
31
32
|
isAlmostEqualXY(x: number, y: number, tol?: number): boolean;
|
|
32
|
-
/**
|
|
33
|
+
/** Return a json array `[x,y]` */
|
|
33
34
|
toJSON(): XYProps;
|
|
34
|
-
/**
|
|
35
|
+
/** Return a json object `{x: 1, y:2}` */
|
|
35
36
|
toJSONXY(): XYProps;
|
|
36
37
|
/**
|
|
37
38
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
38
39
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
39
40
|
* @param json the JSON input
|
|
40
|
-
|
|
41
|
+
*/
|
|
41
42
|
setFromJSON(json?: XYProps): void;
|
|
42
43
|
/** Return the distance from this point to other */
|
|
43
44
|
distance(other: XAndY): number;
|
|
@@ -45,17 +46,13 @@ export declare class XY implements XAndY {
|
|
|
45
46
|
distanceSquared(other: XAndY): number;
|
|
46
47
|
/** Return the largest absolute distance between corresponding components */
|
|
47
48
|
maxDiff(other: XAndY): number;
|
|
48
|
-
/**
|
|
49
|
-
* Return the x,y component corresponding to 0,1.
|
|
50
|
-
*/
|
|
49
|
+
/** Return the x,y component corresponding to 0,1 */
|
|
51
50
|
at(index: number): number;
|
|
52
|
-
/**
|
|
53
|
-
* Set value at index 0 or 1.
|
|
54
|
-
*/
|
|
51
|
+
/** Set value at index 0 or 1 */
|
|
55
52
|
setAt(index: number, value: number): void;
|
|
56
53
|
/** Return the index (0,1) of the x,y component with largest absolute value */
|
|
57
54
|
indexOfMaxAbs(): number;
|
|
58
|
-
/**
|
|
55
|
+
/** Returns true if the x,y components are both small by metric metric tolerance */
|
|
59
56
|
get isAlmostZero(): boolean;
|
|
60
57
|
/** Return the largest absolute value of any component */
|
|
61
58
|
maxAbs(): number;
|
|
@@ -63,15 +60,15 @@ export declare class XY implements XAndY {
|
|
|
63
60
|
magnitude(): number;
|
|
64
61
|
/** Return the squared magnitude of the vector. */
|
|
65
62
|
magnitudeSquared(): number;
|
|
66
|
-
/**
|
|
63
|
+
/** Returns true if the x,y components are exactly equal. */
|
|
67
64
|
isExactEqual(other: XAndY): boolean;
|
|
68
|
-
/**
|
|
65
|
+
/** Returns true if x,y match `other` within metric tolerance */
|
|
69
66
|
isAlmostEqualMetric(other: XAndY, distanceTol?: number): boolean;
|
|
70
67
|
/** Return a (full length) vector from this point to other */
|
|
71
68
|
vectorTo(other: XAndY, result?: Vector2d): Vector2d;
|
|
72
69
|
/** Return a unit vector from this point to other */
|
|
73
70
|
unitVectorTo(other: XAndY, result?: Vector2d): Vector2d | undefined;
|
|
74
|
-
/**
|
|
71
|
+
/** Cross product of vectors from origin to targets */
|
|
75
72
|
static crossProductToPoints(origin: XAndY, targetA: XAndY, targetB: XAndY): number;
|
|
76
73
|
}
|
|
77
74
|
/** 2D point with `x`,`y` as properties
|
|
@@ -80,7 +77,7 @@ export declare class XY implements XAndY {
|
|
|
80
77
|
export declare class Point2d extends XY implements BeJSONFunctions {
|
|
81
78
|
/** Constructor for Point2d */
|
|
82
79
|
constructor(x?: number, y?: number);
|
|
83
|
-
/**
|
|
80
|
+
/** Return a new Point2d with x,y coordinates from this. */
|
|
84
81
|
clone(result?: Point2d): Point2d;
|
|
85
82
|
/**
|
|
86
83
|
* Return a point (newly created unless result provided) with given x,y coordinates
|
|
@@ -93,20 +90,22 @@ export declare class Point2d extends XY implements BeJSONFunctions {
|
|
|
93
90
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
94
91
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
95
92
|
* @param json the JSON input
|
|
96
|
-
|
|
93
|
+
*/
|
|
97
94
|
static fromJSON(json?: XYProps): Point2d;
|
|
98
95
|
/** Create (or optionally reuse) a Point2d from another object with fields x and y */
|
|
99
96
|
static createFrom(xy: XAndY | undefined, result?: Point2d): Point2d;
|
|
100
97
|
/** Create a Point2d with both coordinates zero. */
|
|
101
98
|
static createZero(result?: Point2d): Point2d;
|
|
102
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Starting at this point, move along vector by tangentFraction of the vector length, and then
|
|
103
101
|
* to the left by leftFraction of the perpendicular vector length.
|
|
104
102
|
* @param tangentFraction distance to move along the vector, as a fraction of vector
|
|
105
103
|
* @param leftFraction distance to move perpendicular to the vector, as a fraction of the rotated vector
|
|
106
104
|
* @param vector the other vector
|
|
107
105
|
*/
|
|
108
106
|
addForwardLeft(tangentFraction: number, leftFraction: number, vector: Vector2d): Point2d;
|
|
109
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* Interpolate at tangentFraction between this instance and point, and then Move by leftFraction
|
|
110
109
|
* along the xy perpendicular of the vector between the points.
|
|
111
110
|
*/
|
|
112
111
|
forwardLeftInterpolate(tangentFraction: number, leftFraction: number, point: XAndY): Point2d;
|
|
@@ -138,7 +137,8 @@ export declare class Point2d extends XY implements BeJSONFunctions {
|
|
|
138
137
|
* @param target2 target of second vector
|
|
139
138
|
*/
|
|
140
139
|
crossProductToPoints(target1: XAndY, target2: XAndY): number;
|
|
141
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* Return the fractional coordinate of the projection of this instance x,y onto the
|
|
142
142
|
* line from startPoint to endPoint.
|
|
143
143
|
* @param startPoint start point of line
|
|
144
144
|
* @param endPoint end point of line
|
|
@@ -146,7 +146,8 @@ export declare class Point2d extends XY implements BeJSONFunctions {
|
|
|
146
146
|
*/
|
|
147
147
|
fractionOfProjectionToLine(startPoint: Point2d, endPoint: Point2d, defaultFraction?: number): number;
|
|
148
148
|
}
|
|
149
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* 2D vector with `x`,`y` as properties
|
|
150
151
|
* @public
|
|
151
152
|
*/
|
|
152
153
|
export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
@@ -167,13 +168,13 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
167
168
|
static unitY(scale?: number): Vector2d;
|
|
168
169
|
/** Return a Vector2d with components 0,0 */
|
|
169
170
|
static createZero(result?: Vector2d): Vector2d;
|
|
170
|
-
/**
|
|
171
|
+
/** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d, or leading entries of Float64Array */
|
|
171
172
|
static createFrom(data: XAndY | Float64Array, result?: Vector2d): Vector2d;
|
|
172
173
|
/**
|
|
173
174
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
174
175
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
175
176
|
* @param json the JSON input
|
|
176
|
-
|
|
177
|
+
*/
|
|
177
178
|
static fromJSON(json?: XYProps): Vector2d;
|
|
178
179
|
/** Return a new Vector2d from polar coordinates for radius and Angle from x axis */
|
|
179
180
|
static createPolar(r: number, theta: Angle): Vector2d;
|
|
@@ -188,7 +189,8 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
188
189
|
* @param offset offset distance
|
|
189
190
|
*/
|
|
190
191
|
static createOffsetBisector(unitPerpA: Vector2d, unitPerpB: Vector2d, offset: number): Vector2d | undefined;
|
|
191
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* Return a (new or optionally reused) vector which is `this` divided by `denominator`
|
|
192
194
|
* * return undefined if denominator is zero.
|
|
193
195
|
*/
|
|
194
196
|
safeDivideOrNull(denominator: number, result?: Vector2d): Vector2d | undefined;
|
|
@@ -200,7 +202,7 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
200
202
|
* it's returning the length of the projection as a fraction of the target magnitude.
|
|
201
203
|
* @param target the target vector
|
|
202
204
|
* @param defaultFraction the returned value in case magnitude square of target vector is very small
|
|
203
|
-
|
|
205
|
+
*/
|
|
204
206
|
fractionOfProjectionToVector(target: Vector2d, defaultFraction?: number): number;
|
|
205
207
|
/** Return a new vector with components negated from this instance. */
|
|
206
208
|
negate(result?: Vector2d): Vector2d;
|
|
@@ -210,18 +212,19 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
210
212
|
rotate90CWXY(result?: Vector2d): Vector2d;
|
|
211
213
|
/** Return a unit vector perpendicular to this instance. */
|
|
212
214
|
unitPerpendicularXY(result?: Vector2d): Vector2d;
|
|
213
|
-
/**
|
|
215
|
+
/** Return a new Vector2d rotated CCW by given angle */
|
|
214
216
|
rotateXY(angle: Angle, result?: Vector2d): Vector2d;
|
|
215
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* Return a vector computed at fractional position between this vector and vectorB
|
|
216
219
|
* @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`.
|
|
217
220
|
* True fractions are "between", negatives are "before this", beyond 1 is "beyond vectorB".
|
|
218
221
|
* @param vectorB second vector
|
|
219
222
|
* @param result optional preallocated result.
|
|
220
223
|
*/
|
|
221
224
|
interpolate(fraction: number, vectorB: Vector2d, result?: Vector2d): Vector2d;
|
|
222
|
-
/**
|
|
225
|
+
/** Return {this + vector}. */
|
|
223
226
|
plus(vector: XAndY, result?: Vector2d): Vector2d;
|
|
224
|
-
/**
|
|
227
|
+
/** Return {this - vector}. */
|
|
225
228
|
minus(vector: XAndY, result?: Vector2d): Vector2d;
|
|
226
229
|
/** Return {point + vector \* scalar} */
|
|
227
230
|
plusScaled(vector: XAndY, scaleFactor: number, result?: Vector2d): Vector2d;
|
|
@@ -231,21 +234,21 @@ export declare class Vector2d extends XY implements BeJSONFunctions {
|
|
|
231
234
|
plus3Scaled(vectorA: XAndY, scalarA: number, vectorB: XAndY, scalarB: number, vectorC: XAndY, scalarC: number, result?: Vector2d): Vector2d;
|
|
232
235
|
/** Return {this * scale} */
|
|
233
236
|
scale(scale: number, result?: Vector2d): Vector2d;
|
|
234
|
-
/**
|
|
237
|
+
/** Return a vector parallel to this but with specified length */
|
|
235
238
|
scaleToLength(length: number, result?: Vector2d): Vector2d | undefined;
|
|
236
|
-
/**
|
|
239
|
+
/** Return the dot product of this with vectorB */
|
|
237
240
|
dotProduct(vectorB: XAndY): number;
|
|
238
|
-
/**
|
|
241
|
+
/** Dot product with vector from pointA to pointB */
|
|
239
242
|
dotProductStartEnd(pointA: XAndY, pointB: XAndY): number;
|
|
240
|
-
/**
|
|
243
|
+
/** Vector cross product {this CROSS vectorB} */
|
|
241
244
|
crossProduct(vectorB: XAndY): number;
|
|
242
245
|
/**
|
|
243
|
-
*
|
|
246
|
+
* Return the radians (as a simple number, not strongly typed Angle) signed angle from this to vectorB.
|
|
244
247
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
245
248
|
*/
|
|
246
249
|
radiansTo(vectorB: XAndY): number;
|
|
247
250
|
/**
|
|
248
|
-
*
|
|
251
|
+
* Return the (strongly typed) signed angle from this to vectorB.
|
|
249
252
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
250
253
|
*/
|
|
251
254
|
angleTo(vectorB: XAndY): Angle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Point2dVector2d.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/Point2dVector2d.ts"],"names":[],"mappings":"AAKA;;GAEG;AAIH,OAAO,EAAE,eAAe,EAAY,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"Point2dVector2d.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/Point2dVector2d.ts"],"names":[],"mappings":"AAKA;;GAEG;AAIH,OAAO,EAAE,eAAe,EAAY,mBAAmB,EAAE,MAAM,aAAa,CA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AQ,EAAE,gCAAgC,GAAE,OAAe,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAChG,OAAO;CAUX"}
|
|
@@ -9,10 +9,11 @@ exports.Vector2d = exports.Point2d = exports.XY = void 0;
|
|
|
9
9
|
* @module CartesianGeometry
|
|
10
10
|
*/
|
|
11
11
|
// cspell:word JSONXY
|
|
12
|
-
// cspell:word CWXY
|
|
12
|
+
// cspell:word CWXY CCWXY
|
|
13
13
|
const Geometry_1 = require("../Geometry");
|
|
14
14
|
const Angle_1 = require("./Angle");
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Minimal object containing x,y and operations that are meaningful without change in both point and vector.
|
|
16
17
|
* * `XY` is not instantiable.
|
|
17
18
|
* * The derived (instantiable) classes are
|
|
18
19
|
* * `Point2d`
|
|
@@ -57,11 +58,11 @@ class XY {
|
|
|
57
58
|
isAlmostEqualXY(x, y, tol) {
|
|
58
59
|
return Geometry_1.Geometry.isSameCoordinate(this.x, x, tol) && Geometry_1.Geometry.isSameCoordinate(this.y, y, tol);
|
|
59
60
|
}
|
|
60
|
-
/**
|
|
61
|
+
/** Return a json array `[x,y]` */
|
|
61
62
|
toJSON() {
|
|
62
63
|
return [this.x, this.y];
|
|
63
64
|
}
|
|
64
|
-
/**
|
|
65
|
+
/** Return a json object `{x: 1, y:2}` */
|
|
65
66
|
toJSONXY() {
|
|
66
67
|
return { x: this.x, y: this.y };
|
|
67
68
|
}
|
|
@@ -69,7 +70,7 @@ class XY {
|
|
|
69
70
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
70
71
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
71
72
|
* @param json the JSON input
|
|
72
|
-
|
|
73
|
+
*/
|
|
73
74
|
setFromJSON(json) {
|
|
74
75
|
if (Array.isArray(json)) {
|
|
75
76
|
this.set(json[0] || 0, json[1] || 0);
|
|
@@ -97,17 +98,13 @@ class XY {
|
|
|
97
98
|
maxDiff(other) {
|
|
98
99
|
return Math.max(Math.abs(this.x - other.x), Math.abs(this.y - other.y));
|
|
99
100
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Return the x,y component corresponding to 0,1.
|
|
102
|
-
*/
|
|
101
|
+
/** Return the x,y component corresponding to 0,1 */
|
|
103
102
|
at(index) {
|
|
104
103
|
if (index < 0.5)
|
|
105
104
|
return this.x;
|
|
106
105
|
return this.y;
|
|
107
106
|
}
|
|
108
|
-
/**
|
|
109
|
-
* Set value at index 0 or 1.
|
|
110
|
-
*/
|
|
107
|
+
/** Set value at index 0 or 1 */
|
|
111
108
|
setAt(index, value) {
|
|
112
109
|
if (index < 0.5)
|
|
113
110
|
this.x = value;
|
|
@@ -124,7 +121,7 @@ class XY {
|
|
|
124
121
|
}
|
|
125
122
|
return index;
|
|
126
123
|
}
|
|
127
|
-
/**
|
|
124
|
+
/** Returns true if the x,y components are both small by metric metric tolerance */
|
|
128
125
|
get isAlmostZero() {
|
|
129
126
|
return Geometry_1.Geometry.isSmallMetricDistance(this.x) && Geometry_1.Geometry.isSmallMetricDistance(this.y);
|
|
130
127
|
}
|
|
@@ -140,11 +137,11 @@ class XY {
|
|
|
140
137
|
magnitudeSquared() {
|
|
141
138
|
return this.x * this.x + this.y * this.y;
|
|
142
139
|
}
|
|
143
|
-
/**
|
|
140
|
+
/** Returns true if the x,y components are exactly equal. */
|
|
144
141
|
isExactEqual(other) {
|
|
145
142
|
return this.x === other.x && this.y === other.y;
|
|
146
143
|
}
|
|
147
|
-
/**
|
|
144
|
+
/** Returns true if x,y match `other` within metric tolerance */
|
|
148
145
|
isAlmostEqualMetric(other, distanceTol = Geometry_1.Geometry.smallMetricDistance) {
|
|
149
146
|
return this.maxDiff(other) <= distanceTol;
|
|
150
147
|
}
|
|
@@ -156,7 +153,7 @@ class XY {
|
|
|
156
153
|
unitVectorTo(other, result) {
|
|
157
154
|
return this.vectorTo(other, result).normalize(result);
|
|
158
155
|
}
|
|
159
|
-
/**
|
|
156
|
+
/** Cross product of vectors from origin to targets */
|
|
160
157
|
static crossProductToPoints(origin, targetA, targetB) {
|
|
161
158
|
return Geometry_1.Geometry.crossProductXYXY(targetA.x - origin.x, targetA.y - origin.y, targetB.x - origin.x, targetB.y - origin.y);
|
|
162
159
|
}
|
|
@@ -170,7 +167,7 @@ class Point2d extends XY {
|
|
|
170
167
|
constructor(x = 0, y = 0) {
|
|
171
168
|
super(x, y);
|
|
172
169
|
}
|
|
173
|
-
/**
|
|
170
|
+
/** Return a new Point2d with x,y coordinates from this. */
|
|
174
171
|
clone(result) {
|
|
175
172
|
return Point2d.create(this.x, this.y, result);
|
|
176
173
|
}
|
|
@@ -192,7 +189,7 @@ class Point2d extends XY {
|
|
|
192
189
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
193
190
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
194
191
|
* @param json the JSON input
|
|
195
|
-
|
|
192
|
+
*/
|
|
196
193
|
static fromJSON(json) {
|
|
197
194
|
const val = new Point2d();
|
|
198
195
|
val.setFromJSON(json);
|
|
@@ -208,7 +205,8 @@ class Point2d extends XY {
|
|
|
208
205
|
static createZero(result) {
|
|
209
206
|
return Point2d.create(0, 0, result);
|
|
210
207
|
}
|
|
211
|
-
/**
|
|
208
|
+
/**
|
|
209
|
+
* Starting at this point, move along vector by tangentFraction of the vector length, and then
|
|
212
210
|
* to the left by leftFraction of the perpendicular vector length.
|
|
213
211
|
* @param tangentFraction distance to move along the vector, as a fraction of vector
|
|
214
212
|
* @param leftFraction distance to move perpendicular to the vector, as a fraction of the rotated vector
|
|
@@ -219,7 +217,8 @@ class Point2d extends XY {
|
|
|
219
217
|
const dy = vector.y;
|
|
220
218
|
return Point2d.create(this.x + tangentFraction * dx - leftFraction * dy, this.y + tangentFraction * dy + leftFraction * dx);
|
|
221
219
|
}
|
|
222
|
-
/**
|
|
220
|
+
/**
|
|
221
|
+
* Interpolate at tangentFraction between this instance and point, and then Move by leftFraction
|
|
223
222
|
* along the xy perpendicular of the vector between the points.
|
|
224
223
|
*/
|
|
225
224
|
forwardLeftInterpolate(tangentFraction, leftFraction, point) {
|
|
@@ -282,7 +281,8 @@ class Point2d extends XY {
|
|
|
282
281
|
const y2 = target2.y - this.y;
|
|
283
282
|
return x1 * y2 - y1 * x2;
|
|
284
283
|
}
|
|
285
|
-
/**
|
|
284
|
+
/**
|
|
285
|
+
* Return the fractional coordinate of the projection of this instance x,y onto the
|
|
286
286
|
* line from startPoint to endPoint.
|
|
287
287
|
* @param startPoint start point of line
|
|
288
288
|
* @param endPoint end point of line
|
|
@@ -297,7 +297,8 @@ class Point2d extends XY {
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
exports.Point2d = Point2d;
|
|
300
|
-
/**
|
|
300
|
+
/**
|
|
301
|
+
* 2D vector with `x`,`y` as properties
|
|
301
302
|
* @public
|
|
302
303
|
*/
|
|
303
304
|
class Vector2d extends XY {
|
|
@@ -335,7 +336,7 @@ class Vector2d extends XY {
|
|
|
335
336
|
static createZero(result) {
|
|
336
337
|
return Vector2d.create(0, 0, result);
|
|
337
338
|
}
|
|
338
|
-
/**
|
|
339
|
+
/** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d, or leading entries of Float64Array */
|
|
339
340
|
static createFrom(data, result) {
|
|
340
341
|
if (data instanceof Float64Array) {
|
|
341
342
|
if (data.length >= 2)
|
|
@@ -350,7 +351,7 @@ class Vector2d extends XY {
|
|
|
350
351
|
* Set x and y from a JSON input such as `[1,2]` or `{x:1, y:2}`
|
|
351
352
|
* * If no JSON input is provided, 0 would be used as default values for x and y.
|
|
352
353
|
* @param json the JSON input
|
|
353
|
-
|
|
354
|
+
*/
|
|
354
355
|
static fromJSON(json) {
|
|
355
356
|
const val = new Vector2d();
|
|
356
357
|
val.setFromJSON(json);
|
|
@@ -382,7 +383,8 @@ class Vector2d extends XY {
|
|
|
382
383
|
}
|
|
383
384
|
return undefined;
|
|
384
385
|
}
|
|
385
|
-
/**
|
|
386
|
+
/**
|
|
387
|
+
* Return a (new or optionally reused) vector which is `this` divided by `denominator`
|
|
386
388
|
* * return undefined if denominator is zero.
|
|
387
389
|
*/
|
|
388
390
|
safeDivideOrNull(denominator, result) {
|
|
@@ -403,7 +405,7 @@ class Vector2d extends XY {
|
|
|
403
405
|
* it's returning the length of the projection as a fraction of the target magnitude.
|
|
404
406
|
* @param target the target vector
|
|
405
407
|
* @param defaultFraction the returned value in case magnitude square of target vector is very small
|
|
406
|
-
|
|
408
|
+
*/
|
|
407
409
|
fractionOfProjectionToVector(target, defaultFraction) {
|
|
408
410
|
/*
|
|
409
411
|
* projection length is (this.target)/||target||
|
|
@@ -458,7 +460,7 @@ class Vector2d extends XY {
|
|
|
458
460
|
}
|
|
459
461
|
return result;
|
|
460
462
|
}
|
|
461
|
-
/**
|
|
463
|
+
/** Return a new Vector2d rotated CCW by given angle */
|
|
462
464
|
rotateXY(angle, result) {
|
|
463
465
|
const s = angle.sin();
|
|
464
466
|
const c = angle.cos();
|
|
@@ -470,7 +472,8 @@ class Vector2d extends XY {
|
|
|
470
472
|
result.y = xx * s + yy * c;
|
|
471
473
|
return result;
|
|
472
474
|
}
|
|
473
|
-
/**
|
|
475
|
+
/**
|
|
476
|
+
* Return a vector computed at fractional position between this vector and vectorB
|
|
474
477
|
* @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`.
|
|
475
478
|
* True fractions are "between", negatives are "before this", beyond 1 is "beyond vectorB".
|
|
476
479
|
* @param vectorB second vector
|
|
@@ -493,14 +496,14 @@ class Vector2d extends XY {
|
|
|
493
496
|
}
|
|
494
497
|
return result;
|
|
495
498
|
}
|
|
496
|
-
/**
|
|
499
|
+
/** Return {this + vector}. */
|
|
497
500
|
plus(vector, result) {
|
|
498
501
|
result = result ? result : new Vector2d();
|
|
499
502
|
result.x = this.x + vector.x;
|
|
500
503
|
result.y = this.y + vector.y;
|
|
501
504
|
return result;
|
|
502
505
|
}
|
|
503
|
-
/**
|
|
506
|
+
/** Return {this - vector}. */
|
|
504
507
|
minus(vector, result) {
|
|
505
508
|
result = result ? result : new Vector2d();
|
|
506
509
|
result.x = this.x - vector.x;
|
|
@@ -535,34 +538,34 @@ class Vector2d extends XY {
|
|
|
535
538
|
result.y = this.y * scale;
|
|
536
539
|
return result;
|
|
537
540
|
}
|
|
538
|
-
/**
|
|
541
|
+
/** Return a vector parallel to this but with specified length */
|
|
539
542
|
scaleToLength(length, result) {
|
|
540
543
|
const mag = Geometry_1.Geometry.correctSmallMetricDistance(this.magnitude());
|
|
541
544
|
if (mag === 0)
|
|
542
545
|
return undefined;
|
|
543
546
|
return this.scale(length / mag, result);
|
|
544
547
|
}
|
|
545
|
-
/**
|
|
548
|
+
/** Return the dot product of this with vectorB */
|
|
546
549
|
dotProduct(vectorB) {
|
|
547
550
|
return this.x * vectorB.x + this.y * vectorB.y;
|
|
548
551
|
}
|
|
549
|
-
/**
|
|
552
|
+
/** Dot product with vector from pointA to pointB */
|
|
550
553
|
dotProductStartEnd(pointA, pointB) {
|
|
551
554
|
return this.x * (pointB.x - pointA.x) + this.y * (pointB.y - pointA.y);
|
|
552
555
|
}
|
|
553
|
-
/**
|
|
556
|
+
/** Vector cross product {this CROSS vectorB} */
|
|
554
557
|
crossProduct(vectorB) {
|
|
555
558
|
return this.x * vectorB.y - this.y * vectorB.x;
|
|
556
559
|
}
|
|
557
560
|
/**
|
|
558
|
-
*
|
|
561
|
+
* Return the radians (as a simple number, not strongly typed Angle) signed angle from this to vectorB.
|
|
559
562
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
560
563
|
*/
|
|
561
564
|
radiansTo(vectorB) {
|
|
562
565
|
return Math.atan2(this.crossProduct(vectorB), this.dotProduct(vectorB));
|
|
563
566
|
}
|
|
564
567
|
/**
|
|
565
|
-
*
|
|
568
|
+
* Return the (strongly typed) signed angle from this to vectorB.
|
|
566
569
|
* This is positive if the shortest turn is counterclockwise, negative if clockwise.
|
|
567
570
|
*/
|
|
568
571
|
angleTo(vectorB) {
|