@itwin/core-geometry 5.2.0-dev.26 → 5.2.0-dev.28
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.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.d.ts +10 -3
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +9 -2
- 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.d.ts +12 -9
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +17 -12
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +20 -3
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +22 -5
- 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.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +30 -50
- 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.d.ts +18 -9
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +53 -26
- 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.d.ts +16 -0
- package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js +26 -0
- 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.d.ts +1 -3
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +2 -6
- 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.d.ts +2 -0
- package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js +7 -3
- 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.d.ts +10 -3
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +9 -2
- 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.d.ts +12 -9
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +17 -12
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +20 -3
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +22 -5
- 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.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +30 -50
- 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.d.ts +18 -9
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +53 -26
- 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.d.ts +16 -0
- package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js +26 -0
- 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.d.ts +1 -3
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +2 -6
- 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.d.ts +2 -0
- package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js +7 -3
- 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":"Point3dVector3d.js","sourceRoot":"","sources":["../../../src/geometry3d/Point3dVector3d.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,0CAA4D;AAE5D,mCAAgC;AAChC,yCAA2D;AAE3D;;;;;;;;GAQG;AACH,MAAa,GAAG;IACd,mBAAmB;IACZ,CAAC,CAAS;IACjB,mBAAmB;IACZ,CAAC,CAAS;IACjB,mBAAmB;IACZ,CAAC,CAAS;IACjB;;;;;OAKG;IACI,GAAG,CAAC,IAAY,CAAC,EAAE,IAAY,CAAC,EAAE,IAAY,CAAC;QACpD,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IACD,mCAAmC;IAC5B,OAAO;QACZ,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IACD,YAAsB,IAAY,CAAC,EAAE,IAAY,CAAC,EAAE,IAAY,CAAC;QAC/D,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CA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,EAAE,GAAG,EAAE,CAAC;IAC9C,CAAC;IACD;;;;;;;OAOG;IACI,iBAAiB,CACtB,KAAe,EAAE,mCAA4C,KAAK,EAAE,OAA6B;QAEjG,MAAM,gBAAgB,GAAW,OAAO,EAAE,gBAAgB,IAAI,mBAAQ,CAAC,wBAAwB,CAAC;QAChG,MAAM,kBAAkB,GAAW,OAAO,EAAE,kBAAkB,IAAI,mBAAQ,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;AA55BD,4BA45BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\n\r\nimport { Geometry, PerpParallelOptions } from \"../Geometry\";\r\nimport { Point4d } from \"../geometry4d/Point4d\";\r\nimport { Angle } from \"./Angle\";\r\nimport { HasZ, XAndY, XYAndZ, XYZProps } from \"./XYZProps\";\r\n\r\n/**\r\n * * `XYZ` is a minimal object containing x,y,z and operations that are meaningful without change in both\r\n * point and vector.\r\n * * `XYZ` is not instantiable.\r\n * * The derived (instantiable) classes are\r\n * * `Point3d`\r\n * * `Vector3d`\r\n * @public\r\n */\r\nexport class XYZ implements XYAndZ {\r\n /** x coordinate */\r\n public x: number;\r\n /** y coordinate */\r\n public y: number;\r\n /** z coordinate */\r\n public z: number;\r\n /**\r\n * Set the x,y,z parts.\r\n * @param x (optional) x part\r\n * @param y (optional) y part\r\n * @param z (optional) z part\r\n */\r\n public set(x: number = 0, y: number = 0, z: number = 0) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n /** Set the x,y,z parts to zero. */\r\n public setZero() {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n protected constructor(x: number = 0, y: number = 0, z: number = 0) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n /** Type guard for XAndY.\r\n * @note this will return true for an XYAndZ. If you wish to distinguish between the two, call isXYAndZ first.\r\n */\r\n public static isXAndY(arg: any): arg is XAndY {\r\n return arg.x !== undefined && arg.y !== undefined;\r\n }\r\n /** Type guard to determine whether an object has a member called \"z\" */\r\n public static hasZ(arg: any): arg is HasZ {\r\n return arg.z !== undefined;\r\n }\r\n /** Type guard for XYAndZ. */\r\n public static isXYAndZ(arg: any): arg is XYAndZ {\r\n return this.isXAndY(arg) && this.hasZ(arg);\r\n }\r\n /**\r\n * Test if arg is any of:\r\n * * XAndY\r\n * * XYAndZ\r\n * * [number,number]\r\n * * [number,number,number]\r\n */\r\n public static isAnyImmediatePointType(arg: any): arg is XAndY | XYAndZ | number[] {\r\n return Point3d.isXAndY(arg) || Geometry.isNumberArray(arg, 2);\r\n }\r\n /**\r\n * Look for (in order) an x coordinate present as:\r\n * * arg.x\r\n * * arg[0]\r\n */\r\n public static accessX(arg: any, defaultValue?: number): number | undefined {\r\n if (arg.x !== undefined)\r\n return arg.x;\r\n if (Array.isArray(arg) && arg.length > 0 && Number.isFinite(arg[0]))\r\n return arg[0];\r\n return defaultValue;\r\n }\r\n /**\r\n * Look for (in order) a y coordinate present as:\r\n * * arg.y\r\n * * arg[1]\r\n */\r\n public static accessY(arg: any, defaultValue?: number): number | undefined {\r\n if (arg.y !== undefined)\r\n return arg.y;\r\n if (Array.isArray(arg) && arg.length > 1 && Number.isFinite(arg[1]))\r\n return arg[1];\r\n return defaultValue;\r\n }\r\n /**\r\n * Look for (in order) a z coordinate present as:\r\n * * arg.z\r\n * * arg[2]\r\n */\r\n public static accessZ(arg: any, defaultValue?: number): number | undefined {\r\n if (arg.z !== undefined)\r\n return arg.z;\r\n if (Array.isArray(arg) && arg.length > 2 && Number.isFinite(arg[2]))\r\n return arg[2];\r\n return defaultValue;\r\n }\r\n /**\r\n * Set the x,y,z parts from one of these input types\r\n * * XYZ -- copy the x,y,z parts\r\n * * Float64Array -- Copy from indices 0,1,2 to x,y,z\r\n * * XY -- copy the x, y parts and set z=0\r\n */\r\n public setFrom(other: Float64Array | XAndY | XYAndZ | undefined) {\r\n if (other === undefined) {\r\n this.setZero();\r\n } else if (XYZ.isXAndY(other)) {\r\n this.x = other.x;\r\n this.y = other.y;\r\n this.z = XYZ.hasZ(other) ? other.z : 0;\r\n } else {\r\n this.x = other[0];\r\n this.y = other[1];\r\n this.z = other[2];\r\n }\r\n }\r\n /**\r\n * Set the x,y,z parts from a Point3d.\r\n * This is the same effect as `setFrom(other)` with no pretesting of variant input type\r\n * * Set to zeros if `other` is undefined.\r\n */\r\n public setFromPoint3d(other?: XYAndZ) {\r\n if (other) {\r\n this.x = other.x;\r\n this.y = other.y;\r\n this.z = other.z;\r\n } else {\r\n this.setZero();\r\n }\r\n }\r\n /**\r\n * Set the x,y,z parts from a Vector3d\r\n * This is the same effect as `setFrom(other)` with no pretesting of variant input type\r\n * * Set to zeros if `other` is undefined.\r\n */\r\n public setFromVector3d(other?: Vector3d) {\r\n if (other) {\r\n this.x = other.x;\r\n this.y = other.y;\r\n this.z = other.z;\r\n } else {\r\n this.setZero();\r\n }\r\n }\r\n /**\r\n * Returns true if this and other have equal x,y,z parts within Geometry.smallMetricDistance.\r\n * @param other The other XYAndZ to compare\r\n * @param tol The tolerance for the comparison. If undefined, use [[Geometry.smallMetricDistance]]\r\n */\r\n public isAlmostEqual(other: Readonly<XYAndZ>, tol?: number): boolean {\r\n return XYAndZ.almostEqual(this, other, tol);\r\n }\r\n /** Return true if this and other have equal x,y,z parts within Geometry.smallMetricDistance. */\r\n public isAlmostEqualXYZ(x: number, y: number, z: number, tol?: number): boolean {\r\n return Geometry.isSameCoordinate(this.x, x, tol)\r\n && Geometry.isSameCoordinate(this.y, y, tol)\r\n && Geometry.isSameCoordinate(this.z, z, tol);\r\n }\r\n /**\r\n * Return true if this and {other + vector*scale} have equal x,y,z parts within Geometry.smallMetricDistance.\r\n * * this method is useful in testing \"point on ray\" without explicitly constructing the projection point\r\n */\r\n public isAlmostEqualPointPlusScaledVector(other: XYAndZ, vector: XYAndZ, scale: number, tol?: number): boolean {\r\n return Geometry.isSameCoordinate(this.x, other.x + vector.x * scale, tol)\r\n && Geometry.isSameCoordinate(this.y, other.y + vector.y * scale, tol)\r\n && Geometry.isSameCoordinate(this.z, other.z + vector.z * scale, tol);\r\n }\r\n /** Return true if this and other have equal x,y parts within Geometry.smallMetricDistance. */\r\n public isAlmostEqualXY(other: XAndY, tol?: number): boolean {\r\n return Geometry.isSameCoordinate(this.x, other.x, tol)\r\n && Geometry.isSameCoordinate(this.y, other.y, tol);\r\n }\r\n /** Return a JSON object as array `[x,y,z]` */\r\n public toJSON(): XYZProps {\r\n return this.toArray();\r\n }\r\n /** Return as an array `[x,y,z]` */\r\n public toArray(): number[] {\r\n return [this.x, this.y, this.z];\r\n }\r\n /** Return a JSON object as key value pairs `{x: value, y: value, z: value}` */\r\n public toJSONXYZ(): XYZProps {\r\n return { x: this.x, y: this.y, z: this.z };\r\n }\r\n /** Pack the x,y,z values in a Float64Array. */\r\n public toFloat64Array(): Float64Array {\r\n return Float64Array.of(this.x, this.y, this.z);\r\n }\r\n /**\r\n * Set the x,y,z properties from one of several json forms:\r\n *\r\n * * array of numbers: [x,y,z]\r\n * * object with x,y, and (optional) z as numeric properties {x: xValue, y: yValue, z: zValue}\r\n */\r\n public setFromJSON(json?: XYZProps): void {\r\n if (Array.isArray(json)) {\r\n this.set(json[0] || 0, json[1] || 0, json[2] || 0);\r\n return;\r\n }\r\n if (json) {\r\n this.set(json.x || 0, json.y || 0, json.z || 0);\r\n return;\r\n }\r\n this.set(0, 0, 0);\r\n }\r\n /** Return the distance from this point to other */\r\n public distance(other: XYAndZ): number {\r\n const xDist = other.x - this.x;\r\n const yDist = other.y - this.y;\r\n const zDist = other.z - this.z;\r\n return (Math.sqrt(xDist * xDist + yDist * yDist + zDist * zDist));\r\n }\r\n /** Return squared distance from this point to other */\r\n public distanceSquared(other: XYAndZ): number {\r\n const xDist = other.x - this.x;\r\n const yDist = other.y - this.y;\r\n const zDist = other.z - this.z;\r\n return (xDist * xDist + yDist * yDist + zDist * zDist);\r\n }\r\n /** Return the XY distance from this point to other */\r\n public distanceXY(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 XY distance from this point to other */\r\n public distanceSquaredXY(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: XYAndZ): number {\r\n return Math.max(Math.abs(this.x - other.x), Math.abs(this.y - other.y), Math.abs(this.z - other.z));\r\n }\r\n /** Return the x,y, z component corresponding to 0,1,2 */\r\n public at(index: number): number {\r\n if (index < 0.5)\r\n return this.x;\r\n if (index > 1.5)\r\n return this.z;\r\n return this.y;\r\n }\r\n /** Set value at index 0 or 1 or 2 */\r\n public setAt(index: number, value: number): void {\r\n if (index < 0.5)\r\n this.x = value;\r\n else if (index > 1.5)\r\n this.z = value;\r\n else\r\n this.y = value;\r\n }\r\n /** Return the index (0,1,2) of the x,y,z component with largest absolute value */\r\n public indexOfMaxAbs(): number {\r\n let index = 0;\r\n let a = Math.abs(this.x);\r\n let b = Math.abs(this.y);\r\n if (b > a) {\r\n index = 1;\r\n a = b;\r\n }\r\n b = Math.abs(this.z);\r\n if (b > a) {\r\n index = 2;\r\n }\r\n return index;\r\n }\r\n /** Return true if the x,y,z components are all nearly zero to tolerance Geometry.smallMetricDistance */\r\n public get isAlmostZero(): boolean {\r\n return Geometry.isSmallMetricDistance(this.x) &&\r\n Geometry.isSmallMetricDistance(this.y) &&\r\n Geometry.isSmallMetricDistance(this.z);\r\n }\r\n /** Return true if the x,y,z components are all exactly zero */\r\n public get isZero(): boolean {\r\n return this.x === 0.0 && this.y === 0.0 && this.z === 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), Math.abs(this.z));\r\n }\r\n /** Return the sqrt of the sum of squared x,y,z parts */\r\n public magnitude(): number {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n }\r\n /** Return the sum of squared x,y,z parts */\r\n public magnitudeSquared(): number {\r\n return this.x * this.x + this.y * this.y + this.z * this.z;\r\n }\r\n /** Return sqrt of the sum of squared x,y parts */\r\n public magnitudeXY(): number {\r\n return Math.sqrt(this.x * this.x + this.y * this.y);\r\n }\r\n /** Return the sum of squared x,y parts */\r\n public magnitudeSquaredXY(): number {\r\n return this.x * this.x + this.y * this.y;\r\n }\r\n /** Exact equality test. */\r\n public isExactEqual(other: XYAndZ): boolean {\r\n return this.x === other.x && this.y === other.y && this.z === other.z;\r\n }\r\n /** Equality test with Geometry.smallMetricDistance tolerance */\r\n public isAlmostEqualMetric(other: XYAndZ): boolean {\r\n return this.maxDiff(other) <= Geometry.smallMetricDistance;\r\n }\r\n /** Add x,y,z from other in place. */\r\n public addInPlace(other: XYAndZ): void {\r\n this.x += other.x;\r\n this.y += other.y;\r\n this.z += other.z;\r\n }\r\n /** Subtract x,y,z from other in place. */\r\n public subtractInPlace(other: XYAndZ): void {\r\n this.x -= other.x;\r\n this.y -= other.y;\r\n this.z -= other.z;\r\n }\r\n /** Add (in place) the scaled x,y,z of other */\r\n public addScaledInPlace(other: XYAndZ, scale: number): void {\r\n this.x += scale * other.x;\r\n this.y += scale * other.y;\r\n this.z += scale * other.z;\r\n }\r\n /** Multiply the x, y, z parts by scale. */\r\n public scaleInPlace(scale: number) {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n /** Add to x, y, z parts */\r\n public addXYZInPlace(dx: number = 0.0, dy: number = 0.0, dz: number = 0.0) {\r\n this.x += dx;\r\n this.y += dy;\r\n this.z += dz;\r\n }\r\n /** Clone strongly typed as Point3d */\r\n public cloneAsPoint3d(): Point3d {\r\n return Point3d.create(this.x, this.y, this.z);\r\n }\r\n /** Return a (full length) vector from this point to other */\r\n public vectorTo(other: XYAndZ, result?: Vector3d): Vector3d {\r\n return Vector3d.create(other.x - this.x, other.y - this.y, other.z - this.z, result);\r\n }\r\n /** Return a multiple of a the (full length) vector from this point to other */\r\n public scaledVectorTo(other: XYAndZ, scale: number, result?: Vector3d): Vector3d {\r\n return Vector3d.create(scale * (other.x - this.x),\r\n scale * (other.y - this.y),\r\n scale * (other.z - this.z), result);\r\n }\r\n /**\r\n * Return a unit vector from this vector to other. Return a 000 vector if the input is too small to normalize.\r\n * @param other target of created vector.\r\n * @param result optional result vector.\r\n */\r\n public unitVectorTo(target: XYAndZ, result?: Vector3d): Vector3d | undefined {\r\n return this.vectorTo(target, result).normalize(result);\r\n }\r\n /** Freeze this XYZ */\r\n public freeze(): Readonly<this> {\r\n return Object.freeze(this);\r\n }\r\n /** Access x part of XYZProps (which may be .x or [0]) */\r\n public static x(xyz: XYZProps | undefined, defaultValue: number = 0): number {\r\n if (xyz === undefined)\r\n return defaultValue;\r\n if (Array.isArray(xyz))\r\n return xyz[0];\r\n if (xyz.x !== undefined)\r\n return xyz.x;\r\n return defaultValue;\r\n }\r\n /** Access x part of XYZProps (which may be .x or [0]) */\r\n public static y(xyz: XYZProps | undefined, defaultValue: number = 0): number {\r\n if (xyz === undefined)\r\n return defaultValue;\r\n if (Array.isArray(xyz))\r\n return xyz[1];\r\n if (xyz.y !== undefined)\r\n return xyz.y;\r\n return defaultValue;\r\n }\r\n /** Access x part of XYZProps (which may be .x or [0]) */\r\n public static z(xyz: XYZProps | undefined, defaultValue: number = 0): number {\r\n if (xyz === undefined)\r\n return defaultValue;\r\n if (Array.isArray(xyz))\r\n return xyz[2];\r\n if (xyz.z !== undefined)\r\n return xyz.z;\r\n return defaultValue;\r\n }\r\n}\r\n\r\n/** 3D point with `x`,`y`,`z` as properties\r\n * @public\r\n */\r\nexport class Point3d extends XYZ {\r\n /** Constructor for Point3d */\r\n constructor(x: number = 0, y: number = 0, z: number = 0) {\r\n super(x, y, z);\r\n }\r\n /**\r\n * Convert json to Point3d. Accepted forms are:\r\n * * `[1,2,3]` --- array of numbers\r\n * * array of numbers: [x,y,z]\r\n * * object with x,y, and (optional) z as numeric properties {x: xValue, y: yValue, z: zValue}\r\n * @param json json value.\r\n */\r\n public static fromJSON(json?: XYZProps): Point3d {\r\n const val = new Point3d();\r\n val.setFromJSON(json);\r\n return val;\r\n }\r\n /** Return a new Point3d with the same coordinates */\r\n public clone(result?: Point3d): Point3d {\r\n return Point3d.create(this.x, this.y, this.z, result);\r\n }\r\n /**\r\n * Create a new Point3d with given coordinates\r\n * @param x x part\r\n * @param y y part\r\n * @param z z part\r\n */\r\n public static create(x: number = 0, y: number = 0, z: number = 0, result?: Point3d): Point3d {\r\n if (result) {\r\n result.x = x;\r\n result.y = y;\r\n result.z = z;\r\n return result;\r\n }\r\n return new Point3d(x, y, z);\r\n }\r\n /** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d */\r\n public static createFrom(data: XYAndZ | XAndY | Float64Array, result?: Point3d): Point3d {\r\n if (data instanceof Float64Array) {\r\n let x = 0;\r\n let y = 0;\r\n let z = 0;\r\n if (data.length > 0)\r\n x = data[0];\r\n if (data.length > 1)\r\n y = data[1];\r\n if (data.length > 2)\r\n z = data[2];\r\n return Point3d.create(x, y, z, result);\r\n }\r\n return Point3d.create(data.x, data.y, XYZ.hasZ(data) ? data.z : 0, result);\r\n }\r\n /**\r\n * Copy x,y,z from\r\n * @param xyzData flat array of xyzxyz for multiple points\r\n * @param pointIndex index of point to extract. This index is multiplied by 3 to obtain starting index in the array.\r\n * @param result optional result point.\r\n */\r\n public static createFromPacked(xyzData: Float64Array, pointIndex: number, result?: Point3d): Point3d | undefined {\r\n const indexX = pointIndex * 3;\r\n if (indexX >= 0 && indexX + 2 < xyzData.length)\r\n return Point3d.create(xyzData[indexX], xyzData[indexX + 1], xyzData[indexX + 2], result);\r\n return undefined;\r\n }\r\n /**\r\n * Copy and unweight xyzw.\r\n * @param xyzwData flat array of weighted homogeneous points: xw,yw,zw,w\r\n * @param pointIndex index of point to extract. This index is multiplied by 4 to obtain starting index in the array.\r\n * @param result optional result point.\r\n * @return unweighted xyz\r\n */\r\n public static createFromPackedXYZW(xyzwData: Float64Array, pointIndex: number, result?: Point3d): Point3d | undefined {\r\n const indexX = pointIndex * 4;\r\n if (indexX >= 0 && indexX + 3 < xyzwData.length) {\r\n const w = xyzwData[indexX + 3];\r\n if (!Geometry.isSmallMetricDistance(w)) {\r\n const divW = 1.0 / w;\r\n return Point3d.create(divW * xyzwData[indexX], divW * xyzwData[indexX + 1], divW * xyzwData[indexX + 2], result);\r\n }\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Return an array of points constructed from groups of 3 entries in a Float64Array.\r\n * Any incomplete group at the tail of the array is ignored.\r\n */\r\n public static createArrayFromPackedXYZ(data: Float64Array): Point3d[] {\r\n const result = [];\r\n for (let i = 0; i + 2 < data.length; i += 3)\r\n result.push(new Point3d(data[i], data[i + 1], data[i + 2]));\r\n return result;\r\n }\r\n /** Create a new point with 000 xyz */\r\n public static createZero(result?: Point3d): Point3d {\r\n return Point3d.create(0, 0, 0, result);\r\n }\r\n /**\r\n * Return the cross product of the vectors from this to pointA and pointB\r\n * * the result is a vector\r\n * * the result is perpendicular to both vectors, with right hand orientation\r\n * * the magnitude of the vector is twice the area of the triangle.\r\n */\r\n public crossProductToPoints(pointA: Point3d, pointB: Point3d, result?: Vector3d): Vector3d {\r\n return Vector3d.createCrossProduct(\r\n pointA.x - this.x, pointA.y - this.y, pointA.z - this.z,\r\n pointB.x - this.x, pointB.y - this.y, pointB.z - this.z,\r\n result,\r\n );\r\n }\r\n /** Return the magnitude of the cross product of the vectors from this to pointA and pointB */\r\n public crossProductToPointsMagnitude(pointA: Point3d, pointB: Point3d): number {\r\n return Geometry.crossProductMagnitude(\r\n pointA.x - this.x, pointA.y - this.y, pointA.z - this.z,\r\n pointB.x - this.x, pointB.y - this.y, pointB.z - this.z,\r\n );\r\n }\r\n /**\r\n * Return the triple product of the vectors from this to pointA, pointB, pointC\r\n * * This is a scalar (number)\r\n * * This is 6 times the (signed) volume of the tetrahedron on the 4 points.\r\n */\r\n public tripleProductToPoints(pointA: Point3d, pointB: Point3d, pointC: Point3d): number {\r\n return Geometry.tripleProduct(\r\n pointA.x - this.x, pointA.y - this.y, pointA.z - this.z,\r\n pointB.x - this.x, pointB.y - this.y, pointB.z - this.z,\r\n pointC.x - this.x, pointC.y - this.y, pointC.z - this.z,\r\n );\r\n }\r\n /**\r\n * Return the cross product of the vectors from this to pointA and pointB\r\n * * the result is a scalar\r\n * * the magnitude of the vector is twice the signed area of the triangle.\r\n * * this is positive for counter-clockwise order of the points, negative for clockwise.\r\n */\r\n public crossProductToPointsXY(pointA: Point3d, pointB: Point3d): number {\r\n return Geometry.crossProductXYXY(pointA.x - this.x, pointA.y - this.y, pointB.x - this.x, pointB.y - this.y);\r\n }\r\n /**\r\n * Return a point interpolated between `this` point and the `other` point.\r\n * * Fraction specifies where the interpolated point is located on the line passing `this` and `other`.\r\n */\r\n public interpolate(fraction: number, other: XYAndZ, result?: Point3d): Point3d {\r\n if (fraction <= 0.5)\r\n return Point3d.create(\r\n this.x + fraction * (other.x - this.x),\r\n this.y + fraction * (other.y - this.y),\r\n this.z + fraction * (other.z - this.z),\r\n result,\r\n );\r\n const t: number = fraction - 1.0;\r\n return Point3d.create(\r\n other.x + t * (other.x - this.x),\r\n other.y + t * (other.y - this.y),\r\n other.z + t * (other.z - this.z),\r\n result,\r\n );\r\n }\r\n /** Return a point with independent x,y,z fractional interpolation. */\r\n public interpolateXYZ(\r\n fractionX: number, fractionY: number, fractionZ: number, other: Point3d, result?: Point3d,\r\n ): Point3d {\r\n return Point3d.create(\r\n Geometry.interpolate(this.x, fractionX, other.x),\r\n Geometry.interpolate(this.y, fractionY, other.y),\r\n Geometry.interpolate(this.z, fractionZ, other.z),\r\n result,\r\n );\r\n }\r\n /** Interpolate between points, then add a shift in the xy plane by a fraction of the XY projection perpendicular. */\r\n public interpolatePerpendicularXY(\r\n fraction: number, pointB: Point3d, fractionXYPerp: number, result?: Point3d,\r\n ): Point3d {\r\n result = result ? result : new Point3d();\r\n const vector = pointB.minus(this);\r\n this.interpolate(fraction, pointB, result);\r\n result.x -= fractionXYPerp * vector.y;\r\n result.y += fractionXYPerp * vector.x;\r\n return result;\r\n }\r\n /** Return point minus vector */\r\n public minus(vector: XYAndZ, result?: Point3d): Point3d {\r\n return Point3d.create(this.x - vector.x, this.y - vector.y, this.z - vector.z, result);\r\n }\r\n /** Return point plus vector */\r\n public plus(vector: XYAndZ, result?: Point3d): Point3d {\r\n return Point3d.create(this.x + vector.x, this.y + vector.y, this.z + vector.z, result);\r\n }\r\n /** Return point plus vector */\r\n public plusXYZ(dx: number = 0, dy: number = 0, dz: number = 0, result?: Point3d): Point3d {\r\n return Point3d.create(this.x + dx, this.y + dy, this.z + dz, result);\r\n }\r\n /** Return point + vector * scalar */\r\n public plusScaled(vector: XYAndZ, scaleFactor: number, result?: Point3d): Point3d {\r\n return Point3d.create(this.x + vector.x * scaleFactor,\r\n this.y + vector.y * scaleFactor,\r\n this.z + vector.z * scaleFactor,\r\n result,\r\n );\r\n }\r\n /** Return point + vectorA * scalarA + vectorB * scalarB */\r\n public plus2Scaled(vectorA: XYAndZ, scalarA: number, vectorB: XYAndZ, scalarB: number, result?: Point3d): Point3d {\r\n return Point3d.create(this.x + vectorA.x * scalarA + vectorB.x * scalarB,\r\n this.y + vectorA.y * scalarA + vectorB.y * scalarB,\r\n this.z + vectorA.z * scalarA + vectorB.z * scalarB,\r\n result,\r\n );\r\n }\r\n /** Return point + vectorA * scalarA + vectorB * scalarB + vectorC * scalarC */\r\n public plus3Scaled(\r\n vectorA: XYAndZ, scalarA: number, vectorB: XYAndZ, scalarB: number, vectorC: XYAndZ, scalarC: number, result?: Point3d,\r\n ): Point3d {\r\n return Point3d.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 this.z + vectorA.z * scalarA + vectorB.z * scalarB + vectorC.z * scalarC,\r\n result,\r\n );\r\n }\r\n /**\r\n * Return a point that is scaled from the source point.\r\n * @param source existing point\r\n * @param scale scale factor to apply to its x,y,z parts\r\n * @param result optional point to receive coordinates\r\n */\r\n public static createScale(source: XYAndZ, scale: number, result?: Point3d): Point3d {\r\n return Point3d.create(source.x * scale, source.y * scale, source.z * scale, result);\r\n }\r\n /**\r\n * Create a point that is a linear combination (weighted sum) of 2 input points.\r\n * @param pointA first input point\r\n * @param scaleA scale factor for pointA\r\n * @param pointB second input point\r\n * @param scaleB scale factor for pointB\r\n */\r\n public static createAdd2Scaled(\r\n pointA: XYAndZ, scaleA: number, pointB: XYAndZ, scaleB: number, result?: Point3d,\r\n ): Point3d {\r\n return Point3d.create(\r\n pointA.x * scaleA + pointB.x * scaleB,\r\n pointA.y * scaleA + pointB.y * scaleB,\r\n pointA.z * scaleA + pointB.z * scaleB,\r\n result,\r\n );\r\n }\r\n /** Create a point that is a linear combination (weighted sum) of 3 input points.\r\n * @param pointA first input point\r\n * @param scaleA scale factor for pointA\r\n * @param pointB second input point\r\n * @param scaleB scale factor for pointB\r\n * @param pointC third input point.\r\n * @param scaleC scale factor for pointC\r\n */\r\n public static createAdd3Scaled(\r\n pointA: XYAndZ, scaleA: number, pointB: XYAndZ, scaleB: number, pointC: XYAndZ, scaleC: number, result?: Point3d,\r\n ): Point3d {\r\n return Point3d.create(\r\n pointA.x * scaleA + pointB.x * scaleB + pointC.x * scaleC,\r\n pointA.y * scaleA + pointB.y * scaleB + pointC.y * scaleC,\r\n pointA.z * scaleA + pointB.z * scaleB + pointC.z * scaleC,\r\n result,\r\n );\r\n }\r\n /**\r\n * Return the dot product of vectors from this to pointA and this to pointB.\r\n * @param targetA target point for first vector\r\n * @param targetB target point for second vector\r\n */\r\n public dotVectorsToTargets(targetA: Point3d, targetB: Point3d): number {\r\n return (targetA.x - this.x) * (targetB.x - this.x) +\r\n (targetA.y - this.y) * (targetB.y - this.y) +\r\n (targetA.z - this.z) * (targetB.z - this.z);\r\n }\r\n /** Return the fractional projection of this onto a line between points. */\r\n public fractionOfProjectionToLine(startPoint: Point3d, endPoint: Point3d, defaultFraction: number = 0): number {\r\n const denominator = startPoint.distanceSquared(endPoint);\r\n if (denominator < Geometry.smallMetricDistanceSquared)\r\n return defaultFraction;\r\n return startPoint.dotVectorsToTargets(endPoint, this) / denominator;\r\n }\r\n}\r\n\r\n/**\r\n * 3D vector with `x`,`y`,`z` as properties\r\n * @public\r\n */\r\nexport class Vector3d extends XYZ {\r\n constructor(x: number = 0, y: number = 0, z: number = 0) {\r\n super(x, y, z);\r\n }\r\n /**\r\n * Return an array of vectors constructed from groups of 3 entries in a Float64Array.\r\n * Any incomplete group at the tail of the array is ignored.\r\n */\r\n public static createArrayFromPackedXYZ(data: Float64Array): Vector3d[] {\r\n const result = [];\r\n for (let i = 0; i + 2 < data.length; i += 3)\r\n result.push(new Vector3d(data[i], data[i + 1], data[i + 2]));\r\n return result;\r\n }\r\n /**\r\n * Copy xyz from this instance to a new (or optionally reused) Vector3d\r\n * @param result optional instance to reuse.\r\n */\r\n public clone(result?: Vector3d): Vector3d {\r\n return Vector3d.create(this.x, this.y, this.z, result);\r\n }\r\n /**\r\n * Return a Vector3d (new or reused from optional result)\r\n * @param x x component\r\n * @param y y component\r\n * @param z z component\r\n * @param result optional instance to reuse\r\n */\r\n public static create(x: number = 0, y: number = 0, z: number = 0, result?: Vector3d): Vector3d {\r\n if (result) {\r\n result.x = x;\r\n result.y = y;\r\n result.z = z;\r\n return result;\r\n }\r\n return new Vector3d(x, y, z);\r\n }\r\n /**\r\n * Create a vector which is cross product of two vectors supplied as separate arguments\r\n * @param ux x coordinate of vector u\r\n * @param uy y coordinate of vector u\r\n * @param uz z coordinate of vector u\r\n * @param vx x coordinate of vector v\r\n * @param vy y coordinate of vector v\r\n * @param vz z coordinate of vector v\r\n * @param result optional result vector.\r\n */\r\n public static createCrossProduct(\r\n ux: number, uy: number, uz: number, vx: number, vy: number, vz: number, result?: Vector3d,\r\n ): Vector3d {\r\n return Vector3d.create(uy * vz - uz * vy, uz * vx - ux * vz, ux * vy - uy * vx, result);\r\n }\r\n /**\r\n * Accumulate a vector which is cross product vectors from origin (ax,ay,az) to targets (bx,by,bz) and (cx,cy,cz)\r\n * @param ax x coordinate of origin\r\n * @param ay y coordinate of origin\r\n * @param az z coordinate of origin\r\n * @param bx x coordinate of target point b\r\n * @param by y coordinate of target point b\r\n * @param bz z coordinate of target point b\r\n * @param cx x coordinate of target point c\r\n * @param cy y coordinate of target point c\r\n * @param cz z coordinate of target point c\r\n */\r\n public addCrossProductToTargetsInPlace(\r\n ax: number, ay: number, az: number, bx: number, by: number, bz: number, cx: number, cy: number, cz: number,\r\n ) {\r\n const ux = bx - ax;\r\n const uy = by - ay;\r\n const uz = bz - az;\r\n const vx = cx - ax;\r\n const vy = cy - ay;\r\n const vz = cz - az;\r\n this.x += uy * vz - uz * vy;\r\n this.y += uz * vx - ux * vz;\r\n this.z += ux * vy - uy * vx;\r\n }\r\n /**\r\n * Return the cross product of the vectors from origin to pointA and pointB.\r\n * * the result is a vector\r\n * * the result is perpendicular to both vectors, with right hand orientation\r\n * * the magnitude of the vector is twice the area of the triangle.\r\n */\r\n public static createCrossProductToPoints(origin: XYAndZ, pointA: XYAndZ, pointB: XYAndZ, result?: Vector3d): Vector3d {\r\n return Vector3d.createCrossProduct(pointA.x - origin.x, pointA.y - origin.y, pointA.z - origin.z,\r\n pointB.x - origin.x, pointB.y - origin.y, pointB.z - origin.z, result);\r\n }\r\n /**\r\n * Return the NORMALIZED cross product of the vectors from origin to pointA and pointB, or undefined\r\n *\r\n * * the result is a vector\r\n * * the result is perpendicular to both vectors, with right hand orientation\r\n * * the magnitude of the vector is twice the area of the triangle.\r\n */\r\n public static createUnitCrossProductToPoints(origin: XYAndZ, pointA: XYAndZ, pointB: XYAndZ, result?: Vector3d): Vector3d | undefined {\r\n const vector = Vector3d.createCrossProduct(pointA.x - origin.x, pointA.y - origin.y, pointA.z - origin.z,\r\n pointB.x - origin.x, pointB.y - origin.y, pointB.z - origin.z, result);\r\n return vector.normalize();\r\n }\r\n /**\r\n * Return a vector defined by polar coordinates distance and angle from x axis\r\n * @param r distance measured from origin\r\n * @param theta angle from x axis to the vector (in xy plane)\r\n * @param z optional z coordinate\r\n */\r\n public static createPolar(r: number, theta: Angle, z?: number): Vector3d {\r\n return Vector3d.create(r * theta.cos(), r * theta.sin(), z);\r\n }\r\n /**\r\n * Return a vector defined in spherical coordinates.\r\n * @param r sphere radius\r\n * @param theta angle in xy plane\r\n * @param phi angle from xy plane to the vector\r\n */\r\n public static createSpherical(r: number, theta: Angle, phi: Angle): Vector3d {\r\n const cosPhi = phi.cos();\r\n return Vector3d.create(cosPhi * r * theta.cos(), cosPhi * r * theta.sin(), r * phi.sin());\r\n }\r\n /**\r\n * Convert json to Vector3d. Accepted forms are:\r\n * * `[1,2,3]` --- array of numbers\r\n * * array of numbers: [x,y,z]\r\n * * object with x,y, and (optional) z as numeric properties {x: xValue, y: yValue, z: zValue}\r\n * @param json json value.\r\n */\r\n public static fromJSON(json?: XYZProps): Vector3d {\r\n const val = new Vector3d();\r\n val.setFromJSON(json);\r\n return val;\r\n }\r\n /** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d */\r\n public static createFrom(data: XYAndZ | XAndY | Float64Array | number[], result?: Vector3d): Vector3d {\r\n if (data instanceof Float64Array) {\r\n let x = 0;\r\n let y = 0;\r\n let z = 0;\r\n if (data.length > 0)\r\n x = data[0];\r\n if (data.length > 1)\r\n y = data[1];\r\n if (data.length > 2)\r\n z = data[2];\r\n return Vector3d.create(x, y, z, result);\r\n } else if (Array.isArray(data)) {\r\n return Vector3d.create(data[0], data[1], data.length > 2 ? data[2] : 0);\r\n }\r\n return Vector3d.create(data.x, data.y, XYZ.hasZ(data) ? data.z : 0.0, result);\r\n }\r\n /**\r\n * Return a vector defined by start and end points (end - start).\r\n * @param start start point for vector.\r\n * @param end end point for vector.\r\n * @param result optional result.\r\n */\r\n public static createStartEnd(start: XAndY | XYAndZ, end: XAndY | XYAndZ, result?: Vector3d): Vector3d {\r\n const zStart = XYZ.accessZ(start, 0.0) as number;\r\n const zEnd = XYZ.accessZ(end, 0.0) as number;\r\n const dz = zEnd - zStart;\r\n if (result) {\r\n result.set(end.x - start.x, end.y - start.y, dz);\r\n return result;\r\n }\r\n return new Vector3d(end.x - start.x, end.y - start.y, dz);\r\n }\r\n /**\r\n * Return a vector (optionally in preallocated result, otherwise newly created) from [x0,y0,z0] to [x1,y1,z1]\r\n * @param x0 start point x coordinate.\r\n * @param y0 start point y coordinate.\r\n * @param z0 start point z coordinate.\r\n * @param x1 end point x coordinate.\r\n * @param y1 end point y coordinate.\r\n * @param z1 end point z coordinate.\r\n * @param result optional result vector.\r\n */\r\n public static createStartEndXYZXYZ(\r\n x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, result?: Vector3d,\r\n ): Vector3d {\r\n return this.create(x1 - x0, y1 - y0, z1 - z0, result);\r\n }\r\n /**\r\n * Return a vector which is the input `vector` rotated by `angle` around the `axis` vector.\r\n * @param vector initial vector.\r\n * @param axis axis of rotation.\r\n * @param angle angle of rotation. If undefined, 90 degrees is implied.\r\n * @param result optional result vector\r\n * @returns undefined if axis has no length.\r\n */\r\n public static createRotateVectorAroundVector(vector: Vector3d, axis: Vector3d, angle?: Angle): Vector3d | undefined {\r\n // cf. https://en.wikipedia.org/wiki/Rodrigues_rotation_formula\r\n const unitAxis = axis.normalize();\r\n if (unitAxis) {\r\n const xProduct = unitAxis.crossProduct(vector);\r\n let c, s;\r\n if (angle) {\r\n c = angle.cos();\r\n s = angle.sin();\r\n } else {\r\n c = 0.0;\r\n s = 1.0;\r\n }\r\n return Vector3d.createAdd3Scaled(vector, c, xProduct, s, unitAxis, unitAxis.dotProduct(vector) * (1.0 - c));\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Set (replace) xyz components so they are a vector from point0 to point1\r\n * @param point0 start point of computed vector.\r\n * @param point1 end point of computed vector.\r\n */\r\n public setStartEnd(point0: XYAndZ, point1: XYAndZ) {\r\n this.x = point1.x - point0.x;\r\n this.y = point1.y - point0.y;\r\n this.z = point1.z - point0.z;\r\n }\r\n /** Return a vector with 000 xyz parts. */\r\n public static createZero(result?: Vector3d): Vector3d {\r\n return Vector3d.create(0, 0, 0, result);\r\n }\r\n /** Return a unit X vector optionally multiplied by a scale */\r\n public static unitX(scale: number = 1): Vector3d {\r\n return new Vector3d(scale, 0, 0);\r\n }\r\n /** Return a unit Y vector optionally multiplied by a scale */\r\n public static unitY(scale: number = 1): Vector3d {\r\n return new Vector3d(0, scale, 0);\r\n }\r\n /** Return a unit Z vector optionally multiplied by a scale */\r\n public static unitZ(scale: number = 1): Vector3d {\r\n return new Vector3d(0, 0, scale);\r\n }\r\n /**\r\n * Scale the instance by 1.0/`denominator`.\r\n * @param denominator number by which to divide the coordinates of this instance\r\n * @param result optional pre-allocated object to return\r\n * @return scaled vector, or undefined if `denominator` is exactly zero (in which case instance is untouched).\r\n */\r\n public safeDivideOrNull(denominator: number, result?: Vector3d): Vector3d | 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 /**\r\n * Return a normalized instance and instance length.\r\n * @param result optional pre-allocated object to return as `v` property\r\n * @returns object containing the properties:\r\n * * `v`: unit vector in the direction of the instance, or undefined if `mag` is near zero\r\n * * `mag`: length of the instance prior to normalization\r\n */\r\n public normalizeWithLength(result?: Vector3d): {\r\n v: Vector3d | undefined;\r\n mag: number;\r\n } {\r\n const originalMagnitude = this.magnitude();\r\n const correctedMagnitude = Geometry.correctSmallFraction(originalMagnitude);\r\n result = result ? result : new Vector3d();\r\n return { v: this.safeDivideOrNull(correctedMagnitude, result), mag: originalMagnitude };\r\n }\r\n /**\r\n * Return a unit vector parallel with this. Return undefined if this.magnitude is near zero.\r\n * @param result optional result.\r\n */\r\n public normalize(result?: Vector3d): Vector3d | undefined {\r\n return this.normalizeWithLength(result).v;\r\n }\r\n /**\r\n * If this vector has nonzero length, divide by the length to change to a unit vector.\r\n * @returns true if normalization was successful\r\n */\r\n public normalizeInPlace(): boolean {\r\n return this.normalizeWithLength(this).v !== undefined;\r\n }\r\n /**\r\n * Create a normalized vector from the inputs.\r\n * @param result optional result\r\n * @returns undefined if and only if normalization fails\r\n */\r\n public static createNormalized(x: number = 0, y: number = 0, z: number = 0, result?: Vector3d): Vector3d | undefined {\r\n if (undefined === result)\r\n result = Vector3d.create(x, y, z);\r\n else\r\n result.set(x, y, z);\r\n if (result.normalizeInPlace())\r\n return result;\r\n return undefined;\r\n }\r\n /**\r\n * Create a normalized vector from startPoint to endPoint\r\n * @param startPoint start point of vector\r\n * @param endPoint end point of vector\r\n * @param result optional result\r\n * @returns undefined if and only if normalization fails.\r\n */\r\n public static createNormalizedStartEnd(startPoint: XYAndZ, endPoint: XYAndZ, result?: Vector3d): Vector3d | undefined {\r\n result = Vector3d.createStartEnd(startPoint, endPoint, result);\r\n if (result.normalizeInPlace())\r\n return result;\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Return fractional length of the projection of the instance onto the target vector.\r\n * * To find the projection vector, scale the target vector by the return value.\r\n * * Math details can be found at docs/learning/geometry/PointVector.md\r\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/ProjectVectorOnVector\r\n * and https://www.itwinjs.org/sandbox/SaeedTorabi/ProjectVectorOnPlane\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: Vector3d, defaultFraction: number = 0): number {\r\n /*\r\n * Projection vector is ((this.target)/||target||)(target/||target||) = ((this.target)/||target||^2)target\r\n * This function returns (this.target)/||target||^2\r\n */\r\n const denominator = target.magnitudeSquared();\r\n if (denominator < Geometry.smallMetricDistanceSquared)\r\n return defaultFraction;\r\n const numerator = this.dotProduct(target);\r\n return numerator / denominator;\r\n }\r\n /**\r\n * Return a new vector with components negated from the calling instance.\r\n * @param result optional result vector.\r\n */\r\n public negate(result?: Vector3d): Vector3d {\r\n result = result ? result : new Vector3d();\r\n result.x = -this.x;\r\n result.y = -this.y;\r\n result.z = -this.z;\r\n return result;\r\n }\r\n /** Return a vector same length as this but rotate 90 degrees CCW */\r\n public rotate90CCWXY(result?: Vector3d): Vector3d {\r\n result = result ? result : new Vector3d();\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 result.z = this.z;\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?: Vector3d): Vector3d {\r\n result = result ? result : new Vector3d();\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 result.z = this.z;\r\n return result;\r\n }\r\n /**\r\n * Return a vector which is in the xy plane, perpendicular to the xy part of this vector, and of unit length.\r\n * * If the xy part is 00, the return is the rotated (but not normalized) xy parts of this vector.\r\n * @param result optional preallocated result.\r\n */\r\n public unitPerpendicularXY(result?: Vector3d): Vector3d {\r\n result = result ? result : new Vector3d();\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 result.z = 0.0;\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 /**\r\n * Rotate the xy parts of this vector around the z axis.\r\n * * z is taken unchanged to the result.\r\n * @param angle angle to rotate\r\n * @param result optional preallocated result\r\n */\r\n public rotateXY(angle: Angle, result?: Vector3d): Vector3d {\r\n const s = angle.sin();\r\n const c = angle.cos();\r\n const xx: number = this.x;\r\n const yy: number = this.y;\r\n result = result ? result : new Vector3d();\r\n result.x = xx * c - yy * s;\r\n result.y = xx * s + yy * c;\r\n result.z = this.z;\r\n return result;\r\n }\r\n /**\r\n * Return a (new or optionally preallocated) vector that is rotated 90 degrees in\r\n * the plane of this vector and the target vector.\r\n * @param target Second vector which defines the plane of rotation.\r\n * @param result optional preallocated vector for result.\r\n * @returns rotated vector, or undefined if the cross product of this and the target\r\n * cannot be normalized (i.e. if the target and this are colinear).\r\n */\r\n public rotate90Towards(target: Vector3d, result?: Vector3d): Vector3d | undefined {\r\n const normal = this.crossProduct(target).normalize();\r\n return normal ? normal.crossProduct(this, result) : undefined;\r\n }\r\n /**\r\n * Rotate this vector 90 degrees around an axis vector.\r\n * @returns the (new or optionally reused result) rotated vector, or undefined if the axis\r\n * vector cannot be normalized.\r\n */\r\n public rotate90Around(axis: Vector3d, result?: Vector3d): Vector3d | undefined {\r\n const unitNormal = axis.normalize();\r\n // The cross product is in the plane perpendicular to axis -- it loses the part\r\n // of \"this\" that is along the axis. The unit and scale is supposed to fix that.\r\n // This matches with Rodrigues' rotation formula because cos(theta) = 0 and sin(theta) = 1.\r\n return unitNormal ? unitNormal.crossProduct(this).plusScaled(unitNormal, unitNormal.dotProduct(this), result) : undefined;\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`. True fractions are \"between\",\r\n * 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: XYAndZ, result?: Vector3d): Vector3d {\r\n result = result ? result : new Vector3d();\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 result.z = this.z + fraction * (vectorB.z - this.z);\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 result.z = vectorB.z + t * (vectorB.z - this.z);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Return the vector sum `this - vector`\r\n * @param vector right side of addition.\r\n * @param result optional preallocated result.\r\n */\r\n public plus(vector: XYAndZ, result?: Vector3d): Vector3d {\r\n result = result ? result : new Vector3d();\r\n result.x = this.x + vector.x;\r\n result.y = this.y + vector.y;\r\n result.z = this.z + vector.z;\r\n return result;\r\n }\r\n /**\r\n * Return the vector difference `this - vector`\r\n * @param vector right side of subtraction.\r\n * @param result optional preallocated result.\r\n */\r\n public minus(vector: XYAndZ, result?: Vector3d): Vector3d {\r\n result = result ? result : new Vector3d();\r\n result.x = this.x - vector.x;\r\n result.y = this.y - vector.y;\r\n result.z = this.z - vector.z;\r\n return result;\r\n }\r\n /** Return vector + vector * scalar */\r\n public plusScaled(vector: XYAndZ, scaleFactor: number, result?: Vector3d): Vector3d {\r\n result = result ? result : new Vector3d();\r\n result.x = this.x + vector.x * scaleFactor;\r\n result.y = this.y + vector.y * scaleFactor;\r\n result.z = this.z + vector.z * scaleFactor;\r\n return result;\r\n }\r\n\r\n /** Return the (strongly typed Vector3d) `this Vector3d + vectorA * scalarA + vectorB * scalarB` */\r\n public plus2Scaled(vectorA: XYAndZ, scalarA: number, vectorB: XYAndZ, scalarB: number, result?: Vector3d): Vector3d {\r\n result = result ? result : new Vector3d();\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 result.z = this.z + vectorA.z * scalarA + vectorB.z * scalarB;\r\n return result;\r\n }\r\n\r\n /** Return the (strongly typed Vector3d) `thisVector3d + vectorA * scalarA + vectorB * scalarB + vectorC * scalarC` */\r\n public plus3Scaled(vectorA: XYAndZ, scalarA: number, vectorB: XYAndZ, scalarB: number, vectorC: XYAndZ, scalarC: number,\r\n result?: Vector3d): Vector3d {\r\n result = result ? result : new Vector3d();\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 result.z = this.z + vectorA.z * scalarA + vectorB.z * scalarB + vectorC.z * scalarC;\r\n return result;\r\n }\r\n /** Return the (strongly typed Vector3d) `thisVector3d + vectorA * scalarA + vectorB * scalarB` */\r\n public static createAdd2Scaled(vectorA: XYAndZ, scaleA: number, vectorB: XYAndZ, scaleB: number,\r\n result?: Vector3d): Vector3d {\r\n return Vector3d.create(vectorA.x * scaleA + vectorB.x * scaleB,\r\n vectorA.y * scaleA + vectorB.y * scaleB,\r\n vectorA.z * scaleA + vectorB.z * scaleB,\r\n result);\r\n }\r\n /**\r\n * Return the (strongly typed Vector3d) `thisVector3d + vectorA * scalarA + vectorB * scalarB`\r\n * with all components presented as numbers\r\n */\r\n public static createAdd2ScaledXYZ(ax: number, ay: number, az: number, scaleA: number,\r\n bx: number, by: number, bz: number, scaleB: number, result?: Vector3d): Vector3d {\r\n return Vector3d.create(ax * scaleA + bx * scaleB,\r\n ay * scaleA + by * scaleB,\r\n az * scaleA + bz * scaleB,\r\n result);\r\n }\r\n /** Return the (strongly typed Vector3d) `thisVector3d + vectorA * scaleA + vectorB * scaleB + vectorC * scaleC` */\r\n public static createAdd3Scaled(\r\n vectorA: XYAndZ, scaleA: number, vectorB: XYAndZ, scaleB: number, vectorC: XYAndZ, scaleC: number, result?: Vector3d,\r\n ): Vector3d {\r\n return Vector3d.create(vectorA.x * scaleA + vectorB.x * scaleB + vectorC.x * scaleC,\r\n vectorA.y * scaleA + vectorB.y * scaleB + vectorC.y * scaleC,\r\n vectorA.z * scaleA + vectorB.z * scaleB + vectorC.z * scaleC,\r\n result);\r\n }\r\n /** Return vector * scalar */\r\n public scale(scale: number, result?: Vector3d): Vector3d {\r\n result = result ? result : new Vector3d();\r\n result.x = this.x * scale;\r\n result.y = this.y * scale;\r\n result.z = this.z * scale;\r\n return result;\r\n }\r\n /**\r\n * Return a vector in the direction of `this` but with specified length.\r\n * @param length desired length of vector\r\n * @param result optional preallocated result to populate and return\r\n * @returns scaled instance vector, or undefined if the instance magnitude is too small\r\n */\r\n public scaleToLength(length: number, result?: Vector3d): Vector3d | 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 /**\r\n * Compute the cross product of this vector with `vectorB`. Immediately pass it to `normalize`.\r\n * @param vectorB second vector for cross product.\r\n * @returns see `Vector3d` method `normalize()` for error condition.\r\n */\r\n public unitCrossProduct(vectorB: Vector3d, result?: Vector3d): Vector3d | undefined {\r\n return this.crossProduct(vectorB, result).normalize(result);\r\n }\r\n /**\r\n * Compute the cross product of this vector with `vectorB` and normalize it.\r\n * * If length is zero, return the vector given by x, y, z.\r\n * @param vectorB second vector of cross product\r\n * @param x x value for default result\r\n * @param y y value for default result\r\n * @param z z value for default result\r\n * @param result optional pre-allocated result.\r\n */\r\n public unitCrossProductWithDefault(vectorB: Vector3d, x: number, y: number, z: number, result?: Vector3d): Vector3d {\r\n const unit = this.crossProduct(vectorB, result).normalize(result);\r\n if (unit === undefined)\r\n return Vector3d.create(x, y, z, result);\r\n return unit;\r\n }\r\n /**\r\n * Normalize this vector, using given xyz as default if length is zero.\r\n * * if this instance and x,y,z are both 000, return unit x vector.\r\n * @param x x value for default result\r\n * @param y y value for default result\r\n * @param z z value for default result\r\n * @param result optional pre-allocated result.\r\n */\r\n public normalizeWithDefault(x: number, y: number, z: number, result?: Vector3d): Vector3d {\r\n const unit = this.normalize(result);\r\n if (unit)\r\n return unit;\r\n // try back to x,y,z\r\n result = Vector3d.create(x, y, z, result);\r\n if (result.normalizeInPlace())\r\n return result;\r\n\r\n return Vector3d.create(1, 0, 0, result);\r\n }\r\n /**\r\n * Try to normalize (divide by magnitude), storing the result in place.\r\n * @param smallestMagnitude smallest magnitude allowed as divisor.\r\n * @returns false if magnitude is too small. In this case the vector is unchanged.\r\n */\r\n public tryNormalizeInPlace(smallestMagnitude: number = Geometry.smallFraction): boolean {\r\n const a = this.magnitude();\r\n if (a < smallestMagnitude || a === 0.0)\r\n return false;\r\n this.scaleInPlace(1.0 / a);\r\n return true;\r\n }\r\n /**\r\n * Compute cross product with `vectorB`\r\n * * cross product vector will have the given length.\r\n * @param vectorB second vector for cross product.\r\n * @param productLength desired length of result vector.\r\n * @param result optional preallocated vector\r\n * @return undefined if the cross product is near zero length.\r\n */\r\n public sizedCrossProduct(vectorB: Vector3d, productLength: number, result?: Vector3d): Vector3d | undefined {\r\n result = this.crossProduct(vectorB, result);\r\n if (result.tryNormalizeInPlace()) {\r\n result.scaleInPlace(productLength);\r\n return result;\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Compute the squared magnitude of a cross product (without allocating a temporary vector object)\r\n * @param vectorB second vector of cross product\r\n * @returns the squared magnitude of the cross product of this instance with vectorB.\r\n */\r\n public crossProductMagnitudeSquared(vectorB: XYAndZ): number {\r\n const xx = this.y * vectorB.z - this.z * vectorB.y;\r\n const yy = this.z * vectorB.x - this.x * vectorB.z;\r\n const zz = this.x * vectorB.y - this.y * vectorB.x;\r\n return xx * xx + yy * yy + zz * zz;\r\n }\r\n /**\r\n * Compute the magnitude of a cross product (without allocating a temporary vector object)\r\n * @param vectorB second vector of cross product\r\n * @returns the magnitude of the cross product of this instance with vectorB.\r\n */\r\n public crossProductMagnitude(vectorB: XYAndZ): number {\r\n return Math.sqrt(this.crossProductMagnitudeSquared(vectorB));\r\n }\r\n /**\r\n * Return the dot product of this vector with vectorB.\r\n * @param vectorB second vector of cross product\r\n * @returns the dot product of this instance with vectorB\r\n */\r\n public dotProduct(vectorB: XYAndZ): number {\r\n return this.x * vectorB.x + this.y * vectorB.y + this.z * vectorB.z;\r\n }\r\n /**\r\n * Return the dot product of the xyz components of two inputs that are XYAndZ but otherwise not explicitly Vector3d\r\n * @param targetA target point for first vector\r\n * @param targetB target point for second vector\r\n */\r\n public static dotProductAsXYAndZ(dataA: XYAndZ, dataB: XYAndZ): number {\r\n return dataA.x * dataB.x + dataA.y * dataB.y + dataA.z * dataB.z;\r\n }\r\n /**\r\n * Returns the dot product of this vector with the with vector from pointA to pointB\r\n * @param pointA start point of second vector of dot product\r\n * @param pointB end point of second vector of dot product\r\n */\r\n public dotProductStartEnd(pointA: XYAndZ, pointB: XYAndZ): number {\r\n return this.x * (pointB.x - pointA.x)\r\n + this.y * (pointB.y - pointA.y)\r\n + this.z * (pointB.z - pointA.z);\r\n }\r\n /**\r\n * Returns the dot product with vector (pointB - pointA * pointB.w)\r\n * * That is, pointA is weighted to weight of pointB.\r\n * * If pointB.w is zero, the homogeneous pointB is a simple vector\r\n * * If pointB.w is nonzero, the vector \"from A to B\" is not physical length.\r\n */\r\n public dotProductStart3dEnd4d(pointA: Point3d, pointB: Point4d): number {\r\n const w = pointB.w;\r\n return this.x * (pointB.x - pointA.x * w)\r\n + this.y * (pointB.y - pointA.y * w)\r\n + this.z * (pointB.z - pointA.z * w);\r\n }\r\n /** Cross product with vector from pointA to pointB */\r\n public crossProductStartEnd(pointA: Point3d, pointB: Point3d, result?: Vector3d): Vector3d {\r\n return Vector3d.createCrossProduct(\r\n this.x, this.y, this.z, pointB.x - pointA.x, pointB.y - pointA.y, pointB.z - pointA.z, result,\r\n );\r\n }\r\n /** Cross product (xy parts only) with vector from pointA to pointB */\r\n public crossProductStartEndXY(pointA: Point3d, pointB: Point3d): number {\r\n return Geometry.crossProductXYXY(this.x, this.y, pointB.x - pointA.x, pointB.y - pointA.y);\r\n }\r\n /** Dot product with vector from pointA to pointB, with pointB given as x,y,z */\r\n public dotProductStartEndXYZ(pointA: Point3d, x: number, y: number, z: number): number {\r\n return this.x * (x - pointA.x)\r\n + this.y * (y - pointA.y)\r\n + this.z * (z - pointA.z);\r\n }\r\n /** Dot product with vector from pointA to pointB, using only xy parts */\r\n public dotProductStartEndXY(pointA: Point3d, pointB: Point3d): number {\r\n return this.x * (pointB.x - pointA.x)\r\n + this.y * (pointB.y - pointA.y);\r\n }\r\n /**\r\n * Dot product with vector from pointA to pointB, with pointB given as (weighted) wx,wy,wz,w\r\n * * We need to unweight pointB (which is a homogeneous point) to be able to participate in the\r\n * vector dot product\r\n * * if the weight is near zero metric, the return is zero.\r\n */\r\n public dotProductStartEndXYZW(pointA: Point3d, wx: number, wy: number, wz: number, w: number): number {\r\n if (Geometry.isSmallMetricDistance(w))\r\n return 0.0;\r\n const dw = 1.0 / w;\r\n return this.x * (dw * wx - pointA.x)\r\n + this.y * (dw * wy - pointA.y)\r\n + this.z * (dw * wz - pointA.z);\r\n }\r\n /** Return the dot product of the instance and vectorB, using only the x and y parts. */\r\n public dotProductXY(vectorB: Vector3d): number {\r\n return this.x * vectorB.x + this.y * vectorB.y;\r\n }\r\n /**\r\n * Dot product with vector (x,y,z)\r\n * @param x x component for dot product\r\n * @param y y component for dot product\r\n * @param z z component for dot product\r\n */\r\n public dotProductXYZ(x: number, y: number, z: number = 0): number {\r\n return this.x * x + this.y * y + this.z * z;\r\n }\r\n /** Return the triple product of the instance, vectorB, and vectorC */\r\n public tripleProduct(vectorB: Vector3d, vectorC: Vector3d): number {\r\n return Geometry.tripleProduct(this.x, this.y, this.z, vectorB.x, vectorB.y, vectorB.z,\r\n vectorC.x, vectorC.y, vectorC.z);\r\n }\r\n /** Return the cross product of the instance and vectorB, using only the x and y parts. */\r\n public crossProductXY(vectorB: Vector3d): number {\r\n return this.x * vectorB.y - this.y * vectorB.x;\r\n }\r\n /**\r\n * Return the cross product of this vector and vectorB.\r\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/CrossProduct\r\n * @param vectorB second vector of cross product\r\n * @param result optional preallocated result.\r\n */\r\n public crossProduct(vectorB: Vector3d, result?: Vector3d): Vector3d {\r\n return Vector3d.createCrossProduct(this.x, this.y, this.z, vectorB.x, vectorB.y, vectorB.z, result);\r\n }\r\n /**\r\n * Return cross product of `this` with the vector `(x, y, z)`\r\n * @param x x component of second vector\r\n * @param y y component of second vector\r\n * @param z z component of second vector\r\n * @param result computed cross product (new Vector3d).\r\n */\r\n public crossProductXYZ(x: number, y: number, z: number, result?: Vector3d): Vector3d {\r\n return Vector3d.createCrossProduct(this.x, this.y, this.z, x, y, z, result);\r\n }\r\n /**\r\n * Return the angle in radians (not as strongly typed Angle) from this vector to vectorB.\r\n * * The returned angle is between 0 and `Math.PI`.\r\n * * The returned angle is measured in the plane containing the two vectors.\r\n * * Use `planarRadiansTo` and `signedRadiansTo` to return an angle measured in a specific plane.\r\n * @param vectorB target vector.\r\n */\r\n public radiansTo(vectorB: Vector3d): number {\r\n // ||axb|| = ||a|| ||b|| |sin(t)| and a.b = ||a|| ||b|| cos(t) ==>\r\n // ||axb|| / a.b = sin(t)/cos(t) = tan(t) ==> t = arctan(||axb|| / a.b).\r\n return Math.atan2(this.crossProductMagnitude(vectorB), this.dotProduct(vectorB));\r\n }\r\n /**\r\n * Return the (strongly-typed) angle from this vector to vectorB.\r\n * * The returned angle is between 0 and 180 degrees.\r\n * * The returned angle is measured in the plane containing the two vectors.\r\n * * Use `planarAngleTo` and `signedAngleTo` to return an angle measured in a specific plane.\r\n * @param vectorB target vector.\r\n */\r\n public angleTo(vectorB: Vector3d): Angle {\r\n return Angle.createRadians(this.radiansTo(vectorB));\r\n }\r\n /**\r\n * Return the (strongly-typed) angle from this vector to the plane perpendicular to planeNormal.\r\n * * The returned angle is between -90 and 90 degrees.\r\n * * The returned angle is measured in the plane containing the two vectors.\r\n * * The function returns PI/2 - angleTo(planeNormal).\r\n * @param planeNormal a normal vector to the plane.\r\n */\r\n public angleFromPerpendicular(planeNormal: Vector3d): Angle {\r\n return Angle.createAtan2(this.dotProduct(planeNormal), this.crossProductMagnitude(planeNormal));\r\n }\r\n /**\r\n * Return the angle in radians (not as strongly typed Angle) from this vector to the plane perpendicular to planeNormal.\r\n * * The returned angle is between -PI/2 and PI/2.\r\n * * The returned angle is measured in the plane containing the two vectors.\r\n * * The function returns PI/2 - radiansTo(planeNormal).\r\n * @param planeNormal a normal vector to the plane.\r\n */\r\n public radiansFromPerpendicular(planeNormal: Vector3d): number {\r\n return Math.atan2(this.dotProduct(planeNormal), this.crossProductMagnitude(planeNormal));\r\n }\r\n /**\r\n * Return the (strongly-typed) angle from this vector to vectorB, using only the xy parts.\r\n * * The returned angle is between -180 and 180 degrees.\r\n * * Use [[planarAngleTo]] and [[signedAngleTo]] to return an angle measured in a specific plane.\r\n * @param vectorB target vector.\r\n */\r\n public angleToXY(vectorB: Vector3d): Angle {\r\n return Angle.createAtan2(this.crossProductXY(vectorB), this.dotProductXY(vectorB));\r\n }\r\n /**\r\n * Return the angle in radians (not as strongly-typed Angle) from `this` vector to `vectorB`, measured\r\n * in their containing plane whose normal lies in the same half-space as `vectorW`.\r\n * * The returned angle is between `-Math.PI` and `Math.PI`.\r\n * * If the cross product of `this` vector and `vectorB` lies on the same side of the plane as `vectorW`,\r\n * this function returns `radiansTo(vectorB)`; otherwise, it returns `-radiansTo(vectorB)`.\r\n * * `vectorW` does not have to be perpendicular to the plane.\r\n * * Use [[planarRadiansTo]] to measure the angle between vectors that are projected to another plane.\r\n * @param vectorB target vector.\r\n * @param vectorW determines the side of the plane in which the returned angle is measured\r\n */\r\n public signedRadiansTo(vectorB: Vector3d, vectorW: Vector3d): number {\r\n // A.B = |A||B|cos(theta) and |AxB| = |A||B|sin(theta) so theta = arctan(|AxB|/A.B)\r\n const p = this.crossProduct(vectorB);\r\n const theta = Math.atan2(p.magnitude(), this.dotProduct(vectorB));\r\n if (vectorW.dotProduct(p) < 0.0)\r\n return -theta;\r\n else\r\n return theta;\r\n }\r\n /**\r\n * Return the (strongly-typed) angle from this vector to vectorB, measured\r\n * in their containing plane whose normal lies in the same half-space as vectorW.\r\n * * The returned angle is between -180 and 180 degrees.\r\n * * If the cross product of this vector and vectorB lies on the same side of the plane as vectorW,\r\n * this function returns `angleTo(vectorB)`; otherwise, it returns `-angleTo(vectorB)`.\r\n * * `vectorW` does not have to be perpendicular to the plane.\r\n * * Use [[planarAngleTo]] to measure the angle between vectors that are projected to another plane.\r\n * @param vectorB target vector.\r\n * @param vectorW determines the side of the plane in which the returned angle is measured\r\n */\r\n public signedAngleTo(vectorB: Vector3d, vectorW: Vector3d): Angle {\r\n return Angle.createRadians(this.signedRadiansTo(vectorB, vectorW));\r\n }\r\n /**\r\n * Return the angle in radians (not as strongly-typed Angle) from this vector to vectorB,\r\n * measured between their projections to the plane with the given normal.\r\n * * The returned angle is between `-Math.PI` and `Math.PI`.\r\n * @param vectorB target vector\r\n * @param planeNormal the normal vector to the plane.\r\n */\r\n public planarRadiansTo(vectorB: Vector3d, planeNormal: Vector3d): number {\r\n const square = planeNormal.dotProduct(planeNormal);\r\n if (square === 0.0)\r\n return 0.0;\r\n const factor = 1.0 / square;\r\n /*\r\n * projection of vector 'v' on normal 'n' is given by vProj = [dot(v,n)/||n||^2]*n\r\n * and projection of 'v' on the plane is given by 'v - vProj'\r\n */\r\n const thisProj: Vector3d = this.plusScaled(planeNormal, -this.dotProduct(planeNormal) * factor);\r\n const vectorBProj: Vector3d = vectorB.plusScaled(planeNormal, -vectorB.dotProduct(planeNormal) * factor);\r\n return thisProj.signedRadiansTo(vectorBProj, planeNormal);\r\n }\r\n /**\r\n * Return the (strongly-type) angle from this vector to vectorB,\r\n * measured between their projections to the plane with the given normal.\r\n * * The returned angle is between -180 and 180 degrees.\r\n * @param vectorB target vector.\r\n * @param planeNormal the normal vector to the plane.\r\n */\r\n public planarAngleTo(vectorB: Vector3d, planeNormal: Vector3d): Angle {\r\n return Angle.createRadians(this.planarRadiansTo(vectorB, planeNormal));\r\n }\r\n /**\r\n * Return the smallest angle (in radians) from the (bidirectional) line containing `this`\r\n * to the (bidirectional) line containing `vectorB`\r\n */\r\n public smallerUnorientedRadiansTo(vectorB: Vector3d): number {\r\n const c = this.dotProduct(vectorB);\r\n const s = this.crossProductMagnitude(vectorB);\r\n return Math.atan2(Math.abs(s), Math.abs(c));\r\n }\r\n /**\r\n * Return the smallest (strongly typed) angle from the (bidirectional) line containing `this`\r\n * to the (bidirectional) line containing `vectorB`\r\n */\r\n public smallerUnorientedAngleTo(vectorB: Vector3d): Angle {\r\n return Angle.createRadians(this.smallerUnorientedRadiansTo(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 in comparison\r\n * @param oppositeIsParallel whether to consider diametrically opposed vectors as parallel. Default false.\r\n * @param returnValueIfAnInputIsZeroLength if either vector is near zero length, return this value. Default false.\r\n * @param options optional radian and distance tolerances.\r\n */\r\n public isParallelTo(\r\n other: Vector3d,\r\n oppositeIsParallel: boolean = false,\r\n returnValueIfAnInputIsZeroLength: boolean = false,\r\n 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 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 cross2 = this.crossProductMagnitudeSquared(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 cross2 <= 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 (default false).\r\n * @param options optional radian and distance tolerances.\r\n */\r\n public isPerpendicularTo(\r\n other: Vector3d, 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
|
+
{"version":3,"file":"Point3dVector3d.js","sourceRoot":"","sources":["../../../src/geometry3d/Point3dVector3d.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,0CAA4D;AAE5D,mCAAgC;AAChC,yCAA2D;AAE3D;;;;;;;;GAQG;AACH,MAAa,GAAG;IACd,mBAAmB;IACZ,CAAC,CAAS;IACjB,mBAAmB;IACZ,CAAC,CAAS;IACjB,mBAAmB;IACZ,CAAC,CAAS;IACjB;;;;;OAKG;IACI,GAAG,CAAC,IAAY,CAA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C;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,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,kBAAkB;YAClC,OAAO,KAAK,CAAC;QACf,MAAM,MAAM,GAAG,IAAI,CAAC,4BAA4B,CAAC,KAAK,CAAC,CAAC;QACxD,yDAAyD;QACzD,kCAAkC;QAClC,0CAA0C;QAC1C,OAAO,MAAM,IAAI,gBAAgB,GAAG,EAAE,GAAG,EAAE,CAAC;IAC9C,CAAC;IACD;;;;;;;OAOG;IACI,iBAAiB,CACtB,KAAe,EAAE,mCAA4C,KAAK,EAAE,OAA6B;QAEjG,MAAM,gBAAgB,GAAW,OAAO,EAAE,gBAAgB,IAAI,mBAAQ,CAAC,wBAAwB,CAAC;QAChG,MAAM,kBAAkB,GAAW,OAAO,EAAE,kBAAkB,IAAI,mBAAQ,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;AA55BD,4BA45BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module CartesianGeometry\n */\n\nimport { Geometry, PerpParallelOptions } from \"../Geometry\";\nimport { Point4d } from \"../geometry4d/Point4d\";\nimport { Angle } from \"./Angle\";\nimport { HasZ, XAndY, XYAndZ, XYZProps } from \"./XYZProps\";\n\n/**\n * * `XYZ` is a minimal object containing x,y,z and operations that are meaningful without change in both\n * point and vector.\n * * `XYZ` is not instantiable.\n * * The derived (instantiable) classes are\n * * `Point3d`\n * * `Vector3d`\n * @public\n */\nexport class XYZ implements XYAndZ {\n /** x coordinate */\n public x: number;\n /** y coordinate */\n public y: number;\n /** z coordinate */\n public z: number;\n /**\n * Set the x,y,z parts.\n * @param x (optional) x part\n * @param y (optional) y part\n * @param z (optional) z part\n */\n public set(x: number = 0, y: number = 0, z: number = 0) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n /** Set the x,y,z parts to zero. */\n public setZero() {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n }\n protected constructor(x: number = 0, y: number = 0, z: number = 0) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n /** Type guard for XAndY.\n * @note this will return true for an XYAndZ. If you wish to distinguish between the two, call isXYAndZ first.\n */\n public static isXAndY(arg: any): arg is XAndY {\n return arg.x !== undefined && arg.y !== undefined;\n }\n /** Type guard to determine whether an object has a member called \"z\" */\n public static hasZ(arg: any): arg is HasZ {\n return arg.z !== undefined;\n }\n /** Type guard for XYAndZ. */\n public static isXYAndZ(arg: any): arg is XYAndZ {\n return this.isXAndY(arg) && this.hasZ(arg);\n }\n /**\n * Test if arg is any of:\n * * XAndY\n * * XYAndZ\n * * [number,number]\n * * [number,number,number]\n */\n public static isAnyImmediatePointType(arg: any): arg is XAndY | XYAndZ | number[] {\n return Point3d.isXAndY(arg) || Geometry.isNumberArray(arg, 2);\n }\n /**\n * Look for (in order) an x coordinate present as:\n * * arg.x\n * * arg[0]\n */\n public static accessX(arg: any, defaultValue?: number): number | undefined {\n if (arg.x !== undefined)\n return arg.x;\n if (Array.isArray(arg) && arg.length > 0 && Number.isFinite(arg[0]))\n return arg[0];\n return defaultValue;\n }\n /**\n * Look for (in order) a y coordinate present as:\n * * arg.y\n * * arg[1]\n */\n public static accessY(arg: any, defaultValue?: number): number | undefined {\n if (arg.y !== undefined)\n return arg.y;\n if (Array.isArray(arg) && arg.length > 1 && Number.isFinite(arg[1]))\n return arg[1];\n return defaultValue;\n }\n /**\n * Look for (in order) a z coordinate present as:\n * * arg.z\n * * arg[2]\n */\n public static accessZ(arg: any, defaultValue?: number): number | undefined {\n if (arg.z !== undefined)\n return arg.z;\n if (Array.isArray(arg) && arg.length > 2 && Number.isFinite(arg[2]))\n return arg[2];\n return defaultValue;\n }\n /**\n * Set the x,y,z parts from one of these input types\n * * XYZ -- copy the x,y,z parts\n * * Float64Array -- Copy from indices 0,1,2 to x,y,z\n * * XY -- copy the x, y parts and set z=0\n */\n public setFrom(other: Float64Array | XAndY | XYAndZ | undefined) {\n if (other === undefined) {\n this.setZero();\n } else if (XYZ.isXAndY(other)) {\n this.x = other.x;\n this.y = other.y;\n this.z = XYZ.hasZ(other) ? other.z : 0;\n } else {\n this.x = other[0];\n this.y = other[1];\n this.z = other[2];\n }\n }\n /**\n * Set the x,y,z parts from a Point3d.\n * This is the same effect as `setFrom(other)` with no pretesting of variant input type\n * * Set to zeros if `other` is undefined.\n */\n public setFromPoint3d(other?: XYAndZ) {\n if (other) {\n this.x = other.x;\n this.y = other.y;\n this.z = other.z;\n } else {\n this.setZero();\n }\n }\n /**\n * Set the x,y,z parts from a Vector3d\n * This is the same effect as `setFrom(other)` with no pretesting of variant input type\n * * Set to zeros if `other` is undefined.\n */\n public setFromVector3d(other?: Vector3d) {\n if (other) {\n this.x = other.x;\n this.y = other.y;\n this.z = other.z;\n } else {\n this.setZero();\n }\n }\n /**\n * Returns true if this and other have equal x,y,z parts within Geometry.smallMetricDistance.\n * @param other The other XYAndZ to compare\n * @param tol The tolerance for the comparison. If undefined, use [[Geometry.smallMetricDistance]]\n */\n public isAlmostEqual(other: Readonly<XYAndZ>, tol?: number): boolean {\n return XYAndZ.almostEqual(this, other, tol);\n }\n /** Return true if this and other have equal x,y,z parts within Geometry.smallMetricDistance. */\n public isAlmostEqualXYZ(x: number, y: number, z: number, tol?: number): boolean {\n return Geometry.isSameCoordinate(this.x, x, tol)\n && Geometry.isSameCoordinate(this.y, y, tol)\n && Geometry.isSameCoordinate(this.z, z, tol);\n }\n /**\n * Return true if this and {other + vector*scale} have equal x,y,z parts within Geometry.smallMetricDistance.\n * * this method is useful in testing \"point on ray\" without explicitly constructing the projection point\n */\n public isAlmostEqualPointPlusScaledVector(other: XYAndZ, vector: XYAndZ, scale: number, tol?: number): boolean {\n return Geometry.isSameCoordinate(this.x, other.x + vector.x * scale, tol)\n && Geometry.isSameCoordinate(this.y, other.y + vector.y * scale, tol)\n && Geometry.isSameCoordinate(this.z, other.z + vector.z * scale, tol);\n }\n /** Return true if this and other have equal x,y parts within Geometry.smallMetricDistance. */\n public isAlmostEqualXY(other: XAndY, tol?: number): boolean {\n return Geometry.isSameCoordinate(this.x, other.x, tol)\n && Geometry.isSameCoordinate(this.y, other.y, tol);\n }\n /** Return a JSON object as array `[x,y,z]` */\n public toJSON(): XYZProps {\n return this.toArray();\n }\n /** Return as an array `[x,y,z]` */\n public toArray(): number[] {\n return [this.x, this.y, this.z];\n }\n /** Return a JSON object as key value pairs `{x: value, y: value, z: value}` */\n public toJSONXYZ(): XYZProps {\n return { x: this.x, y: this.y, z: this.z };\n }\n /** Pack the x,y,z values in a Float64Array. */\n public toFloat64Array(): Float64Array {\n return Float64Array.of(this.x, this.y, this.z);\n }\n /**\n * Set the x,y,z properties from one of several json forms:\n *\n * * array of numbers: [x,y,z]\n * * object with x,y, and (optional) z as numeric properties {x: xValue, y: yValue, z: zValue}\n */\n public setFromJSON(json?: XYZProps): void {\n if (Array.isArray(json)) {\n this.set(json[0] || 0, json[1] || 0, json[2] || 0);\n return;\n }\n if (json) {\n this.set(json.x || 0, json.y || 0, json.z || 0);\n return;\n }\n this.set(0, 0, 0);\n }\n /** Return the distance from this point to other */\n public distance(other: XYAndZ): number {\n const xDist = other.x - this.x;\n const yDist = other.y - this.y;\n const zDist = other.z - this.z;\n return (Math.sqrt(xDist * xDist + yDist * yDist + zDist * zDist));\n }\n /** Return squared distance from this point to other */\n public distanceSquared(other: XYAndZ): number {\n const xDist = other.x - this.x;\n const yDist = other.y - this.y;\n const zDist = other.z - this.z;\n return (xDist * xDist + yDist * yDist + zDist * zDist);\n }\n /** Return the XY distance from this point to other */\n public distanceXY(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 XY distance from this point to other */\n public distanceSquaredXY(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: XYAndZ): number {\n return Math.max(Math.abs(this.x - other.x), Math.abs(this.y - other.y), Math.abs(this.z - other.z));\n }\n /** Return the x,y, z component corresponding to 0,1,2 */\n public at(index: number): number {\n if (index < 0.5)\n return this.x;\n if (index > 1.5)\n return this.z;\n return this.y;\n }\n /** Set value at index 0 or 1 or 2 */\n public setAt(index: number, value: number): void {\n if (index < 0.5)\n this.x = value;\n else if (index > 1.5)\n this.z = value;\n else\n this.y = value;\n }\n /** Return the index (0,1,2) of the x,y,z component with largest absolute value */\n public indexOfMaxAbs(): number {\n let index = 0;\n let a = Math.abs(this.x);\n let b = Math.abs(this.y);\n if (b > a) {\n index = 1;\n a = b;\n }\n b = Math.abs(this.z);\n if (b > a) {\n index = 2;\n }\n return index;\n }\n /** Return true if the x,y,z components are all nearly zero to tolerance Geometry.smallMetricDistance */\n public get isAlmostZero(): boolean {\n return Geometry.isSmallMetricDistance(this.x) &&\n Geometry.isSmallMetricDistance(this.y) &&\n Geometry.isSmallMetricDistance(this.z);\n }\n /** Return true if the x,y,z components are all exactly zero */\n public get isZero(): boolean {\n return this.x === 0.0 && this.y === 0.0 && this.z === 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), Math.abs(this.z));\n }\n /** Return the sqrt of the sum of squared x,y,z parts */\n public magnitude(): number {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n }\n /** Return the sum of squared x,y,z parts */\n public magnitudeSquared(): number {\n return this.x * this.x + this.y * this.y + this.z * this.z;\n }\n /** Return sqrt of the sum of squared x,y parts */\n public magnitudeXY(): number {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }\n /** Return the sum of squared x,y parts */\n public magnitudeSquaredXY(): number {\n return this.x * this.x + this.y * this.y;\n }\n /** Exact equality test. */\n public isExactEqual(other: XYAndZ): boolean {\n return this.x === other.x && this.y === other.y && this.z === other.z;\n }\n /** Equality test with Geometry.smallMetricDistance tolerance */\n public isAlmostEqualMetric(other: XYAndZ): boolean {\n return this.maxDiff(other) <= Geometry.smallMetricDistance;\n }\n /** Add x,y,z from other in place. */\n public addInPlace(other: XYAndZ): void {\n this.x += other.x;\n this.y += other.y;\n this.z += other.z;\n }\n /** Subtract x,y,z from other in place. */\n public subtractInPlace(other: XYAndZ): void {\n this.x -= other.x;\n this.y -= other.y;\n this.z -= other.z;\n }\n /** Add (in place) the scaled x,y,z of other */\n public addScaledInPlace(other: XYAndZ, scale: number): void {\n this.x += scale * other.x;\n this.y += scale * other.y;\n this.z += scale * other.z;\n }\n /** Multiply the x, y, z parts by scale. */\n public scaleInPlace(scale: number) {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n }\n /** Add to x, y, z parts */\n public addXYZInPlace(dx: number = 0.0, dy: number = 0.0, dz: number = 0.0) {\n this.x += dx;\n this.y += dy;\n this.z += dz;\n }\n /** Clone strongly typed as Point3d */\n public cloneAsPoint3d(): Point3d {\n return Point3d.create(this.x, this.y, this.z);\n }\n /** Return a (full length) vector from this point to other */\n public vectorTo(other: XYAndZ, result?: Vector3d): Vector3d {\n return Vector3d.create(other.x - this.x, other.y - this.y, other.z - this.z, result);\n }\n /** Return a multiple of a the (full length) vector from this point to other */\n public scaledVectorTo(other: XYAndZ, scale: number, result?: Vector3d): Vector3d {\n return Vector3d.create(scale * (other.x - this.x),\n scale * (other.y - this.y),\n scale * (other.z - this.z), result);\n }\n /**\n * Return a unit vector from this vector to other. Return a 000 vector if the input is too small to normalize.\n * @param other target of created vector.\n * @param result optional result vector.\n */\n public unitVectorTo(target: XYAndZ, result?: Vector3d): Vector3d | undefined {\n return this.vectorTo(target, result).normalize(result);\n }\n /** Freeze this XYZ */\n public freeze(): Readonly<this> {\n return Object.freeze(this);\n }\n /** Access x part of XYZProps (which may be .x or [0]) */\n public static x(xyz: XYZProps | undefined, defaultValue: number = 0): number {\n if (xyz === undefined)\n return defaultValue;\n if (Array.isArray(xyz))\n return xyz[0];\n if (xyz.x !== undefined)\n return xyz.x;\n return defaultValue;\n }\n /** Access x part of XYZProps (which may be .x or [0]) */\n public static y(xyz: XYZProps | undefined, defaultValue: number = 0): number {\n if (xyz === undefined)\n return defaultValue;\n if (Array.isArray(xyz))\n return xyz[1];\n if (xyz.y !== undefined)\n return xyz.y;\n return defaultValue;\n }\n /** Access x part of XYZProps (which may be .x or [0]) */\n public static z(xyz: XYZProps | undefined, defaultValue: number = 0): number {\n if (xyz === undefined)\n return defaultValue;\n if (Array.isArray(xyz))\n return xyz[2];\n if (xyz.z !== undefined)\n return xyz.z;\n return defaultValue;\n }\n}\n\n/** 3D point with `x`,`y`,`z` as properties\n * @public\n */\nexport class Point3d extends XYZ {\n /** Constructor for Point3d */\n constructor(x: number = 0, y: number = 0, z: number = 0) {\n super(x, y, z);\n }\n /**\n * Convert json to Point3d. Accepted forms are:\n * * `[1,2,3]` --- array of numbers\n * * array of numbers: [x,y,z]\n * * object with x,y, and (optional) z as numeric properties {x: xValue, y: yValue, z: zValue}\n * @param json json value.\n */\n public static fromJSON(json?: XYZProps): Point3d {\n const val = new Point3d();\n val.setFromJSON(json);\n return val;\n }\n /** Return a new Point3d with the same coordinates */\n public clone(result?: Point3d): Point3d {\n return Point3d.create(this.x, this.y, this.z, result);\n }\n /**\n * Create a new Point3d with given coordinates\n * @param x x part\n * @param y y part\n * @param z z part\n */\n public static create(x: number = 0, y: number = 0, z: number = 0, result?: Point3d): Point3d {\n if (result) {\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n }\n return new Point3d(x, y, z);\n }\n /** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d */\n public static createFrom(data: XYAndZ | XAndY | Float64Array, result?: Point3d): Point3d {\n if (data instanceof Float64Array) {\n let x = 0;\n let y = 0;\n let z = 0;\n if (data.length > 0)\n x = data[0];\n if (data.length > 1)\n y = data[1];\n if (data.length > 2)\n z = data[2];\n return Point3d.create(x, y, z, result);\n }\n return Point3d.create(data.x, data.y, XYZ.hasZ(data) ? data.z : 0, result);\n }\n /**\n * Copy x,y,z from\n * @param xyzData flat array of xyzxyz for multiple points\n * @param pointIndex index of point to extract. This index is multiplied by 3 to obtain starting index in the array.\n * @param result optional result point.\n */\n public static createFromPacked(xyzData: Float64Array, pointIndex: number, result?: Point3d): Point3d | undefined {\n const indexX = pointIndex * 3;\n if (indexX >= 0 && indexX + 2 < xyzData.length)\n return Point3d.create(xyzData[indexX], xyzData[indexX + 1], xyzData[indexX + 2], result);\n return undefined;\n }\n /**\n * Copy and unweight xyzw.\n * @param xyzwData flat array of weighted homogeneous points: xw,yw,zw,w\n * @param pointIndex index of point to extract. This index is multiplied by 4 to obtain starting index in the array.\n * @param result optional result point.\n * @return unweighted xyz\n */\n public static createFromPackedXYZW(xyzwData: Float64Array, pointIndex: number, result?: Point3d): Point3d | undefined {\n const indexX = pointIndex * 4;\n if (indexX >= 0 && indexX + 3 < xyzwData.length) {\n const w = xyzwData[indexX + 3];\n if (!Geometry.isSmallMetricDistance(w)) {\n const divW = 1.0 / w;\n return Point3d.create(divW * xyzwData[indexX], divW * xyzwData[indexX + 1], divW * xyzwData[indexX + 2], result);\n }\n }\n return undefined;\n }\n /**\n * Return an array of points constructed from groups of 3 entries in a Float64Array.\n * Any incomplete group at the tail of the array is ignored.\n */\n public static createArrayFromPackedXYZ(data: Float64Array): Point3d[] {\n const result = [];\n for (let i = 0; i + 2 < data.length; i += 3)\n result.push(new Point3d(data[i], data[i + 1], data[i + 2]));\n return result;\n }\n /** Create a new point with 000 xyz */\n public static createZero(result?: Point3d): Point3d {\n return Point3d.create(0, 0, 0, result);\n }\n /**\n * Return the cross product of the vectors from this to pointA and pointB\n * * the result is a vector\n * * the result is perpendicular to both vectors, with right hand orientation\n * * the magnitude of the vector is twice the area of the triangle.\n */\n public crossProductToPoints(pointA: Point3d, pointB: Point3d, result?: Vector3d): Vector3d {\n return Vector3d.createCrossProduct(\n pointA.x - this.x, pointA.y - this.y, pointA.z - this.z,\n pointB.x - this.x, pointB.y - this.y, pointB.z - this.z,\n result,\n );\n }\n /** Return the magnitude of the cross product of the vectors from this to pointA and pointB */\n public crossProductToPointsMagnitude(pointA: Point3d, pointB: Point3d): number {\n return Geometry.crossProductMagnitude(\n pointA.x - this.x, pointA.y - this.y, pointA.z - this.z,\n pointB.x - this.x, pointB.y - this.y, pointB.z - this.z,\n );\n }\n /**\n * Return the triple product of the vectors from this to pointA, pointB, pointC\n * * This is a scalar (number)\n * * This is 6 times the (signed) volume of the tetrahedron on the 4 points.\n */\n public tripleProductToPoints(pointA: Point3d, pointB: Point3d, pointC: Point3d): number {\n return Geometry.tripleProduct(\n pointA.x - this.x, pointA.y - this.y, pointA.z - this.z,\n pointB.x - this.x, pointB.y - this.y, pointB.z - this.z,\n pointC.x - this.x, pointC.y - this.y, pointC.z - this.z,\n );\n }\n /**\n * Return the cross product of the vectors from this to pointA and pointB\n * * the result is a scalar\n * * the magnitude of the vector is twice the signed area of the triangle.\n * * this is positive for counter-clockwise order of the points, negative for clockwise.\n */\n public crossProductToPointsXY(pointA: Point3d, pointB: Point3d): number {\n return Geometry.crossProductXYXY(pointA.x - this.x, pointA.y - this.y, pointB.x - this.x, pointB.y - this.y);\n }\n /**\n * Return a point interpolated between `this` point and the `other` point.\n * * Fraction specifies where the interpolated point is located on the line passing `this` and `other`.\n */\n public interpolate(fraction: number, other: XYAndZ, result?: Point3d): Point3d {\n if (fraction <= 0.5)\n return Point3d.create(\n this.x + fraction * (other.x - this.x),\n this.y + fraction * (other.y - this.y),\n this.z + fraction * (other.z - this.z),\n result,\n );\n const t: number = fraction - 1.0;\n return Point3d.create(\n other.x + t * (other.x - this.x),\n other.y + t * (other.y - this.y),\n other.z + t * (other.z - this.z),\n result,\n );\n }\n /** Return a point with independent x,y,z fractional interpolation. */\n public interpolateXYZ(\n fractionX: number, fractionY: number, fractionZ: number, other: Point3d, result?: Point3d,\n ): Point3d {\n return Point3d.create(\n Geometry.interpolate(this.x, fractionX, other.x),\n Geometry.interpolate(this.y, fractionY, other.y),\n Geometry.interpolate(this.z, fractionZ, other.z),\n result,\n );\n }\n /** Interpolate between points, then add a shift in the xy plane by a fraction of the XY projection perpendicular. */\n public interpolatePerpendicularXY(\n fraction: number, pointB: Point3d, fractionXYPerp: number, result?: Point3d,\n ): Point3d {\n result = result ? result : new Point3d();\n const vector = pointB.minus(this);\n this.interpolate(fraction, pointB, result);\n result.x -= fractionXYPerp * vector.y;\n result.y += fractionXYPerp * vector.x;\n return result;\n }\n /** Return point minus vector */\n public minus(vector: XYAndZ, result?: Point3d): Point3d {\n return Point3d.create(this.x - vector.x, this.y - vector.y, this.z - vector.z, result);\n }\n /** Return point plus vector */\n public plus(vector: XYAndZ, result?: Point3d): Point3d {\n return Point3d.create(this.x + vector.x, this.y + vector.y, this.z + vector.z, result);\n }\n /** Return point plus vector */\n public plusXYZ(dx: number = 0, dy: number = 0, dz: number = 0, result?: Point3d): Point3d {\n return Point3d.create(this.x + dx, this.y + dy, this.z + dz, result);\n }\n /** Return point + vector * scalar */\n public plusScaled(vector: XYAndZ, scaleFactor: number, result?: Point3d): Point3d {\n return Point3d.create(this.x + vector.x * scaleFactor,\n this.y + vector.y * scaleFactor,\n this.z + vector.z * scaleFactor,\n result,\n );\n }\n /** Return point + vectorA * scalarA + vectorB * scalarB */\n public plus2Scaled(vectorA: XYAndZ, scalarA: number, vectorB: XYAndZ, scalarB: number, result?: Point3d): Point3d {\n return Point3d.create(this.x + vectorA.x * scalarA + vectorB.x * scalarB,\n this.y + vectorA.y * scalarA + vectorB.y * scalarB,\n this.z + vectorA.z * scalarA + vectorB.z * scalarB,\n result,\n );\n }\n /** Return point + vectorA * scalarA + vectorB * scalarB + vectorC * scalarC */\n public plus3Scaled(\n vectorA: XYAndZ, scalarA: number, vectorB: XYAndZ, scalarB: number, vectorC: XYAndZ, scalarC: number, result?: Point3d,\n ): Point3d {\n return Point3d.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 this.z + vectorA.z * scalarA + vectorB.z * scalarB + vectorC.z * scalarC,\n result,\n );\n }\n /**\n * Return a point that is scaled from the source point.\n * @param source existing point\n * @param scale scale factor to apply to its x,y,z parts\n * @param result optional point to receive coordinates\n */\n public static createScale(source: XYAndZ, scale: number, result?: Point3d): Point3d {\n return Point3d.create(source.x * scale, source.y * scale, source.z * scale, result);\n }\n /**\n * Create a point that is a linear combination (weighted sum) of 2 input points.\n * @param pointA first input point\n * @param scaleA scale factor for pointA\n * @param pointB second input point\n * @param scaleB scale factor for pointB\n */\n public static createAdd2Scaled(\n pointA: XYAndZ, scaleA: number, pointB: XYAndZ, scaleB: number, result?: Point3d,\n ): Point3d {\n return Point3d.create(\n pointA.x * scaleA + pointB.x * scaleB,\n pointA.y * scaleA + pointB.y * scaleB,\n pointA.z * scaleA + pointB.z * scaleB,\n result,\n );\n }\n /** Create a point that is a linear combination (weighted sum) of 3 input points.\n * @param pointA first input point\n * @param scaleA scale factor for pointA\n * @param pointB second input point\n * @param scaleB scale factor for pointB\n * @param pointC third input point.\n * @param scaleC scale factor for pointC\n */\n public static createAdd3Scaled(\n pointA: XYAndZ, scaleA: number, pointB: XYAndZ, scaleB: number, pointC: XYAndZ, scaleC: number, result?: Point3d,\n ): Point3d {\n return Point3d.create(\n pointA.x * scaleA + pointB.x * scaleB + pointC.x * scaleC,\n pointA.y * scaleA + pointB.y * scaleB + pointC.y * scaleC,\n pointA.z * scaleA + pointB.z * scaleB + pointC.z * scaleC,\n result,\n );\n }\n /**\n * Return the dot product of vectors from this to pointA and this to pointB.\n * @param targetA target point for first vector\n * @param targetB target point for second vector\n */\n public dotVectorsToTargets(targetA: Point3d, targetB: Point3d): number {\n return (targetA.x - this.x) * (targetB.x - this.x) +\n (targetA.y - this.y) * (targetB.y - this.y) +\n (targetA.z - this.z) * (targetB.z - this.z);\n }\n /** Return the fractional projection of this onto a line between points. */\n public fractionOfProjectionToLine(startPoint: Point3d, endPoint: Point3d, defaultFraction: number = 0): number {\n const denominator = startPoint.distanceSquared(endPoint);\n if (denominator < Geometry.smallMetricDistanceSquared)\n return defaultFraction;\n return startPoint.dotVectorsToTargets(endPoint, this) / denominator;\n }\n}\n\n/**\n * 3D vector with `x`,`y`,`z` as properties\n * @public\n */\nexport class Vector3d extends XYZ {\n constructor(x: number = 0, y: number = 0, z: number = 0) {\n super(x, y, z);\n }\n /**\n * Return an array of vectors constructed from groups of 3 entries in a Float64Array.\n * Any incomplete group at the tail of the array is ignored.\n */\n public static createArrayFromPackedXYZ(data: Float64Array): Vector3d[] {\n const result = [];\n for (let i = 0; i + 2 < data.length; i += 3)\n result.push(new Vector3d(data[i], data[i + 1], data[i + 2]));\n return result;\n }\n /**\n * Copy xyz from this instance to a new (or optionally reused) Vector3d\n * @param result optional instance to reuse.\n */\n public clone(result?: Vector3d): Vector3d {\n return Vector3d.create(this.x, this.y, this.z, result);\n }\n /**\n * Return a Vector3d (new or reused from optional result)\n * @param x x component\n * @param y y component\n * @param z z component\n * @param result optional instance to reuse\n */\n public static create(x: number = 0, y: number = 0, z: number = 0, result?: Vector3d): Vector3d {\n if (result) {\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n }\n return new Vector3d(x, y, z);\n }\n /**\n * Create a vector which is cross product of two vectors supplied as separate arguments\n * @param ux x coordinate of vector u\n * @param uy y coordinate of vector u\n * @param uz z coordinate of vector u\n * @param vx x coordinate of vector v\n * @param vy y coordinate of vector v\n * @param vz z coordinate of vector v\n * @param result optional result vector.\n */\n public static createCrossProduct(\n ux: number, uy: number, uz: number, vx: number, vy: number, vz: number, result?: Vector3d,\n ): Vector3d {\n return Vector3d.create(uy * vz - uz * vy, uz * vx - ux * vz, ux * vy - uy * vx, result);\n }\n /**\n * Accumulate a vector which is cross product vectors from origin (ax,ay,az) to targets (bx,by,bz) and (cx,cy,cz)\n * @param ax x coordinate of origin\n * @param ay y coordinate of origin\n * @param az z coordinate of origin\n * @param bx x coordinate of target point b\n * @param by y coordinate of target point b\n * @param bz z coordinate of target point b\n * @param cx x coordinate of target point c\n * @param cy y coordinate of target point c\n * @param cz z coordinate of target point c\n */\n public addCrossProductToTargetsInPlace(\n ax: number, ay: number, az: number, bx: number, by: number, bz: number, cx: number, cy: number, cz: number,\n ) {\n const ux = bx - ax;\n const uy = by - ay;\n const uz = bz - az;\n const vx = cx - ax;\n const vy = cy - ay;\n const vz = cz - az;\n this.x += uy * vz - uz * vy;\n this.y += uz * vx - ux * vz;\n this.z += ux * vy - uy * vx;\n }\n /**\n * Return the cross product of the vectors from origin to pointA and pointB.\n * * the result is a vector\n * * the result is perpendicular to both vectors, with right hand orientation\n * * the magnitude of the vector is twice the area of the triangle.\n */\n public static createCrossProductToPoints(origin: XYAndZ, pointA: XYAndZ, pointB: XYAndZ, result?: Vector3d): Vector3d {\n return Vector3d.createCrossProduct(pointA.x - origin.x, pointA.y - origin.y, pointA.z - origin.z,\n pointB.x - origin.x, pointB.y - origin.y, pointB.z - origin.z, result);\n }\n /**\n * Return the NORMALIZED cross product of the vectors from origin to pointA and pointB, or undefined\n *\n * * the result is a vector\n * * the result is perpendicular to both vectors, with right hand orientation\n * * the magnitude of the vector is twice the area of the triangle.\n */\n public static createUnitCrossProductToPoints(origin: XYAndZ, pointA: XYAndZ, pointB: XYAndZ, result?: Vector3d): Vector3d | undefined {\n const vector = Vector3d.createCrossProduct(pointA.x - origin.x, pointA.y - origin.y, pointA.z - origin.z,\n pointB.x - origin.x, pointB.y - origin.y, pointB.z - origin.z, result);\n return vector.normalize();\n }\n /**\n * Return a vector defined by polar coordinates distance and angle from x axis\n * @param r distance measured from origin\n * @param theta angle from x axis to the vector (in xy plane)\n * @param z optional z coordinate\n */\n public static createPolar(r: number, theta: Angle, z?: number): Vector3d {\n return Vector3d.create(r * theta.cos(), r * theta.sin(), z);\n }\n /**\n * Return a vector defined in spherical coordinates.\n * @param r sphere radius\n * @param theta angle in xy plane\n * @param phi angle from xy plane to the vector\n */\n public static createSpherical(r: number, theta: Angle, phi: Angle): Vector3d {\n const cosPhi = phi.cos();\n return Vector3d.create(cosPhi * r * theta.cos(), cosPhi * r * theta.sin(), r * phi.sin());\n }\n /**\n * Convert json to Vector3d. Accepted forms are:\n * * `[1,2,3]` --- array of numbers\n * * array of numbers: [x,y,z]\n * * object with x,y, and (optional) z as numeric properties {x: xValue, y: yValue, z: zValue}\n * @param json json value.\n */\n public static fromJSON(json?: XYZProps): Vector3d {\n const val = new Vector3d();\n val.setFromJSON(json);\n return val;\n }\n /** Copy contents from another Point3d, Point2d, Vector2d, or Vector3d */\n public static createFrom(data: XYAndZ | XAndY | Float64Array | number[], result?: Vector3d): Vector3d {\n if (data instanceof Float64Array) {\n let x = 0;\n let y = 0;\n let z = 0;\n if (data.length > 0)\n x = data[0];\n if (data.length > 1)\n y = data[1];\n if (data.length > 2)\n z = data[2];\n return Vector3d.create(x, y, z, result);\n } else if (Array.isArray(data)) {\n return Vector3d.create(data[0], data[1], data.length > 2 ? data[2] : 0);\n }\n return Vector3d.create(data.x, data.y, XYZ.hasZ(data) ? data.z : 0.0, result);\n }\n /**\n * Return a vector defined by start and end points (end - start).\n * @param start start point for vector.\n * @param end end point for vector.\n * @param result optional result.\n */\n public static createStartEnd(start: XAndY | XYAndZ, end: XAndY | XYAndZ, result?: Vector3d): Vector3d {\n const zStart = XYZ.accessZ(start, 0.0) as number;\n const zEnd = XYZ.accessZ(end, 0.0) as number;\n const dz = zEnd - zStart;\n if (result) {\n result.set(end.x - start.x, end.y - start.y, dz);\n return result;\n }\n return new Vector3d(end.x - start.x, end.y - start.y, dz);\n }\n /**\n * Return a vector (optionally in preallocated result, otherwise newly created) from [x0,y0,z0] to [x1,y1,z1]\n * @param x0 start point x coordinate.\n * @param y0 start point y coordinate.\n * @param z0 start point z coordinate.\n * @param x1 end point x coordinate.\n * @param y1 end point y coordinate.\n * @param z1 end point z coordinate.\n * @param result optional result vector.\n */\n public static createStartEndXYZXYZ(\n x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, result?: Vector3d,\n ): Vector3d {\n return this.create(x1 - x0, y1 - y0, z1 - z0, result);\n }\n /**\n * Return a vector which is the input `vector` rotated by `angle` around the `axis` vector.\n * @param vector initial vector.\n * @param axis axis of rotation.\n * @param angle angle of rotation. If undefined, 90 degrees is implied.\n * @param result optional result vector\n * @returns undefined if axis has no length.\n */\n public static createRotateVectorAroundVector(vector: Vector3d, axis: Vector3d, angle?: Angle): Vector3d | undefined {\n // cf. https://en.wikipedia.org/wiki/Rodrigues_rotation_formula\n const unitAxis = axis.normalize();\n if (unitAxis) {\n const xProduct = unitAxis.crossProduct(vector);\n let c, s;\n if (angle) {\n c = angle.cos();\n s = angle.sin();\n } else {\n c = 0.0;\n s = 1.0;\n }\n return Vector3d.createAdd3Scaled(vector, c, xProduct, s, unitAxis, unitAxis.dotProduct(vector) * (1.0 - c));\n }\n return undefined;\n }\n /**\n * Set (replace) xyz components so they are a vector from point0 to point1\n * @param point0 start point of computed vector.\n * @param point1 end point of computed vector.\n */\n public setStartEnd(point0: XYAndZ, point1: XYAndZ) {\n this.x = point1.x - point0.x;\n this.y = point1.y - point0.y;\n this.z = point1.z - point0.z;\n }\n /** Return a vector with 000 xyz parts. */\n public static createZero(result?: Vector3d): Vector3d {\n return Vector3d.create(0, 0, 0, result);\n }\n /** Return a unit X vector optionally multiplied by a scale */\n public static unitX(scale: number = 1): Vector3d {\n return new Vector3d(scale, 0, 0);\n }\n /** Return a unit Y vector optionally multiplied by a scale */\n public static unitY(scale: number = 1): Vector3d {\n return new Vector3d(0, scale, 0);\n }\n /** Return a unit Z vector optionally multiplied by a scale */\n public static unitZ(scale: number = 1): Vector3d {\n return new Vector3d(0, 0, scale);\n }\n /**\n * Scale the instance by 1.0/`denominator`.\n * @param denominator number by which to divide the coordinates of this instance\n * @param result optional pre-allocated object to return\n * @return scaled vector, or undefined if `denominator` is exactly zero (in which case instance is untouched).\n */\n public safeDivideOrNull(denominator: number, result?: Vector3d): Vector3d | undefined {\n if (denominator !== 0.0) {\n return this.scale(1.0 / denominator, result);\n }\n return undefined;\n }\n /**\n * Return a normalized instance and instance length.\n * @param result optional pre-allocated object to return as `v` property\n * @returns object containing the properties:\n * * `v`: unit vector in the direction of the instance, or undefined if `mag` is near zero\n * * `mag`: length of the instance prior to normalization\n */\n public normalizeWithLength(result?: Vector3d): {\n v: Vector3d | undefined;\n mag: number;\n } {\n const originalMagnitude = this.magnitude();\n const correctedMagnitude = Geometry.correctSmallFraction(originalMagnitude);\n result = result ? result : new Vector3d();\n return { v: this.safeDivideOrNull(correctedMagnitude, result), mag: originalMagnitude };\n }\n /**\n * Return a unit vector parallel with this. Return undefined if this.magnitude is near zero.\n * @param result optional result.\n */\n public normalize(result?: Vector3d): Vector3d | undefined {\n return this.normalizeWithLength(result).v;\n }\n /**\n * If this vector has nonzero length, divide by the length to change to a unit vector.\n * @returns true if normalization was successful\n */\n public normalizeInPlace(): boolean {\n return this.normalizeWithLength(this).v !== undefined;\n }\n /**\n * Create a normalized vector from the inputs.\n * @param result optional result\n * @returns undefined if and only if normalization fails\n */\n public static createNormalized(x: number = 0, y: number = 0, z: number = 0, result?: Vector3d): Vector3d | undefined {\n if (undefined === result)\n result = Vector3d.create(x, y, z);\n else\n result.set(x, y, z);\n if (result.normalizeInPlace())\n return result;\n return undefined;\n }\n /**\n * Create a normalized vector from startPoint to endPoint\n * @param startPoint start point of vector\n * @param endPoint end point of vector\n * @param result optional result\n * @returns undefined if and only if normalization fails.\n */\n public static createNormalizedStartEnd(startPoint: XYAndZ, endPoint: XYAndZ, result?: Vector3d): Vector3d | undefined {\n result = Vector3d.createStartEnd(startPoint, endPoint, result);\n if (result.normalizeInPlace())\n return result;\n return undefined;\n }\n\n /**\n * Return fractional length of the projection of the instance onto the target vector.\n * * To find the projection vector, scale the target vector by the return value.\n * * Math details can be found at docs/learning/geometry/PointVector.md\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/ProjectVectorOnVector\n * and https://www.itwinjs.org/sandbox/SaeedTorabi/ProjectVectorOnPlane\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: Vector3d, defaultFraction: number = 0): number {\n /*\n * Projection vector is ((this.target)/||target||)(target/||target||) = ((this.target)/||target||^2)target\n * This function returns (this.target)/||target||^2\n */\n const denominator = target.magnitudeSquared();\n if (denominator < Geometry.smallMetricDistanceSquared)\n return defaultFraction;\n const numerator = this.dotProduct(target);\n return numerator / denominator;\n }\n /**\n * Return a new vector with components negated from the calling instance.\n * @param result optional result vector.\n */\n public negate(result?: Vector3d): Vector3d {\n result = result ? result : new Vector3d();\n result.x = -this.x;\n result.y = -this.y;\n result.z = -this.z;\n return result;\n }\n /** Return a vector same length as this but rotate 90 degrees CCW */\n public rotate90CCWXY(result?: Vector3d): Vector3d {\n result = result ? result : new Vector3d();\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 result.z = this.z;\n return result;\n }\n /** Return a vector same length as this but rotated 90 degrees clockwise */\n public rotate90CWXY(result?: Vector3d): Vector3d {\n result = result ? result : new Vector3d();\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 result.z = this.z;\n return result;\n }\n /**\n * Return a vector which is in the xy plane, perpendicular to the xy part of this vector, and of unit length.\n * * If the xy part is 00, the return is the rotated (but not normalized) xy parts of this vector.\n * @param result optional preallocated result.\n */\n public unitPerpendicularXY(result?: Vector3d): Vector3d {\n result = result ? result : new Vector3d();\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 result.z = 0.0;\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 /**\n * Rotate the xy parts of this vector around the z axis.\n * * z is taken unchanged to the result.\n * @param angle angle to rotate\n * @param result optional preallocated result\n */\n public rotateXY(angle: Angle, result?: Vector3d): Vector3d {\n const s = angle.sin();\n const c = angle.cos();\n const xx: number = this.x;\n const yy: number = this.y;\n result = result ? result : new Vector3d();\n result.x = xx * c - yy * s;\n result.y = xx * s + yy * c;\n result.z = this.z;\n return result;\n }\n /**\n * Return a (new or optionally preallocated) vector that is rotated 90 degrees in\n * the plane of this vector and the target vector.\n * @param target Second vector which defines the plane of rotation.\n * @param result optional preallocated vector for result.\n * @returns rotated vector, or undefined if the cross product of this and the target\n * cannot be normalized (i.e. if the target and this are colinear).\n */\n public rotate90Towards(target: Vector3d, result?: Vector3d): Vector3d | undefined {\n const normal = this.crossProduct(target).normalize();\n return normal ? normal.crossProduct(this, result) : undefined;\n }\n /**\n * Rotate this vector 90 degrees around an axis vector.\n * @returns the (new or optionally reused result) rotated vector, or undefined if the axis\n * vector cannot be normalized.\n */\n public rotate90Around(axis: Vector3d, result?: Vector3d): Vector3d | undefined {\n const unitNormal = axis.normalize();\n // The cross product is in the plane perpendicular to axis -- it loses the part\n // of \"this\" that is along the axis. The unit and scale is supposed to fix that.\n // This matches with Rodrigues' rotation formula because cos(theta) = 0 and sin(theta) = 1.\n return unitNormal ? unitNormal.crossProduct(this).plusScaled(unitNormal, unitNormal.dotProduct(this), result) : undefined;\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`. True fractions are \"between\",\n * 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: XYAndZ, result?: Vector3d): Vector3d {\n result = result ? result : new Vector3d();\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 result.z = this.z + fraction * (vectorB.z - this.z);\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 result.z = vectorB.z + t * (vectorB.z - this.z);\n }\n return result;\n }\n /**\n * Return the vector sum `this - vector`\n * @param vector right side of addition.\n * @param result optional preallocated result.\n */\n public plus(vector: XYAndZ, result?: Vector3d): Vector3d {\n result = result ? result : new Vector3d();\n result.x = this.x + vector.x;\n result.y = this.y + vector.y;\n result.z = this.z + vector.z;\n return result;\n }\n /**\n * Return the vector difference `this - vector`\n * @param vector right side of subtraction.\n * @param result optional preallocated result.\n */\n public minus(vector: XYAndZ, result?: Vector3d): Vector3d {\n result = result ? result : new Vector3d();\n result.x = this.x - vector.x;\n result.y = this.y - vector.y;\n result.z = this.z - vector.z;\n return result;\n }\n /** Return vector + vector * scalar */\n public plusScaled(vector: XYAndZ, scaleFactor: number, result?: Vector3d): Vector3d {\n result = result ? result : new Vector3d();\n result.x = this.x + vector.x * scaleFactor;\n result.y = this.y + vector.y * scaleFactor;\n result.z = this.z + vector.z * scaleFactor;\n return result;\n }\n\n /** Return the (strongly typed Vector3d) `this Vector3d + vectorA * scalarA + vectorB * scalarB` */\n public plus2Scaled(vectorA: XYAndZ, scalarA: number, vectorB: XYAndZ, scalarB: number, result?: Vector3d): Vector3d {\n result = result ? result : new Vector3d();\n result.x = this.x + vectorA.x * scalarA + vectorB.x * scalarB;\n result.y = this.y + vectorA.y * scalarA + vectorB.y * scalarB;\n result.z = this.z + vectorA.z * scalarA + vectorB.z * scalarB;\n return result;\n }\n\n /** Return the (strongly typed Vector3d) `thisVector3d + vectorA * scalarA + vectorB * scalarB + vectorC * scalarC` */\n public plus3Scaled(vectorA: XYAndZ, scalarA: number, vectorB: XYAndZ, scalarB: number, vectorC: XYAndZ, scalarC: number,\n result?: Vector3d): Vector3d {\n result = result ? result : new Vector3d();\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 result.z = this.z + vectorA.z * scalarA + vectorB.z * scalarB + vectorC.z * scalarC;\n return result;\n }\n /** Return the (strongly typed Vector3d) `thisVector3d + vectorA * scalarA + vectorB * scalarB` */\n public static createAdd2Scaled(vectorA: XYAndZ, scaleA: number, vectorB: XYAndZ, scaleB: number,\n result?: Vector3d): Vector3d {\n return Vector3d.create(vectorA.x * scaleA + vectorB.x * scaleB,\n vectorA.y * scaleA + vectorB.y * scaleB,\n vectorA.z * scaleA + vectorB.z * scaleB,\n result);\n }\n /**\n * Return the (strongly typed Vector3d) `thisVector3d + vectorA * scalarA + vectorB * scalarB`\n * with all components presented as numbers\n */\n public static createAdd2ScaledXYZ(ax: number, ay: number, az: number, scaleA: number,\n bx: number, by: number, bz: number, scaleB: number, result?: Vector3d): Vector3d {\n return Vector3d.create(ax * scaleA + bx * scaleB,\n ay * scaleA + by * scaleB,\n az * scaleA + bz * scaleB,\n result);\n }\n /** Return the (strongly typed Vector3d) `thisVector3d + vectorA * scaleA + vectorB * scaleB + vectorC * scaleC` */\n public static createAdd3Scaled(\n vectorA: XYAndZ, scaleA: number, vectorB: XYAndZ, scaleB: number, vectorC: XYAndZ, scaleC: number, result?: Vector3d,\n ): Vector3d {\n return Vector3d.create(vectorA.x * scaleA + vectorB.x * scaleB + vectorC.x * scaleC,\n vectorA.y * scaleA + vectorB.y * scaleB + vectorC.y * scaleC,\n vectorA.z * scaleA + vectorB.z * scaleB + vectorC.z * scaleC,\n result);\n }\n /** Return vector * scalar */\n public scale(scale: number, result?: Vector3d): Vector3d {\n result = result ? result : new Vector3d();\n result.x = this.x * scale;\n result.y = this.y * scale;\n result.z = this.z * scale;\n return result;\n }\n /**\n * Return a vector in the direction of `this` but with specified length.\n * @param length desired length of vector\n * @param result optional preallocated result to populate and return\n * @returns scaled instance vector, or undefined if the instance magnitude is too small\n */\n public scaleToLength(length: number, result?: Vector3d): Vector3d | undefined {\n const mag = Geometry.correctSmallFraction(this.magnitude());\n if (mag === 0)\n return undefined;\n return this.scale(length / mag, result);\n }\n /**\n * Compute the cross product of this vector with `vectorB`. Immediately pass it to `normalize`.\n * @param vectorB second vector for cross product.\n * @returns see `Vector3d` method `normalize()` for error condition.\n */\n public unitCrossProduct(vectorB: Vector3d, result?: Vector3d): Vector3d | undefined {\n return this.crossProduct(vectorB, result).normalize(result);\n }\n /**\n * Compute the cross product of this vector with `vectorB` and normalize it.\n * * If length is zero, return the vector given by x, y, z.\n * @param vectorB second vector of cross product\n * @param x x value for default result\n * @param y y value for default result\n * @param z z value for default result\n * @param result optional pre-allocated result.\n */\n public unitCrossProductWithDefault(vectorB: Vector3d, x: number, y: number, z: number, result?: Vector3d): Vector3d {\n const unit = this.crossProduct(vectorB, result).normalize(result);\n if (unit === undefined)\n return Vector3d.create(x, y, z, result);\n return unit;\n }\n /**\n * Normalize this vector, using given xyz as default if length is zero.\n * * if this instance and x,y,z are both 000, return unit x vector.\n * @param x x value for default result\n * @param y y value for default result\n * @param z z value for default result\n * @param result optional pre-allocated result.\n */\n public normalizeWithDefault(x: number, y: number, z: number, result?: Vector3d): Vector3d {\n const unit = this.normalize(result);\n if (unit)\n return unit;\n // try back to x,y,z\n result = Vector3d.create(x, y, z, result);\n if (result.normalizeInPlace())\n return result;\n\n return Vector3d.create(1, 0, 0, result);\n }\n /**\n * Try to normalize (divide by magnitude), storing the result in place.\n * @param smallestMagnitude smallest magnitude allowed as divisor.\n * @returns false if magnitude is too small. In this case the vector is unchanged.\n */\n public tryNormalizeInPlace(smallestMagnitude: number = Geometry.smallFraction): boolean {\n const a = this.magnitude();\n if (a < smallestMagnitude || a === 0.0)\n return false;\n this.scaleInPlace(1.0 / a);\n return true;\n }\n /**\n * Compute cross product with `vectorB`\n * * cross product vector will have the given length.\n * @param vectorB second vector for cross product.\n * @param productLength desired length of result vector.\n * @param result optional preallocated vector\n * @return undefined if the cross product is near zero length.\n */\n public sizedCrossProduct(vectorB: Vector3d, productLength: number, result?: Vector3d): Vector3d | undefined {\n result = this.crossProduct(vectorB, result);\n if (result.tryNormalizeInPlace()) {\n result.scaleInPlace(productLength);\n return result;\n }\n return undefined;\n }\n /**\n * Compute the squared magnitude of a cross product (without allocating a temporary vector object)\n * @param vectorB second vector of cross product\n * @returns the squared magnitude of the cross product of this instance with vectorB.\n */\n public crossProductMagnitudeSquared(vectorB: XYAndZ): number {\n const xx = this.y * vectorB.z - this.z * vectorB.y;\n const yy = this.z * vectorB.x - this.x * vectorB.z;\n const zz = this.x * vectorB.y - this.y * vectorB.x;\n return xx * xx + yy * yy + zz * zz;\n }\n /**\n * Compute the magnitude of a cross product (without allocating a temporary vector object)\n * @param vectorB second vector of cross product\n * @returns the magnitude of the cross product of this instance with vectorB.\n */\n public crossProductMagnitude(vectorB: XYAndZ): number {\n return Math.sqrt(this.crossProductMagnitudeSquared(vectorB));\n }\n /**\n * Return the dot product of this vector with vectorB.\n * @param vectorB second vector of cross product\n * @returns the dot product of this instance with vectorB\n */\n public dotProduct(vectorB: XYAndZ): number {\n return this.x * vectorB.x + this.y * vectorB.y + this.z * vectorB.z;\n }\n /**\n * Return the dot product of the xyz components of two inputs that are XYAndZ but otherwise not explicitly Vector3d\n * @param targetA target point for first vector\n * @param targetB target point for second vector\n */\n public static dotProductAsXYAndZ(dataA: XYAndZ, dataB: XYAndZ): number {\n return dataA.x * dataB.x + dataA.y * dataB.y + dataA.z * dataB.z;\n }\n /**\n * Returns the dot product of this vector with the with vector from pointA to pointB\n * @param pointA start point of second vector of dot product\n * @param pointB end point of second vector of dot product\n */\n public dotProductStartEnd(pointA: XYAndZ, pointB: XYAndZ): number {\n return this.x * (pointB.x - pointA.x)\n + this.y * (pointB.y - pointA.y)\n + this.z * (pointB.z - pointA.z);\n }\n /**\n * Returns the dot product with vector (pointB - pointA * pointB.w)\n * * That is, pointA is weighted to weight of pointB.\n * * If pointB.w is zero, the homogeneous pointB is a simple vector\n * * If pointB.w is nonzero, the vector \"from A to B\" is not physical length.\n */\n public dotProductStart3dEnd4d(pointA: Point3d, pointB: Point4d): number {\n const w = pointB.w;\n return this.x * (pointB.x - pointA.x * w)\n + this.y * (pointB.y - pointA.y * w)\n + this.z * (pointB.z - pointA.z * w);\n }\n /** Cross product with vector from pointA to pointB */\n public crossProductStartEnd(pointA: Point3d, pointB: Point3d, result?: Vector3d): Vector3d {\n return Vector3d.createCrossProduct(\n this.x, this.y, this.z, pointB.x - pointA.x, pointB.y - pointA.y, pointB.z - pointA.z, result,\n );\n }\n /** Cross product (xy parts only) with vector from pointA to pointB */\n public crossProductStartEndXY(pointA: Point3d, pointB: Point3d): number {\n return Geometry.crossProductXYXY(this.x, this.y, pointB.x - pointA.x, pointB.y - pointA.y);\n }\n /** Dot product with vector from pointA to pointB, with pointB given as x,y,z */\n public dotProductStartEndXYZ(pointA: Point3d, x: number, y: number, z: number): number {\n return this.x * (x - pointA.x)\n + this.y * (y - pointA.y)\n + this.z * (z - pointA.z);\n }\n /** Dot product with vector from pointA to pointB, using only xy parts */\n public dotProductStartEndXY(pointA: Point3d, pointB: Point3d): number {\n return this.x * (pointB.x - pointA.x)\n + this.y * (pointB.y - pointA.y);\n }\n /**\n * Dot product with vector from pointA to pointB, with pointB given as (weighted) wx,wy,wz,w\n * * We need to unweight pointB (which is a homogeneous point) to be able to participate in the\n * vector dot product\n * * if the weight is near zero metric, the return is zero.\n */\n public dotProductStartEndXYZW(pointA: Point3d, wx: number, wy: number, wz: number, w: number): number {\n if (Geometry.isSmallMetricDistance(w))\n return 0.0;\n const dw = 1.0 / w;\n return this.x * (dw * wx - pointA.x)\n + this.y * (dw * wy - pointA.y)\n + this.z * (dw * wz - pointA.z);\n }\n /** Return the dot product of the instance and vectorB, using only the x and y parts. */\n public dotProductXY(vectorB: Vector3d): number {\n return this.x * vectorB.x + this.y * vectorB.y;\n }\n /**\n * Dot product with vector (x,y,z)\n * @param x x component for dot product\n * @param y y component for dot product\n * @param z z component for dot product\n */\n public dotProductXYZ(x: number, y: number, z: number = 0): number {\n return this.x * x + this.y * y + this.z * z;\n }\n /** Return the triple product of the instance, vectorB, and vectorC */\n public tripleProduct(vectorB: Vector3d, vectorC: Vector3d): number {\n return Geometry.tripleProduct(this.x, this.y, this.z, vectorB.x, vectorB.y, vectorB.z,\n vectorC.x, vectorC.y, vectorC.z);\n }\n /** Return the cross product of the instance and vectorB, using only the x and y parts. */\n public crossProductXY(vectorB: Vector3d): number {\n return this.x * vectorB.y - this.y * vectorB.x;\n }\n /**\n * Return the cross product of this vector and vectorB.\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/CrossProduct\n * @param vectorB second vector of cross product\n * @param result optional preallocated result.\n */\n public crossProduct(vectorB: Vector3d, result?: Vector3d): Vector3d {\n return Vector3d.createCrossProduct(this.x, this.y, this.z, vectorB.x, vectorB.y, vectorB.z, result);\n }\n /**\n * Return cross product of `this` with the vector `(x, y, z)`\n * @param x x component of second vector\n * @param y y component of second vector\n * @param z z component of second vector\n * @param result computed cross product (new Vector3d).\n */\n public crossProductXYZ(x: number, y: number, z: number, result?: Vector3d): Vector3d {\n return Vector3d.createCrossProduct(this.x, this.y, this.z, x, y, z, result);\n }\n /**\n * Return the angle in radians (not as strongly typed Angle) from this vector to vectorB.\n * * The returned angle is between 0 and `Math.PI`.\n * * The returned angle is measured in the plane containing the two vectors.\n * * Use `planarRadiansTo` and `signedRadiansTo` to return an angle measured in a specific plane.\n * @param vectorB target vector.\n */\n public radiansTo(vectorB: Vector3d): number {\n // ||axb|| = ||a|| ||b|| |sin(t)| and a.b = ||a|| ||b|| cos(t) ==>\n // ||axb|| / a.b = sin(t)/cos(t) = tan(t) ==> t = arctan(||axb|| / a.b).\n return Math.atan2(this.crossProductMagnitude(vectorB), this.dotProduct(vectorB));\n }\n /**\n * Return the (strongly-typed) angle from this vector to vectorB.\n * * The returned angle is between 0 and 180 degrees.\n * * The returned angle is measured in the plane containing the two vectors.\n * * Use `planarAngleTo` and `signedAngleTo` to return an angle measured in a specific plane.\n * @param vectorB target vector.\n */\n public angleTo(vectorB: Vector3d): Angle {\n return Angle.createRadians(this.radiansTo(vectorB));\n }\n /**\n * Return the (strongly-typed) angle from this vector to the plane perpendicular to planeNormal.\n * * The returned angle is between -90 and 90 degrees.\n * * The returned angle is measured in the plane containing the two vectors.\n * * The function returns PI/2 - angleTo(planeNormal).\n * @param planeNormal a normal vector to the plane.\n */\n public angleFromPerpendicular(planeNormal: Vector3d): Angle {\n return Angle.createAtan2(this.dotProduct(planeNormal), this.crossProductMagnitude(planeNormal));\n }\n /**\n * Return the angle in radians (not as strongly typed Angle) from this vector to the plane perpendicular to planeNormal.\n * * The returned angle is between -PI/2 and PI/2.\n * * The returned angle is measured in the plane containing the two vectors.\n * * The function returns PI/2 - radiansTo(planeNormal).\n * @param planeNormal a normal vector to the plane.\n */\n public radiansFromPerpendicular(planeNormal: Vector3d): number {\n return Math.atan2(this.dotProduct(planeNormal), this.crossProductMagnitude(planeNormal));\n }\n /**\n * Return the (strongly-typed) angle from this vector to vectorB, using only the xy parts.\n * * The returned angle is between -180 and 180 degrees.\n * * Use [[planarAngleTo]] and [[signedAngleTo]] to return an angle measured in a specific plane.\n * @param vectorB target vector.\n */\n public angleToXY(vectorB: Vector3d): Angle {\n return Angle.createAtan2(this.crossProductXY(vectorB), this.dotProductXY(vectorB));\n }\n /**\n * Return the angle in radians (not as strongly-typed Angle) from `this` vector to `vectorB`, measured\n * in their containing plane whose normal lies in the same half-space as `vectorW`.\n * * The returned angle is between `-Math.PI` and `Math.PI`.\n * * If the cross product of `this` vector and `vectorB` lies on the same side of the plane as `vectorW`,\n * this function returns `radiansTo(vectorB)`; otherwise, it returns `-radiansTo(vectorB)`.\n * * `vectorW` does not have to be perpendicular to the plane.\n * * Use [[planarRadiansTo]] to measure the angle between vectors that are projected to another plane.\n * @param vectorB target vector.\n * @param vectorW determines the side of the plane in which the returned angle is measured\n */\n public signedRadiansTo(vectorB: Vector3d, vectorW: Vector3d): number {\n // A.B = |A||B|cos(theta) and |AxB| = |A||B|sin(theta) so theta = arctan(|AxB|/A.B)\n const p = this.crossProduct(vectorB);\n const theta = Math.atan2(p.magnitude(), this.dotProduct(vectorB));\n if (vectorW.dotProduct(p) < 0.0)\n return -theta;\n else\n return theta;\n }\n /**\n * Return the (strongly-typed) angle from this vector to vectorB, measured\n * in their containing plane whose normal lies in the same half-space as vectorW.\n * * The returned angle is between -180 and 180 degrees.\n * * If the cross product of this vector and vectorB lies on the same side of the plane as vectorW,\n * this function returns `angleTo(vectorB)`; otherwise, it returns `-angleTo(vectorB)`.\n * * `vectorW` does not have to be perpendicular to the plane.\n * * Use [[planarAngleTo]] to measure the angle between vectors that are projected to another plane.\n * @param vectorB target vector.\n * @param vectorW determines the side of the plane in which the returned angle is measured\n */\n public signedAngleTo(vectorB: Vector3d, vectorW: Vector3d): Angle {\n return Angle.createRadians(this.signedRadiansTo(vectorB, vectorW));\n }\n /**\n * Return the angle in radians (not as strongly-typed Angle) from this vector to vectorB,\n * measured between their projections to the plane with the given normal.\n * * The returned angle is between `-Math.PI` and `Math.PI`.\n * @param vectorB target vector\n * @param planeNormal the normal vector to the plane.\n */\n public planarRadiansTo(vectorB: Vector3d, planeNormal: Vector3d): number {\n const square = planeNormal.dotProduct(planeNormal);\n if (square === 0.0)\n return 0.0;\n const factor = 1.0 / square;\n /*\n * projection of vector 'v' on normal 'n' is given by vProj = [dot(v,n)/||n||^2]*n\n * and projection of 'v' on the plane is given by 'v - vProj'\n */\n const thisProj: Vector3d = this.plusScaled(planeNormal, -this.dotProduct(planeNormal) * factor);\n const vectorBProj: Vector3d = vectorB.plusScaled(planeNormal, -vectorB.dotProduct(planeNormal) * factor);\n return thisProj.signedRadiansTo(vectorBProj, planeNormal);\n }\n /**\n * Return the (strongly-type) angle from this vector to vectorB,\n * measured between their projections to the plane with the given normal.\n * * The returned angle is between -180 and 180 degrees.\n * @param vectorB target vector.\n * @param planeNormal the normal vector to the plane.\n */\n public planarAngleTo(vectorB: Vector3d, planeNormal: Vector3d): Angle {\n return Angle.createRadians(this.planarRadiansTo(vectorB, planeNormal));\n }\n /**\n * Return the smallest angle (in radians) from the (bidirectional) line containing `this`\n * to the (bidirectional) line containing `vectorB`\n */\n public smallerUnorientedRadiansTo(vectorB: Vector3d): number {\n const c = this.dotProduct(vectorB);\n const s = this.crossProductMagnitude(vectorB);\n return Math.atan2(Math.abs(s), Math.abs(c));\n }\n /**\n * Return the smallest (strongly typed) angle from the (bidirectional) line containing `this`\n * to the (bidirectional) line containing `vectorB`\n */\n public smallerUnorientedAngleTo(vectorB: Vector3d): Angle {\n return Angle.createRadians(this.smallerUnorientedRadiansTo(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 in comparison\n * @param oppositeIsParallel whether to consider diametrically opposed vectors as parallel. Default false.\n * @param returnValueIfAnInputIsZeroLength if either vector is near zero length, return this value. Default false.\n * @param options optional radian and distance tolerances.\n */\n public isParallelTo(\n other: Vector3d,\n oppositeIsParallel: boolean = false,\n returnValueIfAnInputIsZeroLength: boolean = false,\n options?: PerpParallelOptions,\n ): 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 cross2 = this.crossProductMagnitudeSquared(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 cross2 <= 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 (default false).\n * @param options optional radian and distance tolerances.\n */\n public isPerpendicularTo(\n other: Vector3d, 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"]}
|