@itwin/core-geometry 5.0.0-dev.114 → 5.0.0-dev.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -1
- package/lib/cjs/bspline/BSplineSurface.d.ts +2 -1
- package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.js +2 -1
- package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +5 -3
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.d.ts +15 -21
- package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.js +38 -58
- package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +38 -16
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +83 -23
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +12 -13
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +23 -23
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +36 -12
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js +34 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
- package/lib/cjs/geometry3d/AngleSweep.d.ts +10 -6
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +17 -6
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +3 -3
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +8 -7
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +19 -15
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.d.ts +7 -7
- package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js +9 -9
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/geometry4d/MomentData.d.ts +32 -34
- package/lib/cjs/geometry4d/MomentData.d.ts.map +1 -1
- package/lib/cjs/geometry4d/MomentData.js +56 -57
- package/lib/cjs/geometry4d/MomentData.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.d.ts +3 -2
- package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js +9 -2
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/bspline/BSplineSurface.d.ts +2 -1
- package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineSurface.js +2 -1
- package/lib/esm/bspline/BSplineSurface.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +5 -3
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.d.ts +15 -21
- package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.js +38 -58
- package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +38 -16
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +84 -24
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +12 -13
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +23 -23
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +36 -12
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js +30 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
- package/lib/esm/geometry3d/AngleSweep.d.ts +10 -6
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +17 -6
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +3 -3
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +8 -7
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +19 -15
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.d.ts +7 -7
- package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js +9 -9
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/geometry4d/MomentData.d.ts +32 -34
- package/lib/esm/geometry4d/MomentData.d.ts.map +1 -1
- package/lib/esm/geometry4d/MomentData.js +56 -57
- package/lib/esm/geometry4d/MomentData.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.d.ts +3 -2
- package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Point4d.js +9 -2
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Point4d.js","sourceRoot":"","sources":["../../../src/geometry4d/Point4d.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,0CAAgF;AAChF,mDAAgD;AAChD,6FAA0F;AAC1F,uFAAoF;AACpF,mEAAwD;AACxD,mEAAkE;AAClE,+CAA4C;AAQ5C;;;;;;;;;GASG;AACH,SAAS,mBAAmB,CAAC,GAAW,EAAE,EAAU,EAAE,GAAW,EAC/D,CAAS,EAAE,EAAU,EAAE,IAAY;IACnC,OAAO,IAAI,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AAChD,CAAC;AAED;;;;;;;GAOG;AACH,MAAa,OAAQ,SAAQ,iBAAO;IAClC,6CAA6C;IACtC,IAAI,CAAe;IAC1B,kCAAkC;IAC3B,GAAG,CAAC,IAAY,CAAC,EAAE,IAAY,CAAC,EAAE,IAAY,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AC;QACnC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAE,+BAA+B;QACpE,MAAM,GAAG,GAAG,mBAAQ,CAAC,yBAAyB,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC;QACjE,IAAI,GAAG,KAAK,SAAS;YACnB,OAAO,SAAS,CAAC;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;CACF;AA7kBD,0BA6kBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Numerics\n */\nimport { BeJSONFunctions, Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { Plane3d } from \"../geometry3d/Plane3d\";\nimport { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { XAndY, XYAndZ } from \"../geometry3d/XYZProps\";\n\n/**\n * 4d point packed in an array of 4 numbers.\n * @public\n */\nexport type Point4dProps = number[];\n/**\n *\n * @param ddg numerator second derivative\n * @param dh denominator derivative\n * @param ddh denominator second derivative\n * @param f primary function (g/h)\n * @param df derivative of (g/h)\n * @param divH = (1/h)\n * @internal\n */\nfunction quotientDerivative2(ddg: number, dh: number, ddh: number,\n f: number, df: number, divH: number): number {\n return divH * (ddg - 2.0 * df * dh - f * ddh);\n}\n\n/** 4 Dimensional point (x,y,z,w) used in perspective calculations.\n * * the coordinates are stored in a Float64Array of length 4.\n * * properties `x`, `y`, `z`, `w` access array members.\n * *\n * * The coordinates are physically stored as a single Float64Array with 4 entries. (w last)\n * *\n * @public\n */\nexport class Point4d extends Plane3d implements BeJSONFunctions {\n /** x,y,z,w are packed into a Float64Array */\n public xyzw: Float64Array;\n /** Set x,y,z,w of this point. */\n public set(x: number = 0, y: number = 0, z: number = 0, w: number = 0): Point4d {\n this.xyzw[0] = x;\n this.xyzw[1] = y;\n this.xyzw[2] = z;\n this.xyzw[3] = w;\n return this;\n }\n /** Set a component by index.\n * * No change if index is out of range.\n */\n public setComponent(index: number, value: number) {\n if (index >= 0 && index < 4) {\n this.xyzw[index] = value;\n }\n }\n /** The x component. */\n public get x() { return this.xyzw[0]; }\n public set x(val: number) { this.xyzw[0] = val; }\n /** The y component. */\n public get y() { return this.xyzw[1]; }\n public set y(val: number) { this.xyzw[1] = val; }\n /** The z component. */\n public get z() { return this.xyzw[2]; }\n public set z(val: number) { this.xyzw[2] = val; }\n /** The w component of this point. */\n public get w() { return this.xyzw[3]; }\n public set w(val: number) { this.xyzw[3] = val; }\n /** Construct from coordinates. */\n protected constructor(x: number = 0, y: number = 0, z: number = 0, w: number = 0) {\n super();\n this.xyzw = new Float64Array(4);\n this.xyzw[0] = x;\n this.xyzw[1] = y;\n this.xyzw[2] = z;\n this.xyzw[3] = w;\n }\n /** Return a Point4d with specified x,y,z,w */\n public static create(x: number = 0, y: number = 0, z: number = 0, w: number = 0, result?: Point4d): Point4d {\n return result ? result.set(x, y, z, w) : new Point4d(x, y, z, w);\n }\n /**\n * Create a \"Point4d as a plane\" from \"any\" other [[PlaneAltitudeEvaluator]] type.\n * @param source\n * @returns\n */\n public static createPlaneFrom(source: PlaneAltitudeEvaluator): Point4d | undefined {\n return new Point4d(source.normalX(), source.normalY(), source.normalZ(), source.altitudeXYZ(0, 0, 0));\n }\n /** Copy coordinates from `other`. */\n public setFrom(other: Point4d): Point4d {\n this.xyzw[0] = other.xyzw[0];\n this.xyzw[1] = other.xyzw[1];\n this.xyzw[2] = other.xyzw[2];\n this.xyzw[3] = other.xyzw[3];\n return this;\n }\n /** Clone this point */\n public clone(result?: Point4d): Point4d {\n return result ? result.setFrom(this) : new Point4d(this.xyzw[0], this.xyzw[1], this.xyzw[2], this.xyzw[3]);\n }\n /** Set this point's xyzw from a json array `[x,y,z,w]` */\n public setFromJSON(json?: Point4dProps) {\n if (Geometry.isNumberArray(json, 4))\n this.set(json[0], json[1], json[2], json[3]);\n else\n this.set(0, 0, 0, 0);\n }\n\n /** Create a new point with coordinates from a json array `[x,y,z,w]` */\n public static fromJSON(json?: Point4dProps): Point4d {\n const result = new Point4d();\n result.setFromJSON(json);\n return result;\n }\n /** Near-equality test, using `Geometry.isSameCoordinate` on all 4 x,y,z,w */\n public isAlmostEqual(other: Point4d, tolerance: number = Geometry.smallMetricDistance): boolean {\n return Geometry.isSameCoordinate(this.x, other.x, tolerance)\n && Geometry.isSameCoordinate(this.y, other.y, tolerance)\n && Geometry.isSameCoordinate(this.z, other.z, tolerance)\n && Geometry.isSameCoordinate(this.w, other.w, tolerance);\n }\n /**\n * Test for same coordinate by direct x,y,z,w args\n * @param x x to test\n * @param y y to test\n * @param z z to test\n * @param w w to test\n */\n public isAlmostEqualXYZW(x: number, y: number, z: number, w: number, tolerance: number = Geometry.smallMetricDistance): boolean {\n return Geometry.isSameCoordinate(this.x, x, tolerance)\n && Geometry.isSameCoordinate(this.y, y, tolerance)\n && Geometry.isSameCoordinate(this.z, z, tolerance)\n && Geometry.isSameCoordinate(this.w, w, tolerance);\n }\n\n /**\n * Convert an Angle to a JSON object.\n * @return {*} [x,y,z,w]\n */\n public toJSON(): Point4dProps {\n return [this.xyzw[0], this.xyzw[1], this.xyzw[2], this.xyzw[3]];\n }\n /** Return the 4d distance from this point to other, with all 4 components squared into the hypotenuse.\n * * x,y,z,w all participate without normalization.\n */\n public distanceXYZW(other: Point4d): number {\n return Geometry.hypotenuseXYZW(other.xyzw[0] - this.xyzw[0], other.xyzw[1] - this.xyzw[1], other.xyzw[2] - this.xyzw[2], other.xyzw[3] - this.xyzw[3]);\n }\n /** Return the squared 4d distance from this point to other, with all 4 components squared into the hypotenuse.\n * * x,y,z,w all participate without normalization.\n */\n public distanceSquaredXYZW(other: Point4d): number {\n return Geometry.hypotenuseSquaredXYZW(other.xyzw[0] - this.xyzw[0], other.xyzw[1] - this.xyzw[1], other.xyzw[2] - this.xyzw[2], other.xyzw[3] - this.xyzw[3]);\n }\n /** Return the distance between the instance and other after normalizing by weights\n */\n public realDistanceXY(other: Point4d): number | undefined {\n const wA = this.w;\n const wB = other.w;\n if (Geometry.isSmallMetricDistance(wA) || Geometry.isSmallMetricDistance(wB))\n return undefined;\n return Geometry.hypotenuseXY(other.xyzw[0] / wB - this.xyzw[0] / wA, other.xyzw[1] / wB - this.xyzw[1] / wA);\n }\n /** Return the largest absolute distance between corresponding components\n * * x,y,z,w all participate without normalization.\n */\n public maxDiff(other: Point4d): number {\n return Math.max(Math.abs(other.xyzw[0] - this.xyzw[0]), Math.abs(other.xyzw[1] - this.xyzw[1]), Math.abs(other.xyzw[2] - this.xyzw[2]), Math.abs(other.xyzw[3] - this.xyzw[3]));\n }\n /** Return the largest absolute entry of all 4 components x,y,z,w */\n public maxAbs(): number {\n return Math.max(Math.abs(this.xyzw[0]), Math.abs(this.xyzw[1]), Math.abs(this.xyzw[2]), Math.abs(this.xyzw[3]));\n }\n /** Returns the magnitude including all 4 components x,y,z,w */\n public magnitudeXYZW(): number {\n return Geometry.hypotenuseXYZW(this.xyzw[0], this.xyzw[1], this.xyzw[2], this.xyzw[3]);\n }\n /** Returns the magnitude of the leading xyz components. w is ignored. (i.e. the leading xyz are NOT divided by w.) */\n public magnitudeSquaredXYZ(): number {\n return Geometry.hypotenuseSquaredXYZ(this.xyzw[0], this.xyzw[1], this.xyzw[2]);\n }\n\n /** Return the difference (this-other) using all 4 components x,y,z,w */\n public minus(other: Point4d, result?: Point4d): Point4d {\n return Point4d.create(this.xyzw[0] - other.xyzw[0], this.xyzw[1] - other.xyzw[1], this.xyzw[2] - other.xyzw[2], this.xyzw[3] - other.xyzw[3], result);\n }\n /** Return `((other.w * this) - (this.w * other))` */\n public crossWeightedMinus(other: Point4d, result?: Vector3d): Vector3d {\n const wa = this.xyzw[3];\n const wb = other.xyzw[3];\n return Vector3d.create(wb * this.xyzw[0] - wa * other.xyzw[0], wb * this.xyzw[1] - wa * other.xyzw[1], wb * this.xyzw[2] - wa * other.xyzw[2], result);\n }\n /** Return `((other.w * this) - (this.w * other))`, with other.w known to be 1 */\n public crossWeightedMinusPoint3d(other: Point3d, result?: Vector3d): Vector3d {\n const wa = this.xyzw[3];\n return Vector3d.create(this.xyzw[0] - wa * other.x, this.xyzw[1] - wa * other.y, this.xyzw[2] - wa * other.z, result);\n }\n /** Return the sum of this and other, using all 4 components x,y,z,w */\n public plus(other: Point4d, result?: Point4d): Point4d {\n return Point4d.create(this.xyzw[0] + other.xyzw[0], this.xyzw[1] + other.xyzw[1], this.xyzw[2] + other.xyzw[2], this.xyzw[3] + other.xyzw[3], result);\n }\n /** Test if all components are nearly zero. */\n public get isAlmostZero(): boolean {\n return Geometry.isSmallMetricDistance(this.maxAbs());\n }\n /** Create a point with zero in all coordinates. */\n public static createZero(): Point4d { return new Point4d(0, 0, 0, 0); }\n /**\n * Create plane coefficients for the plane containing pointA, pointB, and 0010.\n * @param pointA first point\n * @param pointB second point\n */\n public static createPlanePointPointZ(pointA: Point4d, pointB: Point4d, result?: Point4d) {\n return Point4d.create(pointA.y * pointB.w - pointA.w * pointB.y, pointA.w * pointB.x - pointA.x * pointB.w, 0.0, pointA.x * pointB.y - pointA.y * pointB.x, result);\n }\n /**\n * extract 3 consecutive numbers from a Float64Array into the xyz values of a Point4d with w = 1.\n * @param data buffer of numbers\n * @param xIndex first index for x,y,z sequence\n */\n public static createFromPackedXYZ(data: Float64Array, xIndex: number = 0, result?: Point4d): Point4d | undefined {\n if (xIndex >= 0 && xIndex + 2 < data.length)\n return Point4d.create(data[xIndex], data[xIndex + 1], data[xIndex + 2], 1.0, result);\n return undefined;\n }\n /**\n * extract 4 consecutive numbers from a Float64Array into a Point4d.\n * @param data buffer of numbers\n * @param xIndex first index for x,y,z,w sequence\n */\n public static createFromPacked(data: Float64Array, xIndex: number = 0, result?: Point4d): Point4d | undefined {\n if (xIndex >= 0 && xIndex + 3 < data.length)\n return Point4d.create(data[xIndex], data[xIndex + 1], data[xIndex + 2], data[xIndex + 3], result);\n return undefined;\n }\n /**\n * extract 4 consecutive numbers from a Float64Array into a Point4d.\n * @param data buffer of numbers\n * @param xIndex first index for x,y,z,w sequence. Assumed to be a valid index!\n * @deprecated in 4.x. Use createFromPacked instead.\n */\n public static createFromPackedXYZW(data: Float64Array, xIndex: number = 0, result?: Point4d): Point4d {\n return Point4d.create(data[xIndex], data[xIndex + 1], data[xIndex + 2], data[xIndex + 3], result);\n }\n /** Create a `Point4d` with x,y,z from an `XYAndZ` input, and w from a separate number. */\n public static createFromPointAndWeight(xyz: XYAndZ, w: number): Point4d {\n return new Point4d(xyz.x, xyz.y, xyz.z, w);\n }\n /** Create a `Point4d` from\n * * Point2d, Point3d, or Point4d\n * * other structure with members x,y and optional z,w\n * * array of numbers\n * * default z is 0.0\n * * default w is 1.0 (array[3] can replace)\n */\n public static createFromPoint(point: XAndY | XYAndZ | Point4d | number[]): Point4d {\n if (point instanceof Point2d)\n return new Point4d(point.x, point.y, 0, 1);\n if (point instanceof Point3d)\n return new Point4d(point.x, point.y, point.z, 1);\n if (point instanceof Point4d)\n return point.clone();\n // hm ... some flavor of x,y,z subset ...\n if (Array.isArray(point)) {\n const x1 = point.length > 0 ? point[0] : 0.0;\n const y1 = point.length > 1 ? point[1] : 0.0;\n const z1 = point.length > 2 ? point[2] : 0.0;\n const w1 = point.length > 3 ? point[3] : 1.0;\n return new Point4d(x1, y1, z1, w1);\n }\n const x = point.x;\n const y = point.y;\n const z = point.hasOwnProperty(\"z\") ? (point as any).z : 0.0;\n const w = point.hasOwnProperty(\"w\") ? (point as any).w : 1.0;\n return new Point4d(x, y, z, w);\n\n }\n /** Return `point + vector * scalar` */\n public plusScaled(vector: Point4d, scaleFactor: number, result?: Point4d): Point4d {\n return Point4d.create(this.xyzw[0] + vector.xyzw[0] * scaleFactor, this.xyzw[1] + vector.xyzw[1] * scaleFactor, this.xyzw[2] + vector.xyzw[2] * scaleFactor, this.xyzw[3] + vector.xyzw[3] * scaleFactor, result);\n }\n /** Return interpolation between instance and pointB at fraction\n */\n public interpolate(fraction: number, pointB: Point4d, result?: Point4d): Point4d {\n const v = 1.0 - fraction;\n return Point4d.create(this.xyzw[0] * v + pointB.xyzw[0] * fraction, this.xyzw[1] * v + pointB.xyzw[1] * fraction, this.xyzw[2] * v + pointB.xyzw[2] * fraction, this.xyzw[3] * v + pointB.xyzw[3] * fraction, result);\n }\n /** Return `point + vectorA * scalarA + vectorB * scalarB` */\n public plus2Scaled(vectorA: Point4d, scalarA: number, vectorB: Point4d, scalarB: number, result?: Point4d): Point4d {\n return Point4d.create(this.xyzw[0] + vectorA.xyzw[0] * scalarA + vectorB.xyzw[0] * scalarB, this.xyzw[1] + vectorA.xyzw[1] * scalarA + vectorB.xyzw[1] * scalarB, this.xyzw[2] + vectorA.xyzw[2] * scalarA + vectorB.xyzw[2] * scalarB, this.xyzw[3] + vectorA.xyzw[3] * scalarA + vectorB.xyzw[3] * scalarB, result);\n }\n /** Return `point + vectorA * scalarA + vectorB * scalarB + vectorC * scalarC` */\n public plus3Scaled(vectorA: Point4d, scalarA: number, vectorB: Point4d, scalarB: number, vectorC: Point4d, scalarC: number, result?: Point4d): Point4d {\n return Point4d.create(this.xyzw[0] + vectorA.xyzw[0] * scalarA + vectorB.xyzw[0] * scalarB + vectorC.xyzw[0] * scalarC, this.xyzw[1] + vectorA.xyzw[1] * scalarA + vectorB.xyzw[1] * scalarB + vectorC.xyzw[1] * scalarC, this.xyzw[2] + vectorA.xyzw[2] * scalarA + vectorB.xyzw[2] * scalarB + vectorC.xyzw[2] * scalarC, this.xyzw[3] + vectorA.xyzw[3] * scalarA + vectorB.xyzw[3] * scalarB + vectorC.xyzw[3] * scalarC, result);\n }\n /** Return `point + vectorA * scalarA + vectorB * scalarB` */\n public static createAdd2Scaled(vectorA: Point4d, scalarA: number, vectorB: Point4d, scalarB: number, result?: Point4d): Point4d {\n return Point4d.create(vectorA.xyzw[0] * scalarA + vectorB.xyzw[0] * scalarB, vectorA.xyzw[1] * scalarA + vectorB.xyzw[1] * scalarB, vectorA.xyzw[2] * scalarA + vectorB.xyzw[2] * scalarB, vectorA.xyzw[3] * scalarA + vectorB.xyzw[3] * scalarB, result);\n }\n /** Return `point + vectorA \\ scalarA + vectorB * scalarB + vectorC * scalarC` */\n public static createAdd3Scaled(vectorA: Point4d, scalarA: number, vectorB: Point4d, scalarB: number, vectorC: Point4d, scalarC: number, result?: Point4d): Point4d {\n return Point4d.create(vectorA.xyzw[0] * scalarA + vectorB.xyzw[0] * scalarB + vectorC.xyzw[0] * scalarC, vectorA.xyzw[1] * scalarA + vectorB.xyzw[1] * scalarB + vectorC.xyzw[1] * scalarC, vectorA.xyzw[2] * scalarA + vectorB.xyzw[2] * scalarB + vectorC.xyzw[2] * scalarC, vectorA.xyzw[3] * scalarA + vectorB.xyzw[3] * scalarB + vectorC.xyzw[3] * scalarC, result);\n }\n /** Return dot product of (4d) vectors from the instance to targetA and targetB */\n public dotVectorsToTargets(targetA: Point4d, targetB: Point4d): number {\n return (targetA.xyzw[0] - this.xyzw[0]) * (targetB.xyzw[0] - this.xyzw[0]) +\n (targetA.xyzw[1] - this.xyzw[1]) * (targetB.xyzw[1] - this.xyzw[1]) +\n (targetA.xyzw[2] - this.xyzw[2]) * (targetB.xyzw[2] - this.xyzw[2]) +\n (targetA.xyzw[3] - this.xyzw[3]) * (targetB.xyzw[3] - this.xyzw[3]);\n }\n /** return (4d) dot product of the instance and other point. */\n public dotProduct(other: Point4d): number {\n return this.xyzw[0] * other.xyzw[0] + this.xyzw[1] * other.xyzw[1] + this.xyzw[2] * other.xyzw[2] + this.xyzw[3] * other.xyzw[3];\n }\n /** return (4d) dot product of the instance with xyzw */\n public dotProductXYZW(x: number, y: number, z: number, w: number): number {\n return this.xyzw[0] * x + this.xyzw[1] * y + this.xyzw[2] * z + this.xyzw[3] * w;\n }\n /** dotProduct with (point.x, point.y, point.z, 1) Used in PlaneAltitudeEvaluator interface */\n public altitude(point: Point3d): number {\n return this.xyzw[0] * point.x + this.xyzw[1] * point.y + this.xyzw[2] * point.z + this.xyzw[3];\n }\n /** dotProduct with (x, y, z, 1) Used in PlaneAltitudeEvaluator interface */\n public altitudeXYZ(x: number, y: number, z: number): number {\n return this.xyzw[0] * x + this.xyzw[1] * y + this.xyzw[2] * z + this.xyzw[3];\n }\n /** dotProduct with (point.x, point.y, point.z, point.w) Used in PlaneAltitudeEvaluator interface */\n public weightedAltitude(point: Point4d): number {\n return this.xyzw[0] * point.x + this.xyzw[1] * point.y + this.xyzw[2] * point.z + this.xyzw[3] * point.w;\n }\n /** dotProduct with (vector.x, vector.y, vector.z, 0). Used in PlaneAltitudeEvaluator interface */\n public velocity(vector: Vector3d): number {\n return this.xyzw[0] * vector.x + this.xyzw[1] * vector.y + this.xyzw[2] * vector.z;\n }\n /** dotProduct with (x,y,z, 0). Used in PlaneAltitudeEvaluator interface */\n public velocityXYZ(x: number, y: number, z: number): number {\n return this.xyzw[0] * x + this.xyzw[1] * y + this.xyzw[2] * z;\n }\n /**\n * Return the x component of the normal used to evaluate altitude.\n */\n public normalX(): number { return this.x; }\n /**\n * Return the x component of the normal used to evaluate altitude.\n */\n public normalY(): number { return this.y; }\n /**\n * Return the z component of the normal used to evaluate altitude.\n */\n public normalZ(): number { return this.z; }\n\n /** unit X vector */\n public static unitX(): Point4d { return new Point4d(1, 0, 0, 0); }\n /** unit Y vector */\n public static unitY(): Point4d { return new Point4d(0, 1, 0, 0); }\n /** unit Z vector */\n public static unitZ(): Point4d { return new Point4d(0, 0, 1, 0); }\n /** unit W vector */\n public static unitW(): Point4d { return new Point4d(0, 0, 0, 1); }\n /** Divide by denominator, but return undefined if denominator is zero. */\n public safeDivideOrNull(denominator: number, result?: Point4d): Point4d | undefined {\n if (denominator !== 0.0) {\n return this.scale(1.0 / denominator, result);\n }\n return undefined;\n }\n /**\n * * Return xyz projection of spacePoint to the plane (this Point4d is understood as plane coefficients, not point coordinates)\n * * If the xyz part of `this` are all zero, (a clone of) `spacePoint` is returned.\n */\n public projectPointToPlane(spacePoint: Point3d, result?: Point3d): Point3d {\n return this.projectXYZToPlane(spacePoint.x, spacePoint.y, spacePoint.z, result);\n }\n /** Return the projection of (x,y,z) onto the plane. */\n public override projectXYZToPlane(x: number, y: number, z: number, result?: Point3d): Point3d {\n const h = this.altitudeXYZ(x, y, z);\n const nn = this.magnitudeSquaredXYZ();\n // this unusual tol is needed so that toPlane3dByOriginAndUnitNormal agrees with its original implementation\n const alpha = Geometry.conditionalDivideCoordinate(-h, nn, Geometry.largeFractionResult * Geometry.largeFractionResult);\n if (alpha === undefined)\n return Point3d.create(x, y, z, result);\n return Point3d.create(x + alpha * this.x, y + alpha * this.y, z + alpha * this.z, result);\n }\n /** scale all components (including w!!) */\n public scale(scale: number, result?: Point4d): Point4d {\n result = result ? result : new Point4d();\n result.xyzw[0] = this.xyzw[0] * scale;\n result.xyzw[1] = this.xyzw[1] * scale;\n result.xyzw[2] = this.xyzw[2] * scale;\n result.xyzw[3] = this.xyzw[3] * scale;\n return result;\n }\n /** Negate components (including w!!) */\n public negate(result?: Point4d): Point4d {\n result = result ? result : new Point4d();\n result.xyzw[0] = -this.xyzw[0];\n result.xyzw[1] = -this.xyzw[1];\n result.xyzw[2] = -this.xyzw[2];\n result.xyzw[3] = -this.xyzw[3];\n return result;\n }\n /**\n * If `this.w` is nonzero, return a 4d point `(x/w,y/w,z/w, 1)`\n * If `this.w` is zero, return undefined.\n * @param result optional result\n */\n public normalizeWeight(result?: Point4d): Point4d | undefined {\n const mag = Geometry.correctSmallFraction(this.xyzw[3]);\n result = result ? result : new Point4d();\n return this.safeDivideOrNull(mag, result);\n }\n /**\n * If `this.w` is nonzero, return a 3d point `(x/w,y/w,z/w)`\n * If `this.w` is zero, return undefined.\n * @param result optional result\n */\n public realPoint(result?: Point3d): Point3d | undefined {\n const mag = Geometry.correctSmallFraction(this.xyzw[3]);\n if (mag === 0.0)\n return undefined;\n const a = 1.0 / mag; // in zero case everything multiplies right back to true zero.\n return Point3d.create(this.xyzw[0] * a, this.xyzw[1] * a, this.xyzw[2] * a, result);\n }\n\n /** Convert the homogeneous point to a (strongly typed) point or vector.\n * * If `this.w` is nonzero, return a Point3d `(x/w,y/w,z/w)`\n * * If `this.w` is zero, return a Vector3d `(x,y,z)`\n */\n public realPointOrVector(): Point3d | Vector3d {\n const mag = Geometry.correctSmallFraction(this.xyzw[3]);\n if (mag === 0.0)\n return Vector3d.create(this.x, this.y, this.z);\n const a = 1.0 / mag; // in zero case everything multiplies right back to true zero.\n return Point3d.create(this.x * a, this.y * a, this.z * a);\n }\n /**\n * * If w is nonzero, return Point3d with x/w,y/w,z/w.\n * * If w is zero, return 000\n * @param x x coordinate\n * @param y y coordinate\n * @param z z coordinate\n * @param w w coordinate\n * @param result optional result\n */\n public static createRealPoint3dDefault000(x: number, y: number, z: number, w: number, result?: Point3d): Point3d {\n const mag = Geometry.correctSmallFraction(w);\n const a = mag === 0 ? 0.0 : (1.0 / mag); // in zero case everything multiplies right back to true zero.\n return Point3d.create(x * a, y * a, z * a, result);\n }\n /**\n * * If w is nonzero, return Vector3d which is the derivative of the projected xyz with given w and 4d derivatives.\n * * If w is zero, return 000\n * @param x x coordinate\n * @param y y coordinate\n * @param z z coordinate\n * @param w w coordinate\n * @param dx x coordinate of derivative\n * @param dy y coordinate of derivative\n * @param dz z coordinate of derivative\n * @param dw w coordinate of derivative\n * @param result optional result\n */\n public static createRealDerivativeRay3dDefault000(x: number, y: number, z: number, w: number, dx: number, dy: number, dz: number, dw: number, result?: Ray3d): Ray3d {\n const mag = Geometry.correctSmallFraction(w);\n // real point is X/w.\n // real derivative is (X' * w - X *w) / ww, and weight is always 0 by cross products.\n const a = mag === 0 ? 0.0 : (1.0 / mag); // in zero case everything multiplies right back to true zero.\n const aa = a * a;\n return Ray3d.createXYZUVW(x * a, y * a, z * a, (dx * w - dw * x) * aa, (dy * w - dw * y) * aa, (dz * w - dw * z) * aa, result);\n }\n /**\n * * If w is nonzero, return Vector3d which is the derivative of the projected xyz with given w and 4d derivatives.\n * * If w is zero, return 000\n * @param x x coordinate\n * @param y y coordinate\n * @param z z coordinate\n * @param w w coordinate\n * @param dx x coordinate of derivative\n * @param dy y coordinate of derivative\n * @param dz z coordinate of derivative\n * @param dw w coordinate of derivative\n * @param result optional result\n */\n public static createRealDerivativePlane3dByOriginAndVectorsDefault000(x: number, y: number, z: number, w: number, dx: number, dy: number, dz: number, dw: number, ddx: number, ddy: number, ddz: number, ddw: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n const mag = Geometry.correctSmallFraction(w);\n // real point is X/w.\n // real derivative is (X' * w - X *w) / ww, and weight is always 0 by cross products.\n const a = mag === 0 ? 0.0 : (1.0 / mag); // in zero case everything multiplies right back to true zero.\n const aa = a * a;\n const fx = x * a;\n const fy = y * a;\n const fz = z * a;\n const dfx = (dx * w - dw * x) * aa;\n const dfy = (dy * w - dw * y) * aa;\n const dfz = (dz * w - dw * z) * aa;\n return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(fx, fy, fz, dfx, dfy, dfz, quotientDerivative2(ddx, dw, ddw, fx, dfx, a), quotientDerivative2(ddy, dw, ddw, fy, dfy, a), quotientDerivative2(ddz, dw, ddw, fz, dfz, a), result);\n }\n /**\n * * If this.w is nonzero, return Point3d with x/w,y/w,z/w.\n * * If this.w is zero, return 000\n */\n public realPointDefault000(result?: Point3d): Point3d {\n const mag = Geometry.correctSmallFraction(this.xyzw[3]);\n if (mag === 0.0)\n return Point3d.create(0, 0, 0, result);\n result = result ? result : new Point3d();\n const a = 1.0 / mag;\n return Point3d.create(this.xyzw[0] * a, this.xyzw[1] * a, this.xyzw[2] * a, result);\n }\n /** divide all components (x,y,z,w) by the 4d magnitude.\n *\n * * This is appropriate for normalizing a quaternion\n * * Use normalizeWeight to divide by the w component.\n */\n public normalizeXYZW(result?: Point4d): Point4d | undefined {\n const mag = Geometry.correctSmallFraction(this.magnitudeXYZW());\n result = result ? result : new Point4d();\n return this.safeDivideOrNull(mag, result);\n }\n\n /**\n * Return the determinant of the 3x3 matrix using components i,j,k of the 3 inputs.\n */\n public static determinantIndexed3X3(pointA: Point4d, pointB: Point4d, pointC: Point4d, i: number, j: number, k: number) {\n return Geometry.tripleProduct(\n pointA.xyzw[i], pointA.xyzw[j], pointA.xyzw[k],\n pointB.xyzw[i], pointB.xyzw[j], pointB.xyzw[k],\n pointC.xyzw[i], pointC.xyzw[j], pointC.xyzw[k]);\n }\n /**\n * Return a Point4d perpendicular to all 3 inputs. (A higher level cross product concept)\n * @param pointA first point\n * @param pointB second point\n * @param pointC third point\n */\n public static perpendicularPoint4dPlane(pointA: Point4d, pointB: Point4d, pointC: Point4d): Point4d {\n return Point4d.create(\n Point4d.determinantIndexed3X3(pointA, pointB, pointC, 1, 2, 3),\n -Point4d.determinantIndexed3X3(pointA, pointB, pointC, 2, 3, 0),\n Point4d.determinantIndexed3X3(pointA, pointB, pointC, 3, 0, 1),\n -Point4d.determinantIndexed3X3(pointA, pointB, pointC, 0, 1, 2));\n }\n /** Treating this Point4d as plane coefficients, convert to origin and normal form. */\n public toPlane3dByOriginAndUnitNormal(result?: Plane3dByOriginAndUnitNormal): Plane3dByOriginAndUnitNormal | undefined {\n return Plane3dByOriginAndUnitNormal.createFrom(this, result);\n }\n /** Normalize so sum of squares of all 4 coordinates is 1. */\n public normalizeQuaternion() {\n const magnitude = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n\n if (magnitude > 0.0) {\n const f = 1.0 / magnitude;\n this.x *= f;\n this.y *= f;\n this.z *= f;\n this.w *= f;\n }\n return magnitude;\n }\n /** Return a (normalized) quaternion interpolated between two quaternions. */\n public static interpolateQuaternions(quaternion0: Point4d, fractionParameter: number, quaternion1: Point4d, result?: Point4d): Point4d {\n if (!result)\n result = new Point4d();\n const maxSafeCosine = 0.9995;\n\n // return exact quaternions for special values\n if (0.0 === fractionParameter) {\n result = quaternion0;\n return result;\n }\n if (1.0 === fractionParameter) {\n result = quaternion1;\n return result;\n }\n if (0.5 === fractionParameter) {\n quaternion0.plus(quaternion1, result);\n result.normalizeQuaternion();\n return result;\n }\n\n const q0 = quaternion0.clone();\n const q1 = quaternion1.clone();\n let dot = quaternion0.dotProduct(quaternion1);\n\n // prevent interpolation through the longer great arc\n if (dot < 0.0) {\n q1.negate(q1);\n dot = -dot;\n }\n\n // if nearly parallel, use interpolate and renormalize .\n if (dot > maxSafeCosine) {\n q0.interpolate(fractionParameter, q1, result);\n result.normalizeQuaternion();\n return result;\n }\n\n // safety check\n if (dot < -1.0)\n dot = -1.0;\n else if (dot > 1.0)\n dot = 1.0;\n\n // create orthonormal basis {q0, q2}\n const q2 = new Point4d();\n q1.plusScaled(q0, -dot, q2); // bsiDPoint4d_addScaledDPoint4d(& q2, & q1, & q0, -dot);\n q2.normalizeQuaternion();\n\n const angle = Math.acos(dot);\n const angleOfInterpolation = angle * fractionParameter;\n result = Point4d.createAdd2Scaled(q0, Math.cos(angleOfInterpolation), q2, Math.sin(angleOfInterpolation));\n return result;\n }\n /** Measure the \"angle\" between two points, using all 4 components in the dot product that\n * gives the cosine of the angle.\n */\n public radiansToPoint4dXYZW(other: Point4d): number | undefined {\n const magA = this.magnitudeXYZW();\n const magB = other.magnitudeXYZW();\n const dot = this.dotProduct(other); // == cos (theta) * magA * magB\n const cos = Geometry.conditionalDivideFraction(dot, magA * magB);\n if (cos === undefined)\n return undefined;\n return Math.acos(cos);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Point4d.js","sourceRoot":"","sources":["../../../src/geometry4d/Point4d.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,0CAAgF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AAS;YACnB,OAAO,SAAS,CAAC;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;CACF;AAplBD,0BAolBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Numerics\n */\nimport { BeJSONFunctions, Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { Plane3d } from \"../geometry3d/Plane3d\";\nimport { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { XAndY, XYAndZ } from \"../geometry3d/XYZProps\";\n\n/**\n * 4d point packed in an array of 4 numbers.\n * @public\n */\nexport type Point4dProps = number[];\n/**\n *\n * @param ddg numerator second derivative\n * @param dh denominator derivative\n * @param ddh denominator second derivative\n * @param f primary function (g/h)\n * @param df derivative of (g/h)\n * @param divH = (1/h)\n * @internal\n */\nfunction quotientDerivative2(ddg: number, dh: number, ddh: number,\n f: number, df: number, divH: number): number {\n return divH * (ddg - 2.0 * df * dh - f * ddh);\n}\n\n/** 4 Dimensional point (x,y,z,w) used in perspective calculations.\n * * the coordinates are stored in a Float64Array of length 4.\n * * properties `x`, `y`, `z`, `w` access array members.\n * *\n * * The coordinates are physically stored as a single Float64Array with 4 entries. (w last)\n * *\n * @public\n */\nexport class Point4d extends Plane3d implements BeJSONFunctions {\n /** x,y,z,w are packed into a Float64Array */\n public xyzw: Float64Array;\n /** Set x,y,z,w of this point. */\n public set(x: number = 0, y: number = 0, z: number = 0, w: number = 0): Point4d {\n this.xyzw[0] = x;\n this.xyzw[1] = y;\n this.xyzw[2] = z;\n this.xyzw[3] = w;\n return this;\n }\n /** Set a component by index.\n * * No change if index is out of range.\n */\n public setComponent(index: number, value: number) {\n if (index >= 0 && index < 4) {\n this.xyzw[index] = value;\n }\n }\n /** The x component. */\n public get x() { return this.xyzw[0]; }\n public set x(val: number) { this.xyzw[0] = val; }\n /** The y component. */\n public get y() { return this.xyzw[1]; }\n public set y(val: number) { this.xyzw[1] = val; }\n /** The z component. */\n public get z() { return this.xyzw[2]; }\n public set z(val: number) { this.xyzw[2] = val; }\n /** The w component of this point. */\n public get w() { return this.xyzw[3]; }\n public set w(val: number) { this.xyzw[3] = val; }\n /** Construct from coordinates. */\n protected constructor(x: number = 0, y: number = 0, z: number = 0, w: number = 0) {\n super();\n this.xyzw = new Float64Array(4);\n this.xyzw[0] = x;\n this.xyzw[1] = y;\n this.xyzw[2] = z;\n this.xyzw[3] = w;\n }\n /** Return a Point4d with specified x,y,z,w */\n public static create(x: number = 0, y: number = 0, z: number = 0, w: number = 0, result?: Point4d): Point4d {\n return result ? result.set(x, y, z, w) : new Point4d(x, y, z, w);\n }\n /**\n * Create a \"Point4d as a plane\" from \"any\" other [[PlaneAltitudeEvaluator]] type.\n * @param source\n * @returns\n */\n public static createPlaneFrom(source: PlaneAltitudeEvaluator): Point4d | undefined {\n return new Point4d(source.normalX(), source.normalY(), source.normalZ(), source.altitudeXYZ(0, 0, 0));\n }\n /** Copy coordinates from `other`. */\n public setFrom(other: Point4d): Point4d {\n this.xyzw[0] = other.xyzw[0];\n this.xyzw[1] = other.xyzw[1];\n this.xyzw[2] = other.xyzw[2];\n this.xyzw[3] = other.xyzw[3];\n return this;\n }\n /** Clone this point */\n public clone(result?: Point4d): Point4d {\n return result ? result.setFrom(this) : new Point4d(this.xyzw[0], this.xyzw[1], this.xyzw[2], this.xyzw[3]);\n }\n /** Set this point's xyzw from a json array `[x,y,z,w]` */\n public setFromJSON(json?: Point4dProps) {\n if (Geometry.isNumberArray(json, 4))\n this.set(json[0], json[1], json[2], json[3]);\n else\n this.set(0, 0, 0, 0);\n }\n\n /** Create a new point with coordinates from a json array `[x,y,z,w]` */\n public static fromJSON(json?: Point4dProps): Point4d {\n const result = new Point4d();\n result.setFromJSON(json);\n return result;\n }\n /** Near-equality test, using `Geometry.isSameCoordinate` on all 4 x,y,z,w */\n public isAlmostEqual(other: Point4d, tolerance: number = Geometry.smallMetricDistance): boolean {\n return Geometry.isSameCoordinate(this.x, other.x, tolerance)\n && Geometry.isSameCoordinate(this.y, other.y, tolerance)\n && Geometry.isSameCoordinate(this.z, other.z, tolerance)\n && Geometry.isSameCoordinate(this.w, other.w, tolerance);\n }\n /**\n * Test for same coordinate by direct x,y,z,w args\n * @param x x to test\n * @param y y to test\n * @param z z to test\n * @param w w to test\n */\n public isAlmostEqualXYZW(x: number, y: number, z: number, w: number, tolerance: number = Geometry.smallMetricDistance): boolean {\n return Geometry.isSameCoordinate(this.x, x, tolerance)\n && Geometry.isSameCoordinate(this.y, y, tolerance)\n && Geometry.isSameCoordinate(this.z, z, tolerance)\n && Geometry.isSameCoordinate(this.w, w, tolerance);\n }\n\n /**\n * Convert an Angle to a JSON object.\n * @return {*} [x,y,z,w]\n */\n public toJSON(): Point4dProps {\n return [this.xyzw[0], this.xyzw[1], this.xyzw[2], this.xyzw[3]];\n }\n /** Return the 4d distance from this point to other, with all 4 components squared into the hypotenuse.\n * * x,y,z,w all participate without normalization.\n */\n public distanceXYZW(other: Point4d): number {\n return Geometry.hypotenuseXYZW(other.xyzw[0] - this.xyzw[0], other.xyzw[1] - this.xyzw[1], other.xyzw[2] - this.xyzw[2], other.xyzw[3] - this.xyzw[3]);\n }\n /** Return the squared 4d distance from this point to other, with all 4 components squared into the hypotenuse.\n * * x,y,z,w all participate without normalization.\n */\n public distanceSquaredXYZW(other: Point4d): number {\n return Geometry.hypotenuseSquaredXYZW(other.xyzw[0] - this.xyzw[0], other.xyzw[1] - this.xyzw[1], other.xyzw[2] - this.xyzw[2], other.xyzw[3] - this.xyzw[3]);\n }\n /** Return the xy distance between the instance and `other` after normalizing by weights */\n public realDistanceXY(other: Point4d): number | undefined {\n const wA = this.w;\n const wB = other.w;\n if (Geometry.isSmallMetricDistance(wA) || Geometry.isSmallMetricDistance(wB))\n return undefined;\n return Geometry.hypotenuseXY(other.xyzw[0] / wB - this.xyzw[0] / wA, other.xyzw[1] / wB - this.xyzw[1] / wA);\n }\n /** Return the xy squared distance between the instance and `other` after normalizing by weights */\n public realDistanceSquaredXY(other: Point4d): number | undefined {\n const wA = this.w;\n const wB = other.w;\n if (Geometry.isSmallMetricDistance(wA) || Geometry.isSmallMetricDistance(wB))\n return undefined;\n return Geometry.hypotenuseSquaredXY(other.xyzw[0] / wB - this.xyzw[0] / wA, other.xyzw[1] / wB - this.xyzw[1] / wA);\n }\n /** Return the largest absolute distance between corresponding components\n * * x,y,z,w all participate without normalization.\n */\n public maxDiff(other: Point4d): number {\n return Math.max(Math.abs(other.xyzw[0] - this.xyzw[0]), Math.abs(other.xyzw[1] - this.xyzw[1]), Math.abs(other.xyzw[2] - this.xyzw[2]), Math.abs(other.xyzw[3] - this.xyzw[3]));\n }\n /** Return the largest absolute entry of all 4 components x,y,z,w */\n public maxAbs(): number {\n return Math.max(Math.abs(this.xyzw[0]), Math.abs(this.xyzw[1]), Math.abs(this.xyzw[2]), Math.abs(this.xyzw[3]));\n }\n /** Returns the magnitude including all 4 components x,y,z,w */\n public magnitudeXYZW(): number {\n return Geometry.hypotenuseXYZW(this.xyzw[0], this.xyzw[1], this.xyzw[2], this.xyzw[3]);\n }\n /** Returns the magnitude of the leading xyz components. w is ignored. (i.e. the leading xyz are NOT divided by w.) */\n public magnitudeSquaredXYZ(): number {\n return Geometry.hypotenuseSquaredXYZ(this.xyzw[0], this.xyzw[1], this.xyzw[2]);\n }\n\n /** Return the difference (this-other) using all 4 components x,y,z,w */\n public minus(other: Point4d, result?: Point4d): Point4d {\n return Point4d.create(this.xyzw[0] - other.xyzw[0], this.xyzw[1] - other.xyzw[1], this.xyzw[2] - other.xyzw[2], this.xyzw[3] - other.xyzw[3], result);\n }\n /** Return `((other.w * this) - (this.w * other))` */\n public crossWeightedMinus(other: Point4d, result?: Vector3d): Vector3d {\n const wa = this.xyzw[3];\n const wb = other.xyzw[3];\n return Vector3d.create(wb * this.xyzw[0] - wa * other.xyzw[0], wb * this.xyzw[1] - wa * other.xyzw[1], wb * this.xyzw[2] - wa * other.xyzw[2], result);\n }\n /** Return `((other.w * this) - (this.w * other))`, with other.w known to be 1 */\n public crossWeightedMinusPoint3d(other: Point3d, result?: Vector3d): Vector3d {\n const wa = this.xyzw[3];\n return Vector3d.create(this.xyzw[0] - wa * other.x, this.xyzw[1] - wa * other.y, this.xyzw[2] - wa * other.z, result);\n }\n /** Return the sum of this and other, using all 4 components x,y,z,w */\n public plus(other: Point4d, result?: Point4d): Point4d {\n return Point4d.create(this.xyzw[0] + other.xyzw[0], this.xyzw[1] + other.xyzw[1], this.xyzw[2] + other.xyzw[2], this.xyzw[3] + other.xyzw[3], result);\n }\n /** Test if all components are nearly zero. */\n public get isAlmostZero(): boolean {\n return Geometry.isSmallMetricDistance(this.maxAbs());\n }\n /** Create a point with zero in all coordinates. */\n public static createZero(): Point4d { return new Point4d(0, 0, 0, 0); }\n /**\n * Create plane coefficients for the plane containing pointA, pointB, and 0010.\n * @param pointA first point\n * @param pointB second point\n */\n public static createPlanePointPointZ(pointA: Point4d, pointB: Point4d, result?: Point4d) {\n return Point4d.create(pointA.y * pointB.w - pointA.w * pointB.y, pointA.w * pointB.x - pointA.x * pointB.w, 0.0, pointA.x * pointB.y - pointA.y * pointB.x, result);\n }\n /**\n * extract 3 consecutive numbers from a Float64Array into the xyz values of a Point4d with w = 1.\n * @param data buffer of numbers\n * @param xIndex first index for x,y,z sequence\n */\n public static createFromPackedXYZ(data: Float64Array, xIndex: number = 0, result?: Point4d): Point4d | undefined {\n if (xIndex >= 0 && xIndex + 2 < data.length)\n return Point4d.create(data[xIndex], data[xIndex + 1], data[xIndex + 2], 1.0, result);\n return undefined;\n }\n /**\n * extract 4 consecutive numbers from a Float64Array into a Point4d.\n * @param data buffer of numbers\n * @param xIndex first index for x,y,z,w sequence\n */\n public static createFromPacked(data: Float64Array, xIndex: number = 0, result?: Point4d): Point4d | undefined {\n if (xIndex >= 0 && xIndex + 3 < data.length)\n return Point4d.create(data[xIndex], data[xIndex + 1], data[xIndex + 2], data[xIndex + 3], result);\n return undefined;\n }\n /**\n * extract 4 consecutive numbers from a Float64Array into a Point4d.\n * @param data buffer of numbers\n * @param xIndex first index for x,y,z,w sequence. Assumed to be a valid index!\n * @deprecated in 4.x. Use createFromPacked instead.\n */\n public static createFromPackedXYZW(data: Float64Array, xIndex: number = 0, result?: Point4d): Point4d {\n return Point4d.create(data[xIndex], data[xIndex + 1], data[xIndex + 2], data[xIndex + 3], result);\n }\n /** Create a `Point4d` with x,y,z from an `XYAndZ` input, and w from a separate number. */\n public static createFromPointAndWeight(xyz: XYAndZ, w: number): Point4d {\n return new Point4d(xyz.x, xyz.y, xyz.z, w);\n }\n /** Create a `Point4d` from\n * * Point2d, Point3d, or Point4d\n * * other structure with members x,y and optional z,w\n * * array of numbers\n * * default z is 0.0\n * * default w is 1.0 (array[3] can replace)\n */\n public static createFromPoint(point: XAndY | XYAndZ | Point4d | number[]): Point4d {\n if (point instanceof Point2d)\n return new Point4d(point.x, point.y, 0, 1);\n if (point instanceof Point3d)\n return new Point4d(point.x, point.y, point.z, 1);\n if (point instanceof Point4d)\n return point.clone();\n // hm ... some flavor of x,y,z subset ...\n if (Array.isArray(point)) {\n const x1 = point.length > 0 ? point[0] : 0.0;\n const y1 = point.length > 1 ? point[1] : 0.0;\n const z1 = point.length > 2 ? point[2] : 0.0;\n const w1 = point.length > 3 ? point[3] : 1.0;\n return new Point4d(x1, y1, z1, w1);\n }\n const x = point.x;\n const y = point.y;\n const z = point.hasOwnProperty(\"z\") ? (point as any).z : 0.0;\n const w = point.hasOwnProperty(\"w\") ? (point as any).w : 1.0;\n return new Point4d(x, y, z, w);\n\n }\n /** Return `point + vector * scalar` */\n public plusScaled(vector: Point4d, scaleFactor: number, result?: Point4d): Point4d {\n return Point4d.create(this.xyzw[0] + vector.xyzw[0] * scaleFactor, this.xyzw[1] + vector.xyzw[1] * scaleFactor, this.xyzw[2] + vector.xyzw[2] * scaleFactor, this.xyzw[3] + vector.xyzw[3] * scaleFactor, result);\n }\n /** Return interpolation between instance and pointB at fraction\n */\n public interpolate(fraction: number, pointB: Point4d, result?: Point4d): Point4d {\n const v = 1.0 - fraction;\n return Point4d.create(this.xyzw[0] * v + pointB.xyzw[0] * fraction, this.xyzw[1] * v + pointB.xyzw[1] * fraction, this.xyzw[2] * v + pointB.xyzw[2] * fraction, this.xyzw[3] * v + pointB.xyzw[3] * fraction, result);\n }\n /** Return `point + vectorA * scalarA + vectorB * scalarB` */\n public plus2Scaled(vectorA: Point4d, scalarA: number, vectorB: Point4d, scalarB: number, result?: Point4d): Point4d {\n return Point4d.create(this.xyzw[0] + vectorA.xyzw[0] * scalarA + vectorB.xyzw[0] * scalarB, this.xyzw[1] + vectorA.xyzw[1] * scalarA + vectorB.xyzw[1] * scalarB, this.xyzw[2] + vectorA.xyzw[2] * scalarA + vectorB.xyzw[2] * scalarB, this.xyzw[3] + vectorA.xyzw[3] * scalarA + vectorB.xyzw[3] * scalarB, result);\n }\n /** Return `point + vectorA * scalarA + vectorB * scalarB + vectorC * scalarC` */\n public plus3Scaled(vectorA: Point4d, scalarA: number, vectorB: Point4d, scalarB: number, vectorC: Point4d, scalarC: number, result?: Point4d): Point4d {\n return Point4d.create(this.xyzw[0] + vectorA.xyzw[0] * scalarA + vectorB.xyzw[0] * scalarB + vectorC.xyzw[0] * scalarC, this.xyzw[1] + vectorA.xyzw[1] * scalarA + vectorB.xyzw[1] * scalarB + vectorC.xyzw[1] * scalarC, this.xyzw[2] + vectorA.xyzw[2] * scalarA + vectorB.xyzw[2] * scalarB + vectorC.xyzw[2] * scalarC, this.xyzw[3] + vectorA.xyzw[3] * scalarA + vectorB.xyzw[3] * scalarB + vectorC.xyzw[3] * scalarC, result);\n }\n /** Return `point + vectorA * scalarA + vectorB * scalarB` */\n public static createAdd2Scaled(vectorA: Point4d, scalarA: number, vectorB: Point4d, scalarB: number, result?: Point4d): Point4d {\n return Point4d.create(vectorA.xyzw[0] * scalarA + vectorB.xyzw[0] * scalarB, vectorA.xyzw[1] * scalarA + vectorB.xyzw[1] * scalarB, vectorA.xyzw[2] * scalarA + vectorB.xyzw[2] * scalarB, vectorA.xyzw[3] * scalarA + vectorB.xyzw[3] * scalarB, result);\n }\n /** Return `point + vectorA \\ scalarA + vectorB * scalarB + vectorC * scalarC` */\n public static createAdd3Scaled(vectorA: Point4d, scalarA: number, vectorB: Point4d, scalarB: number, vectorC: Point4d, scalarC: number, result?: Point4d): Point4d {\n return Point4d.create(vectorA.xyzw[0] * scalarA + vectorB.xyzw[0] * scalarB + vectorC.xyzw[0] * scalarC, vectorA.xyzw[1] * scalarA + vectorB.xyzw[1] * scalarB + vectorC.xyzw[1] * scalarC, vectorA.xyzw[2] * scalarA + vectorB.xyzw[2] * scalarB + vectorC.xyzw[2] * scalarC, vectorA.xyzw[3] * scalarA + vectorB.xyzw[3] * scalarB + vectorC.xyzw[3] * scalarC, result);\n }\n /** Return dot product of (4d) vectors from the instance to targetA and targetB */\n public dotVectorsToTargets(targetA: Point4d, targetB: Point4d): number {\n return (targetA.xyzw[0] - this.xyzw[0]) * (targetB.xyzw[0] - this.xyzw[0]) +\n (targetA.xyzw[1] - this.xyzw[1]) * (targetB.xyzw[1] - this.xyzw[1]) +\n (targetA.xyzw[2] - this.xyzw[2]) * (targetB.xyzw[2] - this.xyzw[2]) +\n (targetA.xyzw[3] - this.xyzw[3]) * (targetB.xyzw[3] - this.xyzw[3]);\n }\n /** return (4d) dot product of the instance and other point. */\n public dotProduct(other: Point4d): number {\n return this.xyzw[0] * other.xyzw[0] + this.xyzw[1] * other.xyzw[1] + this.xyzw[2] * other.xyzw[2] + this.xyzw[3] * other.xyzw[3];\n }\n /** return (4d) dot product of the instance with xyzw */\n public dotProductXYZW(x: number, y: number, z: number, w: number): number {\n return this.xyzw[0] * x + this.xyzw[1] * y + this.xyzw[2] * z + this.xyzw[3] * w;\n }\n /** dotProduct with (point.x, point.y, point.z, 1) Used in PlaneAltitudeEvaluator interface */\n public altitude(point: Point3d): number {\n return this.xyzw[0] * point.x + this.xyzw[1] * point.y + this.xyzw[2] * point.z + this.xyzw[3];\n }\n /** dotProduct with (x, y, z, 1) Used in PlaneAltitudeEvaluator interface */\n public altitudeXYZ(x: number, y: number, z: number): number {\n return this.xyzw[0] * x + this.xyzw[1] * y + this.xyzw[2] * z + this.xyzw[3];\n }\n /** dotProduct with (point.x, point.y, point.z, point.w) Used in PlaneAltitudeEvaluator interface */\n public weightedAltitude(point: Point4d): number {\n return this.xyzw[0] * point.x + this.xyzw[1] * point.y + this.xyzw[2] * point.z + this.xyzw[3] * point.w;\n }\n /** dotProduct with (vector.x, vector.y, vector.z, 0). Used in PlaneAltitudeEvaluator interface */\n public velocity(vector: Vector3d): number {\n return this.xyzw[0] * vector.x + this.xyzw[1] * vector.y + this.xyzw[2] * vector.z;\n }\n /** dotProduct with (x,y,z, 0). Used in PlaneAltitudeEvaluator interface */\n public velocityXYZ(x: number, y: number, z: number): number {\n return this.xyzw[0] * x + this.xyzw[1] * y + this.xyzw[2] * z;\n }\n /**\n * Return the x component of the normal used to evaluate altitude.\n */\n public normalX(): number { return this.x; }\n /**\n * Return the x component of the normal used to evaluate altitude.\n */\n public normalY(): number { return this.y; }\n /**\n * Return the z component of the normal used to evaluate altitude.\n */\n public normalZ(): number { return this.z; }\n\n /** unit X vector */\n public static unitX(): Point4d { return new Point4d(1, 0, 0, 0); }\n /** unit Y vector */\n public static unitY(): Point4d { return new Point4d(0, 1, 0, 0); }\n /** unit Z vector */\n public static unitZ(): Point4d { return new Point4d(0, 0, 1, 0); }\n /** unit W vector */\n public static unitW(): Point4d { return new Point4d(0, 0, 0, 1); }\n /** Divide by denominator, but return undefined if denominator is zero. */\n public safeDivideOrNull(denominator: number, result?: Point4d): Point4d | undefined {\n if (denominator !== 0.0) {\n return this.scale(1.0 / denominator, result);\n }\n return undefined;\n }\n /**\n * * Return xyz projection of spacePoint to the plane (this Point4d is understood as plane coefficients, not point coordinates)\n * * If the xyz part of `this` are all zero, (a clone of) `spacePoint` is returned.\n */\n public projectPointToPlane(spacePoint: Point3d, result?: Point3d): Point3d {\n return this.projectXYZToPlane(spacePoint.x, spacePoint.y, spacePoint.z, result);\n }\n /** Return the projection of (x,y,z) onto the plane. */\n public override projectXYZToPlane(x: number, y: number, z: number, result?: Point3d): Point3d {\n const h = this.altitudeXYZ(x, y, z);\n const nn = this.magnitudeSquaredXYZ();\n // this unusual tol is needed so that toPlane3dByOriginAndUnitNormal agrees with its original implementation\n const alpha = Geometry.conditionalDivideCoordinate(-h, nn, Geometry.largeFractionResult * Geometry.largeFractionResult);\n if (alpha === undefined)\n return Point3d.create(x, y, z, result);\n return Point3d.create(x + alpha * this.x, y + alpha * this.y, z + alpha * this.z, result);\n }\n /** scale all components (including w!!) */\n public scale(scale: number, result?: Point4d): Point4d {\n result = result ? result : new Point4d();\n result.xyzw[0] = this.xyzw[0] * scale;\n result.xyzw[1] = this.xyzw[1] * scale;\n result.xyzw[2] = this.xyzw[2] * scale;\n result.xyzw[3] = this.xyzw[3] * scale;\n return result;\n }\n /** Negate components (including w!!) */\n public negate(result?: Point4d): Point4d {\n result = result ? result : new Point4d();\n result.xyzw[0] = -this.xyzw[0];\n result.xyzw[1] = -this.xyzw[1];\n result.xyzw[2] = -this.xyzw[2];\n result.xyzw[3] = -this.xyzw[3];\n return result;\n }\n /**\n * If `this.w` is nonzero, return a 4d point `(x/w,y/w,z/w, 1)`\n * If `this.w` is zero, return undefined.\n * @param result optional result\n */\n public normalizeWeight(result?: Point4d): Point4d | undefined {\n const mag = Geometry.correctSmallFraction(this.xyzw[3]);\n result = result ? result : new Point4d();\n return this.safeDivideOrNull(mag, result);\n }\n /**\n * If `this.w` is nonzero, return a 3d point `(x/w,y/w,z/w)`\n * If `this.w` is zero, return undefined.\n * @param result optional result\n */\n public realPoint(result?: Point3d): Point3d | undefined {\n const mag = Geometry.correctSmallFraction(this.xyzw[3]);\n if (mag === 0.0)\n return undefined;\n const a = 1.0 / mag; // in zero case everything multiplies right back to true zero.\n return Point3d.create(this.xyzw[0] * a, this.xyzw[1] * a, this.xyzw[2] * a, result);\n }\n\n /** Convert the homogeneous point to a (strongly typed) point or vector.\n * * If `this.w` is nonzero, return a Point3d `(x/w,y/w,z/w)`\n * * If `this.w` is zero, return a Vector3d `(x,y,z)`\n */\n public realPointOrVector(): Point3d | Vector3d {\n const mag = Geometry.correctSmallFraction(this.xyzw[3]);\n if (mag === 0.0)\n return Vector3d.create(this.x, this.y, this.z);\n const a = 1.0 / mag; // in zero case everything multiplies right back to true zero.\n return Point3d.create(this.x * a, this.y * a, this.z * a);\n }\n /**\n * * If w is nonzero, return Point3d with x/w,y/w,z/w.\n * * If w is zero, return 000\n * @param x x coordinate\n * @param y y coordinate\n * @param z z coordinate\n * @param w w coordinate\n * @param result optional result\n */\n public static createRealPoint3dDefault000(x: number, y: number, z: number, w: number, result?: Point3d): Point3d {\n const mag = Geometry.correctSmallFraction(w);\n const a = mag === 0 ? 0.0 : (1.0 / mag); // in zero case everything multiplies right back to true zero.\n return Point3d.create(x * a, y * a, z * a, result);\n }\n /**\n * * If w is nonzero, return Vector3d which is the derivative of the projected xyz with given w and 4d derivatives.\n * * If w is zero, return 000\n * @param x x coordinate\n * @param y y coordinate\n * @param z z coordinate\n * @param w w coordinate\n * @param dx x coordinate of derivative\n * @param dy y coordinate of derivative\n * @param dz z coordinate of derivative\n * @param dw w coordinate of derivative\n * @param result optional result\n */\n public static createRealDerivativeRay3dDefault000(x: number, y: number, z: number, w: number, dx: number, dy: number, dz: number, dw: number, result?: Ray3d): Ray3d {\n const mag = Geometry.correctSmallFraction(w);\n // real point is X/w.\n // real derivative is (X' * w - X *w) / ww, and weight is always 0 by cross products.\n const a = mag === 0 ? 0.0 : (1.0 / mag); // in zero case everything multiplies right back to true zero.\n const aa = a * a;\n return Ray3d.createXYZUVW(x * a, y * a, z * a, (dx * w - dw * x) * aa, (dy * w - dw * y) * aa, (dz * w - dw * z) * aa, result);\n }\n /**\n * * If w is nonzero, return Vector3d which is the derivative of the projected xyz with given w and 4d derivatives.\n * * If w is zero, return 000\n * @param x x coordinate\n * @param y y coordinate\n * @param z z coordinate\n * @param w w coordinate\n * @param dx x coordinate of derivative\n * @param dy y coordinate of derivative\n * @param dz z coordinate of derivative\n * @param dw w coordinate of derivative\n * @param result optional result\n */\n public static createRealDerivativePlane3dByOriginAndVectorsDefault000(x: number, y: number, z: number, w: number, dx: number, dy: number, dz: number, dw: number, ddx: number, ddy: number, ddz: number, ddw: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n const mag = Geometry.correctSmallFraction(w);\n // real point is X/w.\n // real derivative is (X' * w - X *w) / ww, and weight is always 0 by cross products.\n const a = mag === 0 ? 0.0 : (1.0 / mag); // in zero case everything multiplies right back to true zero.\n const aa = a * a;\n const fx = x * a;\n const fy = y * a;\n const fz = z * a;\n const dfx = (dx * w - dw * x) * aa;\n const dfy = (dy * w - dw * y) * aa;\n const dfz = (dz * w - dw * z) * aa;\n return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(fx, fy, fz, dfx, dfy, dfz, quotientDerivative2(ddx, dw, ddw, fx, dfx, a), quotientDerivative2(ddy, dw, ddw, fy, dfy, a), quotientDerivative2(ddz, dw, ddw, fz, dfz, a), result);\n }\n /**\n * * If this.w is nonzero, return Point3d with x/w,y/w,z/w.\n * * If this.w is zero, return 000\n */\n public realPointDefault000(result?: Point3d): Point3d {\n const mag = Geometry.correctSmallFraction(this.xyzw[3]);\n if (mag === 0.0)\n return Point3d.create(0, 0, 0, result);\n result = result ? result : new Point3d();\n const a = 1.0 / mag;\n return Point3d.create(this.xyzw[0] * a, this.xyzw[1] * a, this.xyzw[2] * a, result);\n }\n /** divide all components (x,y,z,w) by the 4d magnitude.\n *\n * * This is appropriate for normalizing a quaternion\n * * Use normalizeWeight to divide by the w component.\n */\n public normalizeXYZW(result?: Point4d): Point4d | undefined {\n const mag = Geometry.correctSmallFraction(this.magnitudeXYZW());\n result = result ? result : new Point4d();\n return this.safeDivideOrNull(mag, result);\n }\n\n /**\n * Return the determinant of the 3x3 matrix using components i,j,k of the 3 inputs.\n */\n public static determinantIndexed3X3(pointA: Point4d, pointB: Point4d, pointC: Point4d, i: number, j: number, k: number) {\n return Geometry.tripleProduct(\n pointA.xyzw[i], pointA.xyzw[j], pointA.xyzw[k],\n pointB.xyzw[i], pointB.xyzw[j], pointB.xyzw[k],\n pointC.xyzw[i], pointC.xyzw[j], pointC.xyzw[k]);\n }\n /**\n * Return a Point4d perpendicular to all 3 inputs. (A higher level cross product concept)\n * @param pointA first point\n * @param pointB second point\n * @param pointC third point\n */\n public static perpendicularPoint4dPlane(pointA: Point4d, pointB: Point4d, pointC: Point4d): Point4d {\n return Point4d.create(\n Point4d.determinantIndexed3X3(pointA, pointB, pointC, 1, 2, 3),\n -Point4d.determinantIndexed3X3(pointA, pointB, pointC, 2, 3, 0),\n Point4d.determinantIndexed3X3(pointA, pointB, pointC, 3, 0, 1),\n -Point4d.determinantIndexed3X3(pointA, pointB, pointC, 0, 1, 2));\n }\n /** Treating this Point4d as plane coefficients, convert to origin and normal form. */\n public toPlane3dByOriginAndUnitNormal(result?: Plane3dByOriginAndUnitNormal): Plane3dByOriginAndUnitNormal | undefined {\n return Plane3dByOriginAndUnitNormal.createFrom(this, result);\n }\n /** Normalize so sum of squares of all 4 coordinates is 1. */\n public normalizeQuaternion() {\n const magnitude = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n\n if (magnitude > 0.0) {\n const f = 1.0 / magnitude;\n this.x *= f;\n this.y *= f;\n this.z *= f;\n this.w *= f;\n }\n return magnitude;\n }\n /** Return a (normalized) quaternion interpolated between two quaternions. */\n public static interpolateQuaternions(quaternion0: Point4d, fractionParameter: number, quaternion1: Point4d, result?: Point4d): Point4d {\n if (!result)\n result = new Point4d();\n const maxSafeCosine = 0.9995;\n\n // return exact quaternions for special values\n if (0.0 === fractionParameter) {\n result = quaternion0;\n return result;\n }\n if (1.0 === fractionParameter) {\n result = quaternion1;\n return result;\n }\n if (0.5 === fractionParameter) {\n quaternion0.plus(quaternion1, result);\n result.normalizeQuaternion();\n return result;\n }\n\n const q0 = quaternion0.clone();\n const q1 = quaternion1.clone();\n let dot = quaternion0.dotProduct(quaternion1);\n\n // prevent interpolation through the longer great arc\n if (dot < 0.0) {\n q1.negate(q1);\n dot = -dot;\n }\n\n // if nearly parallel, use interpolate and renormalize .\n if (dot > maxSafeCosine) {\n q0.interpolate(fractionParameter, q1, result);\n result.normalizeQuaternion();\n return result;\n }\n\n // safety check\n if (dot < -1.0)\n dot = -1.0;\n else if (dot > 1.0)\n dot = 1.0;\n\n // create orthonormal basis {q0, q2}\n const q2 = new Point4d();\n q1.plusScaled(q0, -dot, q2); // bsiDPoint4d_addScaledDPoint4d(& q2, & q1, & q0, -dot);\n q2.normalizeQuaternion();\n\n const angle = Math.acos(dot);\n const angleOfInterpolation = angle * fractionParameter;\n result = Point4d.createAdd2Scaled(q0, Math.cos(angleOfInterpolation), q2, Math.sin(angleOfInterpolation));\n return result;\n }\n /** Measure the \"angle\" between two points, using all 4 components in the dot product that\n * gives the cosine of the angle.\n */\n public radiansToPoint4dXYZW(other: Point4d): number | undefined {\n const magA = this.magnitudeXYZW();\n const magB = other.magnitudeXYZW();\n const dot = this.dotProduct(other); // == cos (theta) * magA * magB\n const cos = Geometry.conditionalDivideFraction(dot, magA * magB);\n if (cos === undefined)\n return undefined;\n return Math.acos(cos);\n }\n}\n"]}
|
|
@@ -204,7 +204,7 @@ exports.IndexedPolyfaceVisitor = IndexedPolyfaceVisitor;
|
|
|
204
204
|
*/
|
|
205
205
|
class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {
|
|
206
206
|
_facetIndices;
|
|
207
|
-
_currentSubsetIndex; // index within _facetIndices
|
|
207
|
+
_currentSubsetIndex; // index within _facetIndices
|
|
208
208
|
_nextSubsetIndex; // index within _facetIndices
|
|
209
209
|
constructor(polyface, facetIndices, numWrap) {
|
|
210
210
|
super(polyface, numWrap);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedPolyfaceVisitor.js","sourceRoot":"","sources":["../../../src/polyface/IndexedPolyfaceVisitor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,0CAAuC;AACvC,+CAA4C;AAE5C,mEAAyD;AACzD,yDAAsD;AACtD,yCAA8D;AAC9D,iDAA8C;AAE9C;;;;GAIG;AACH,MAAa,sBAAuB,SAAQ,2BAAY;IAC9C,kBAAkB,CAAS;IAC3B,eAAe,CAAS;IACxB,QAAQ,CAAS;IACjB,SAAS,CAAS;IAClB,SAAS,CAAkB;IACnC,sEAAsE;IACtE,YAAsB,QAAyB,EAAE,OAAe;QAC9D,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACpH,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO;YACvB,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC1D,IAAI,QAAQ,CAAC,IAAI,CAAC,aAAa;YAC7B,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,C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a,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5F,CAAC;IACD,iEAAiE;IACjD,sBAAsB;QACpC,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;IACnC,CAAC;IACD;;;;;;;;;;;;MAYE;IACK,MAAM,CAAC,sBAAsB,CAClC,IAA8C,EAC9C,gBAA0B,0BAAQ,CAAC,KAAK,EAAE,EAC1C,YAAmB,aAAK,CAAC,gBAAgB,EAAE,EAC3C,UAAkB,CAAC;QAEnB,IAAI,IAAI,YAAY,0BAAe;YACjC,OAAO,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAC9F,MAAM,OAAO,GAAG,IAAI,CAAC;QACrB,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,WAAW,GAAG,0BAAQ,CAAC,UAAU,EAAE,CAAC;QAC1C,KAAK,OAAO,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC;YACjD,IAAI,CAAC,uBAAU,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC;gBACpD,SAAS,CAAC,mBAAmB;YAC/B,IAAI,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,GAAG;gBAC7C,SAAS,CAAC,uCAAuC;YACnD,IAAI,WAAW,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,0BAA0B,CAAC,SAAS,CAAC;gBACzF,SAAS,CAAC,oBAAoB;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,4BAA4B,CAAC,mBAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACrG,CAAC;CACF;AAzGD,oEAyGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Polyface\n */\n\nimport { Geometry } from \"../Geometry\";\nimport { Angle } from \"../geometry3d/Angle\";\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\nimport { Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { PolygonOps } from \"../geometry3d/PolygonOps\";\nimport { IndexedPolyface, PolyfaceVisitor } from \"./Polyface\";\nimport { PolyfaceData } from \"./PolyfaceData\";\n\n/**\n * An `IndexedPolyfaceVisitor` is an iterator-like object that \"visits\" facets of a mesh.\n * * The visitor extends `PolyfaceData`, so it can at any time hold all the data of a single facet.\n * @public\n */\nexport class IndexedPolyfaceVisitor extends PolyfaceData implements PolyfaceVisitor {\n private _currentFacetIndex: number;\n private _nextFacetIndex: number;\n private _numWrap: number;\n private _numEdges: number;\n private _polyface: IndexedPolyface;\n // to be called from static factory method that validates the polyface\n protected constructor(polyface: IndexedPolyface, numWrap: number) {\n super(polyface.data.normalCount > 0, polyface.data.paramCount > 0, polyface.data.colorCount > 0, polyface.twoSided);\n this._polyface = polyface;\n this._numWrap = numWrap;\n if (polyface.data.auxData)\n this.auxData = polyface.data.auxData.createForVisitor();\n if (polyface.data.edgeMateIndex)\n this.edgeMateIndex = [];\n this._numEdges = 0;\n this._nextFacetIndex = 0;\n this._currentFacetIndex = -1;\n this.reset();\n }\n /** Return the client polyface object. */\n public clientPolyface(): IndexedPolyface {\n return this._polyface;\n }\n /** Return the number of facets this visitor is able to visit. */\n public getVisitableFacetCount(): number {\n return this._polyface.facetCount;\n }\n /**\n * Set the number of vertices replicated in visitor arrays (both data and index arrays).\n * * 0,1,2 are the most common as numWrap.\n * * Example: suppose `[6,7,8]` is the pointIndex array representing a triangle. First edge would be `6,7`. Second\n * edge is `7,8`. Third edge is `8,6`. To access `6` for the third edge, we have to go back to the start of array.\n * Therefore, it is useful to store `6` at the end of pointIndex array, i.e., `[6,7,8,6]` meaning `numWrap = 1`.\n * Continuing this example, `numWrap = 2` (i.e., `[6,7,8,6,7]`) is useful when each vertex visit requires the next\n * two points, e.g., to form two adjacent vectors for a cross product.\n */\n public setNumWrap(numWrap: number) {\n this._numWrap = numWrap;\n }\n /**\n * Return the number of edges in the current facet.\n * * If `numWrap > 0` for this visitor, the number of edges is smaller than the number of points.\n */\n public get numEdgesThisFacet(): number {\n return this._numEdges;\n }\n /** Create a visitor for iterating the facets of `polyface`. */\n public static create(polyface: IndexedPolyface, numWrap: number): IndexedPolyfaceVisitor {\n return new IndexedPolyfaceVisitor(polyface, numWrap);\n }\n /** Advance the iterator to a particular facet in the client polyface. */\n public moveToReadIndex(facetIndex: number): boolean {\n if (!this._polyface.isValidFacetIndex(facetIndex))\n return false;\n const numEdges = this._polyface.numEdgeInFacet(facetIndex);\n if (this._currentFacetIndex !== facetIndex || numEdges + this._numWrap !== this.pointCount) {\n this._currentFacetIndex = facetIndex;\n this._numEdges = numEdges;\n this.resizeAllArrays(this._numEdges + this._numWrap);\n this.gatherIndexedData(\n this._polyface.data,\n this._polyface.facetIndex0(this._currentFacetIndex),\n this._polyface.facetIndex1(this._currentFacetIndex),\n this._numWrap,\n );\n }\n this._nextFacetIndex = facetIndex + 1;\n return true;\n }\n /** Advance the iterator to a the 'next' facet in the client polyface. */\n public moveToNextFacet(): boolean {\n if (this._nextFacetIndex !== this._currentFacetIndex)\n return this.moveToReadIndex(this._nextFacetIndex);\n this._nextFacetIndex++;\n return true;\n }\n /** Restart the visitor at the first facet. */\n public reset(): void {\n this.moveToReadIndex(0);\n this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here.\n }\n /**\n * Attempts to extract the distance parameter for the given vertex `index` on the current facet.\n * Returns the distance parameter as a point. Returns `undefined` on failure.\n */\n public tryGetDistanceParameter(index: number, result?: Point2d): Point2d | undefined {\n if (index < 0 || index >= this.numEdgesThisFacet)\n return undefined;\n if (this.param === undefined || this._polyface.data.face.length === 0)\n return undefined;\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\n if (!faceData)\n return undefined;\n return faceData.convertParamXYToDistance(\n this.param.getXAtUncheckedPointIndex(index),\n this.param.getYAtUncheckedPointIndex(index),\n result,\n );\n }\n /**\n * Attempts to extract the normalized parameter (0,1) for the given vertex `index` on the current facet.\n * Returns the normalized parameter as a point. Returns `undefined` on failure.\n */\n public tryGetNormalizedParameter(index: number, result?: Point2d): Point2d | undefined {\n if (index < 0 || index >= this.numEdgesThisFacet)\n return undefined;\n if (this.param === undefined || this._polyface.data.face.length === 0)\n return undefined;\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\n if (!faceData)\n return undefined;\n return faceData.convertParamXYToNormalized(\n this.param.getXAtUncheckedPointIndex(index),\n this.param.getYAtUncheckedPointIndex(index),\n result,\n );\n }\n /** Return the facetIndex of the currently referenced facet in the client polyface. */\n public currentReadIndex(): number {\n return this._currentFacetIndex;\n }\n /** Return the point index of vertex `i` within the currently loaded facet. */\n public clientPointIndex(i: number): number {\n return this.pointIndex[i];\n }\n /** Return the param index of vertex `i` within the currently loaded facet. */\n public clientParamIndex(i: number): number {\n return this.paramIndex ? this.paramIndex[i] : -1;\n }\n /** Return the normal index of vertex `i` within the currently loaded facet. */\n public clientNormalIndex(i: number): number {\n return this.normalIndex ? this.normalIndex[i] : -1;\n }\n /** Return the color index of vertex `i` within the currently loaded facet. */\n public clientColorIndex(i: number): number {\n return this.colorIndex ? this.colorIndex[i] : -1;\n }\n /** Return the aux data index of vertex `i` within the currently loaded facet. */\n public clientAuxIndex(i: number): number {\n return this.auxData ? this.auxData.indices[i] : -1;\n }\n /** Clear the contents of the data arrays. */\n public clearArrays(): void {\n this.point.length = 0;\n this.edgeVisible.length = 0;\n if (this.param !== undefined)\n this.param.length = 0;\n if (this.normal !== undefined)\n this.normal.length = 0;\n if (this.color !== undefined)\n this.color.length = 0;\n // TODO: auxData? taggedNumericData?\n }\n /** Transfer data from a specified `index` of the `other` visitor as new data in this visitor. */\n public pushDataFrom(other: PolyfaceVisitor, index: number): void {\n this.point.pushFromGrowableXYZArray(other.point, index);\n this.edgeVisible.push(other.edgeVisible[index]);\n if (this.param && other.param && index < other.param.length)\n this.param.pushFromGrowableXYArray(other.param, index);\n if (this.normal && other.normal && index < other.normal.length)\n this.normal.pushFromGrowableXYZArray(other.normal, index);\n if (this.color && other.color && index < other.color.length)\n this.color.push(other.color[index]);\n // TODO: auxData? taggedNumericData?\n }\n /**\n * Transfer interpolated data from the other visitor.\n * * All data values are interpolated at `fraction` between `other` values at `index0` and `index1`.\n */\n public pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void {\n if (index0 > index1)\n this.pushInterpolatedDataFrom(other, index1, 1.0 - fraction, index0);\n this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);\n const newVisibility = (((index0 + 1) % other.edgeVisible.length) === index1) ? other.edgeVisible[index0] : false;\n this.edgeVisible.push(newVisibility); // interpolation along an edge preserves visibility of original edge\n if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)\n this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);\n if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)\n this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);\n if (this.color && other.color && index0 < other.color.length && index1 < other.color.length)\n this.color.push(Geometry.interpolateColor(other.color[index0], fraction, other.color[index1]));\n // TODO: auxData? taggedNumericData?\n }\n /** Create a visitor for a subset of the facets visitable by the instance. */\n public createSubsetVisitor(facetIndices: number[], numWrap: number = 0): IndexedPolyfaceSubsetVisitor {\n return IndexedPolyfaceSubsetVisitor.createSubsetVisitor(this._polyface, facetIndices, numWrap);\n }\n}\n\n/**\n * An `IndexedPolyfaceSubsetVisitor` is an `IndexedPolyfaceVisitor` which only visits a subset of facets in the polyface.\n * * The subset is defined by an array of facet indices provided when this visitor is created.\n * * Input indices (e.g., for `moveToReadIndex`) are understood to be indices into the subset array.\n * @public\n */\nexport class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {\n private _facetIndices: number[];\n private _currentSubsetIndex: number; // index within _facetIndices, or -1 after construction\n private _nextSubsetIndex: number; // index within _facetIndices\n\n private constructor(polyface: IndexedPolyface, facetIndices: number[], numWrap: number) {\n super(polyface, numWrap);\n this._facetIndices = facetIndices.slice();\n this._currentSubsetIndex = -1;\n this._nextSubsetIndex = 0;\n this.reset();\n }\n private isValidSubsetIndex(index: number): boolean {\n return index >= 0 && index < this._facetIndices.length;\n }\n /**\n * Create a visitor for iterating a subset of the facets of `polyface`.\n * @param polyface reference to the client polyface, supplying facets\n * @param facetIndices array of indices of facets in the client polyface to visit. This array is cloned.\n * @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.\n */\n public static createSubsetVisitor(\n polyface: IndexedPolyface, facetIndices: number[], numWrap: number = 0,\n ): IndexedPolyfaceSubsetVisitor {\n return new IndexedPolyfaceSubsetVisitor(polyface, facetIndices, numWrap);\n }\n /**\n * Advance the iterator to a particular facet in the subset of client polyface facets.\n * @param subsetIndex index into the subset array, not to be confused with the client facet index.\n * @return whether the iterator was successfully moved.\n */\n public override moveToReadIndex(subsetIndex: number): boolean {\n if (this.isValidSubsetIndex(subsetIndex)) {\n this._currentSubsetIndex = subsetIndex;\n this._nextSubsetIndex = subsetIndex + 1;\n return super.moveToReadIndex(this._facetIndices[subsetIndex]);\n }\n return false;\n }\n /**\n * Advance the iterator to the next facet in the subset of client polyface facets.\n * @return whether the iterator was successfully moved.\n */\n public override moveToNextFacet(): boolean {\n if (this._nextSubsetIndex !== this._currentSubsetIndex)\n return this.moveToReadIndex(this._nextSubsetIndex);\n this._nextSubsetIndex++;\n return true;\n }\n /** Restart the visitor at the first facet. */\n public override reset(): void {\n if (this._facetIndices) { // avoid crash during super ctor when we aren't yet initialized\n this.moveToReadIndex(0);\n this._nextSubsetIndex = 0; // so immediate moveToNextFacet stays here.\n }\n }\n /**\n * Return the client polyface facet index (aka \"readIndex\") for the given subset index.\n * @param subsetIndex index into the subset array. Default is the subset index of the currently visited facet.\n * @return valid client polyface facet index, or `undefined` if invalid subset index.\n */\n public parentFacetIndex(subsetIndex?: number): number | undefined {\n if (undefined === subsetIndex)\n subsetIndex = this._currentSubsetIndex;\n return this.isValidSubsetIndex(subsetIndex) ? this._facetIndices[subsetIndex] : undefined;\n }\n /** Return the number of facets this visitor is able to visit. */\n public override getVisitableFacetCount(): number {\n return this._facetIndices.length;\n }\n /**\n * Create a visitor for those mesh facets with normal in the same half-space as the given vector.\n * * For example, to visit the top facets of a tiled terrain mesh but skip the \"skirt\" facets, pass\n * `compareVector = Vector3d.unitZ()` and a suitable `sideAngle` tolerance. Note that this will also\n * filter out *interior* facets that are nearly vertical, not just the \"skirt\" facets on the boundary.\n * @param mesh the mesh from which to select facets\n * @param compareVector vector to which to compare facet normals. The visitor will visit only those facets\n * with normals in the same half-space as this vector. Default is 001.\n * @param sideAngle optional angular tolerance to filter the facets near the border between half-spaces.\n * The visitor will *not* visit facets whose normals are nearly perpendicular to `compareVector`.\n * Default is [[Geometry.smallAngleRadians]].\n * @param numWrap optional number of entries replicated in visitor arrays. Default is 0.\n */\n public static createNormalComparison(\n mesh: IndexedPolyface | IndexedPolyfaceVisitor,\n compareVector: Vector3d = Vector3d.unitZ(),\n sideAngle: Angle = Angle.createSmallAngle(),\n numWrap: number = 0,\n ): IndexedPolyfaceSubsetVisitor {\n if (mesh instanceof IndexedPolyface)\n return this.createNormalComparison(mesh.createVisitor(), compareVector, sideAngle, numWrap);\n const visitor = mesh;\n const facets: number[] = [];\n const facetNormal = Vector3d.createZero();\n for (visitor.reset(); visitor.moveToNextFacet();) {\n if (!PolygonOps.unitNormal(visitor.point, facetNormal))\n continue; // degenerate facet\n if (facetNormal.dotProduct(compareVector) < 0.0)\n continue; // ignore facet facing other half-space\n if (facetNormal.angleFromPerpendicular(compareVector).isMagnitudeLessThanOrEqual(sideAngle))\n continue; // ignore side facet\n facets.push(visitor.currentReadIndex());\n }\n return IndexedPolyfaceSubsetVisitor.createSubsetVisitor(visitor.clientPolyface(), facets, numWrap);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IndexedPolyfaceVisitor.js","sourceRoot":"","sources":["../../../src/polyface/IndexedPolyfaceVisitor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,0CAAuC;AACvC,+CAA4C;AAE5C,mEAAyD;AACzD,yDAAsD;AACtD,yCAA8D;AAC9D,iDAA8C;AAE9C;;;;GAIG;AACH,MAAa,sBAAuB,SAAQ,2BAAY;IAC9C,kBAAkB,CAAS;IAC3B,eAAe,CAAS;IACxB,QAAQ,CAAS;IACjB,SAAS,CAAS;IAClB,SAAS,CAAkB;IACnC,sEAAsE;IACtE,YAAsB,QAAyB,EAAE,OAAe;QAC9D,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACpH,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO;YACvB,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC1D,IAAI,QAAQ,CAAC,IAAI,CAAC,aAAa;YAC7B,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,kBAAkB,GAAG,CAAC,CAAC,CAAC;QAC7B,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAA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AC;IACD;;;;;;;;;;;;MAYE;IACK,MAAM,CAAC,sBAAsB,CAClC,IAA8C,EAC9C,gBAA0B,0BAAQ,CAAC,KAAK,EAAE,EAC1C,YAAmB,aAAK,CAAC,gBAAgB,EAAE,EAC3C,UAAkB,CAAC;QAEnB,IAAI,IAAI,YAAY,0BAAe;YACjC,OAAO,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAC9F,MAAM,OAAO,GAAG,IAAI,CAAC;QACrB,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,WAAW,GAAG,0BAAQ,CAAC,UAAU,EAAE,CAAC;QAC1C,KAAK,OAAO,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC;YACjD,IAAI,CAAC,uBAAU,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC;gBACpD,SAAS,CAAC,mBAAmB;YAC/B,IAAI,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,GAAG;gBAC7C,SAAS,CAAC,uCAAuC;YACnD,IAAI,WAAW,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,0BAA0B,CAAC,SAAS,CAAC;gBACzF,SAAS,CAAC,oBAAoB;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,4BAA4B,CAAC,mBAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACrG,CAAC;CACF;AAzGD,oEAyGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Polyface\n */\n\nimport { Geometry } from \"../Geometry\";\nimport { Angle } from \"../geometry3d/Angle\";\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\nimport { Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { PolygonOps } from \"../geometry3d/PolygonOps\";\nimport { IndexedPolyface, PolyfaceVisitor } from \"./Polyface\";\nimport { PolyfaceData } from \"./PolyfaceData\";\n\n/**\n * An `IndexedPolyfaceVisitor` is an iterator-like object that \"visits\" facets of a mesh.\n * * The visitor extends `PolyfaceData`, so it can at any time hold all the data of a single facet.\n * @public\n */\nexport class IndexedPolyfaceVisitor extends PolyfaceData implements PolyfaceVisitor {\n private _currentFacetIndex: number;\n private _nextFacetIndex: number;\n private _numWrap: number;\n private _numEdges: number;\n private _polyface: IndexedPolyface;\n // to be called from static factory method that validates the polyface\n protected constructor(polyface: IndexedPolyface, numWrap: number) {\n super(polyface.data.normalCount > 0, polyface.data.paramCount > 0, polyface.data.colorCount > 0, polyface.twoSided);\n this._polyface = polyface;\n this._numWrap = numWrap;\n if (polyface.data.auxData)\n this.auxData = polyface.data.auxData.createForVisitor();\n if (polyface.data.edgeMateIndex)\n this.edgeMateIndex = [];\n this._numEdges = 0;\n this._nextFacetIndex = 0;\n this._currentFacetIndex = -1;\n this.reset();\n }\n /** Return the client polyface object. */\n public clientPolyface(): IndexedPolyface {\n return this._polyface;\n }\n /** Return the number of facets this visitor is able to visit. */\n public getVisitableFacetCount(): number {\n return this._polyface.facetCount;\n }\n /**\n * Set the number of vertices replicated in visitor arrays (both data and index arrays).\n * * 0,1,2 are the most common as numWrap.\n * * Example: suppose `[6,7,8]` is the pointIndex array representing a triangle. First edge would be `6,7`. Second\n * edge is `7,8`. Third edge is `8,6`. To access `6` for the third edge, we have to go back to the start of array.\n * Therefore, it is useful to store `6` at the end of pointIndex array, i.e., `[6,7,8,6]` meaning `numWrap = 1`.\n * Continuing this example, `numWrap = 2` (i.e., `[6,7,8,6,7]`) is useful when each vertex visit requires the next\n * two points, e.g., to form two adjacent vectors for a cross product.\n */\n public setNumWrap(numWrap: number) {\n this._numWrap = numWrap;\n }\n /**\n * Return the number of edges in the current facet.\n * * If `numWrap > 0` for this visitor, the number of edges is smaller than the number of points.\n */\n public get numEdgesThisFacet(): number {\n return this._numEdges;\n }\n /** Create a visitor for iterating the facets of `polyface`. */\n public static create(polyface: IndexedPolyface, numWrap: number): IndexedPolyfaceVisitor {\n return new IndexedPolyfaceVisitor(polyface, numWrap);\n }\n /** Advance the iterator to a particular facet in the client polyface. */\n public moveToReadIndex(facetIndex: number): boolean {\n if (!this._polyface.isValidFacetIndex(facetIndex))\n return false;\n const numEdges = this._polyface.numEdgeInFacet(facetIndex);\n if (this._currentFacetIndex !== facetIndex || numEdges + this._numWrap !== this.pointCount) {\n this._currentFacetIndex = facetIndex;\n this._numEdges = numEdges;\n this.resizeAllArrays(this._numEdges + this._numWrap);\n this.gatherIndexedData(\n this._polyface.data,\n this._polyface.facetIndex0(this._currentFacetIndex),\n this._polyface.facetIndex1(this._currentFacetIndex),\n this._numWrap,\n );\n }\n this._nextFacetIndex = facetIndex + 1;\n return true;\n }\n /** Advance the iterator to a the 'next' facet in the client polyface. */\n public moveToNextFacet(): boolean {\n if (this._nextFacetIndex !== this._currentFacetIndex)\n return this.moveToReadIndex(this._nextFacetIndex);\n this._nextFacetIndex++;\n return true;\n }\n /** Restart the visitor at the first facet. */\n public reset(): void {\n this.moveToReadIndex(0);\n this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here.\n }\n /**\n * Attempts to extract the distance parameter for the given vertex `index` on the current facet.\n * Returns the distance parameter as a point. Returns `undefined` on failure.\n */\n public tryGetDistanceParameter(index: number, result?: Point2d): Point2d | undefined {\n if (index < 0 || index >= this.numEdgesThisFacet)\n return undefined;\n if (this.param === undefined || this._polyface.data.face.length === 0)\n return undefined;\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\n if (!faceData)\n return undefined;\n return faceData.convertParamXYToDistance(\n this.param.getXAtUncheckedPointIndex(index),\n this.param.getYAtUncheckedPointIndex(index),\n result,\n );\n }\n /**\n * Attempts to extract the normalized parameter (0,1) for the given vertex `index` on the current facet.\n * Returns the normalized parameter as a point. Returns `undefined` on failure.\n */\n public tryGetNormalizedParameter(index: number, result?: Point2d): Point2d | undefined {\n if (index < 0 || index >= this.numEdgesThisFacet)\n return undefined;\n if (this.param === undefined || this._polyface.data.face.length === 0)\n return undefined;\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\n if (!faceData)\n return undefined;\n return faceData.convertParamXYToNormalized(\n this.param.getXAtUncheckedPointIndex(index),\n this.param.getYAtUncheckedPointIndex(index),\n result,\n );\n }\n /** Return the facetIndex of the currently referenced facet in the client polyface. */\n public currentReadIndex(): number {\n return this._currentFacetIndex;\n }\n /** Return the point index of vertex `i` within the currently loaded facet. */\n public clientPointIndex(i: number): number {\n return this.pointIndex[i];\n }\n /** Return the param index of vertex `i` within the currently loaded facet. */\n public clientParamIndex(i: number): number {\n return this.paramIndex ? this.paramIndex[i] : -1;\n }\n /** Return the normal index of vertex `i` within the currently loaded facet. */\n public clientNormalIndex(i: number): number {\n return this.normalIndex ? this.normalIndex[i] : -1;\n }\n /** Return the color index of vertex `i` within the currently loaded facet. */\n public clientColorIndex(i: number): number {\n return this.colorIndex ? this.colorIndex[i] : -1;\n }\n /** Return the aux data index of vertex `i` within the currently loaded facet. */\n public clientAuxIndex(i: number): number {\n return this.auxData ? this.auxData.indices[i] : -1;\n }\n /** Clear the contents of the data arrays. */\n public clearArrays(): void {\n this.point.length = 0;\n this.edgeVisible.length = 0;\n if (this.param !== undefined)\n this.param.length = 0;\n if (this.normal !== undefined)\n this.normal.length = 0;\n if (this.color !== undefined)\n this.color.length = 0;\n // TODO: auxData? taggedNumericData?\n }\n /** Transfer data from a specified `index` of the `other` visitor as new data in this visitor. */\n public pushDataFrom(other: PolyfaceVisitor, index: number): void {\n this.point.pushFromGrowableXYZArray(other.point, index);\n this.edgeVisible.push(other.edgeVisible[index]);\n if (this.param && other.param && index < other.param.length)\n this.param.pushFromGrowableXYArray(other.param, index);\n if (this.normal && other.normal && index < other.normal.length)\n this.normal.pushFromGrowableXYZArray(other.normal, index);\n if (this.color && other.color && index < other.color.length)\n this.color.push(other.color[index]);\n // TODO: auxData? taggedNumericData?\n }\n /**\n * Transfer interpolated data from the other visitor.\n * * All data values are interpolated at `fraction` between `other` values at `index0` and `index1`.\n */\n public pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void {\n if (index0 > index1)\n this.pushInterpolatedDataFrom(other, index1, 1.0 - fraction, index0);\n this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);\n const newVisibility = (((index0 + 1) % other.edgeVisible.length) === index1) ? other.edgeVisible[index0] : false;\n this.edgeVisible.push(newVisibility); // interpolation along an edge preserves visibility of original edge\n if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)\n this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);\n if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)\n this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);\n if (this.color && other.color && index0 < other.color.length && index1 < other.color.length)\n this.color.push(Geometry.interpolateColor(other.color[index0], fraction, other.color[index1]));\n // TODO: auxData? taggedNumericData?\n }\n /** Create a visitor for a subset of the facets visitable by the instance. */\n public createSubsetVisitor(facetIndices: number[], numWrap: number = 0): IndexedPolyfaceSubsetVisitor {\n return IndexedPolyfaceSubsetVisitor.createSubsetVisitor(this._polyface, facetIndices, numWrap);\n }\n}\n\n/**\n * An `IndexedPolyfaceSubsetVisitor` is an `IndexedPolyfaceVisitor` which only visits a subset of facets in the polyface.\n * * The subset is defined by an array of facet indices provided when this visitor is created.\n * * Input indices (e.g., for `moveToReadIndex`) are understood to be indices into the subset array.\n * @public\n */\nexport class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {\n private _facetIndices: number[];\n private _currentSubsetIndex: number; // index within _facetIndices\n private _nextSubsetIndex: number; // index within _facetIndices\n\n private constructor(polyface: IndexedPolyface, facetIndices: number[], numWrap: number) {\n super(polyface, numWrap);\n this._facetIndices = facetIndices.slice();\n this._currentSubsetIndex = -1;\n this._nextSubsetIndex = 0;\n this.reset();\n }\n private isValidSubsetIndex(index: number): boolean {\n return index >= 0 && index < this._facetIndices.length;\n }\n /**\n * Create a visitor for iterating a subset of the facets of `polyface`.\n * @param polyface reference to the client polyface, supplying facets\n * @param facetIndices array of indices of facets in the client polyface to visit. This array is cloned.\n * @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.\n */\n public static createSubsetVisitor(\n polyface: IndexedPolyface, facetIndices: number[], numWrap: number = 0,\n ): IndexedPolyfaceSubsetVisitor {\n return new IndexedPolyfaceSubsetVisitor(polyface, facetIndices, numWrap);\n }\n /**\n * Advance the iterator to a particular facet in the subset of client polyface facets.\n * @param subsetIndex index into the subset array, not to be confused with the client facet index.\n * @return whether the iterator was successfully moved.\n */\n public override moveToReadIndex(subsetIndex: number): boolean {\n if (this.isValidSubsetIndex(subsetIndex)) {\n this._currentSubsetIndex = subsetIndex;\n this._nextSubsetIndex = subsetIndex + 1;\n return super.moveToReadIndex(this._facetIndices[subsetIndex]);\n }\n return false;\n }\n /**\n * Advance the iterator to the next facet in the subset of client polyface facets.\n * @return whether the iterator was successfully moved.\n */\n public override moveToNextFacet(): boolean {\n if (this._nextSubsetIndex !== this._currentSubsetIndex)\n return this.moveToReadIndex(this._nextSubsetIndex);\n this._nextSubsetIndex++;\n return true;\n }\n /** Restart the visitor at the first facet. */\n public override reset(): void {\n if (this._facetIndices) { // avoid crash during super ctor when we aren't yet initialized\n this.moveToReadIndex(0);\n this._nextSubsetIndex = 0; // so immediate moveToNextFacet stays here.\n }\n }\n /**\n * Return the client polyface facet index (aka \"readIndex\") for the given subset index.\n * @param subsetIndex index into the subset array. Default is the subset index of the currently visited facet.\n * @return valid client polyface facet index, or `undefined` if invalid subset index.\n */\n public parentFacetIndex(subsetIndex?: number): number | undefined {\n if (undefined === subsetIndex)\n subsetIndex = this._currentSubsetIndex;\n return this.isValidSubsetIndex(subsetIndex) ? this._facetIndices[subsetIndex] : undefined;\n }\n /** Return the number of facets this visitor is able to visit. */\n public override getVisitableFacetCount(): number {\n return this._facetIndices.length;\n }\n /**\n * Create a visitor for those mesh facets with normal in the same half-space as the given vector.\n * * For example, to visit the top facets of a tiled terrain mesh but skip the \"skirt\" facets, pass\n * `compareVector = Vector3d.unitZ()` and a suitable `sideAngle` tolerance. Note that this will also\n * filter out *interior* facets that are nearly vertical, not just the \"skirt\" facets on the boundary.\n * @param mesh the mesh from which to select facets\n * @param compareVector vector to which to compare facet normals. The visitor will visit only those facets\n * with normals in the same half-space as this vector. Default is 001.\n * @param sideAngle optional angular tolerance to filter the facets near the border between half-spaces.\n * The visitor will *not* visit facets whose normals are nearly perpendicular to `compareVector`.\n * Default is [[Geometry.smallAngleRadians]].\n * @param numWrap optional number of entries replicated in visitor arrays. Default is 0.\n */\n public static createNormalComparison(\n mesh: IndexedPolyface | IndexedPolyfaceVisitor,\n compareVector: Vector3d = Vector3d.unitZ(),\n sideAngle: Angle = Angle.createSmallAngle(),\n numWrap: number = 0,\n ): IndexedPolyfaceSubsetVisitor {\n if (mesh instanceof IndexedPolyface)\n return this.createNormalComparison(mesh.createVisitor(), compareVector, sideAngle, numWrap);\n const visitor = mesh;\n const facets: number[] = [];\n const facetNormal = Vector3d.createZero();\n for (visitor.reset(); visitor.moveToNextFacet();) {\n if (!PolygonOps.unitNormal(visitor.point, facetNormal))\n continue; // degenerate facet\n if (facetNormal.dotProduct(compareVector) < 0.0)\n continue; // ignore facet facing other half-space\n if (facetNormal.angleFromPerpendicular(compareVector).isMagnitudeLessThanOrEqual(sideAngle))\n continue; // ignore side facet\n facets.push(visitor.currentReadIndex());\n }\n return IndexedPolyfaceSubsetVisitor.createSubsetVisitor(visitor.clientPolyface(), facets, numWrap);\n }\n}\n"]}
|
|
@@ -152,7 +152,8 @@ export declare abstract class BSpline2dNd extends GeometryQuery {
|
|
|
152
152
|
knots: KnotVector[];
|
|
153
153
|
/** flat array of coordinate data, blocked by poleDimension and row */
|
|
154
154
|
coffs: Float64Array;
|
|
155
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* Number of components per pole.
|
|
156
157
|
* * 3 for conventional xyz surface
|
|
157
158
|
* * 4 for weighted (wx, wy, wz, w) surface.
|
|
158
159
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BSplineSurface.d.ts","sourceRoot":"","sources":["../../../src/bspline/BSplineSurface.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE3D;;;GAGG;AACH,oBAAY,QAAQ;IAClB,2BAA2B;IAC3B,UAAU,IAAI;IACd;;;OAGG;IACH,UAAU,IAAI;IACd,2BAA2B;IAC3B,UAAU,IAAI;CACf;AACD;;;;;;;;GAQG;AACH,oBAAY,WAAW;IACrB,4BAA4B;IAC5B,UAAU,IAAI;IACd;;;SAGK;IACL,kCAAkC,IAAI;IACtC;;;SAGK;IACL,8BAA8B,IAAI;CACnC;AACD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,MAAM,EAAE,MAAM,EAAE,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,wHAAwH;IACjH,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO;IAGvD,wHAAwH;IACjH,4BAA4B,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,yBAAyB,GAAG,yBAAyB;IAIxH,2DAA2D;IAC3C,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO;IAQlD,uCAAuC;IAChC,SAAS,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO;IAG9D,oFAAoF;IAC7E,yBAAyB,CAAC,OAAO,EAAE,eAAe,GAAG,GAAG;IAG/D;;;;OAIG;IACI,WAAW,CAAC,aAAa,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI;CAGxE"}
|
|
@@ -65,7 +65,8 @@ export class BSpline2dNd extends GeometryQuery {
|
|
|
65
65
|
knots;
|
|
66
66
|
/** flat array of coordinate data, blocked by poleDimension and row */
|
|
67
67
|
coffs;
|
|
68
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Number of components per pole.
|
|
69
70
|
* * 3 for conventional xyz surface
|
|
70
71
|
* * 4 for weighted (wx, wy, wz, w) surface.
|
|
71
72
|
*/
|