@automovie/engine 0.1.0 → 0.2.0
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/README.md +1 -1
- package/lib/IAutoMovieFormationPlacement.d.ts +4 -3
- package/lib/anthropometry/AutoMovieHandAnthropometry.d.ts +47 -0
- package/lib/anthropometry/AutoMovieHandAnthropometry.js +53 -0
- package/lib/anthropometry/AutoMovieHandAnthropometry.js.map +1 -0
- package/lib/anthropometry/index.d.ts +1 -0
- package/lib/anthropometry/index.js +18 -0
- package/lib/anthropometry/index.js.map +1 -0
- package/lib/composition/AutoMovieComposition.d.ts +25 -6
- package/lib/composition/AutoMovieComposition.js +4 -3
- package/lib/composition/AutoMovieComposition.js.map +1 -1
- package/lib/composition/AutoMovieScheduleCut.d.ts +53 -0
- package/lib/composition/AutoMovieScheduleCut.js +99 -0
- package/lib/composition/AutoMovieScheduleCut.js.map +1 -0
- package/lib/composition/AutoMovieScheduleError.d.ts +79 -0
- package/lib/composition/AutoMovieScheduleError.js +51 -0
- package/lib/composition/AutoMovieScheduleError.js.map +1 -0
- package/lib/composition/AutoMovieSchedulePlace.d.ts +56 -0
- package/lib/composition/AutoMovieSchedulePlace.js +185 -0
- package/lib/composition/AutoMovieSchedulePlace.js.map +1 -0
- package/lib/composition/AutoMovieScheduleWalk.d.ts +121 -0
- package/lib/composition/AutoMovieScheduleWalk.js +161 -0
- package/lib/composition/AutoMovieScheduleWalk.js.map +1 -0
- package/lib/composition/IAutoMovieIntent.d.ts +9 -6
- package/lib/composition/index.d.ts +5 -0
- package/lib/composition/index.js +5 -0
- package/lib/composition/index.js.map +1 -1
- package/lib/composition/markAutoMovieContacts.d.ts +29 -0
- package/lib/composition/markAutoMovieContacts.js +69 -0
- package/lib/composition/markAutoMovieContacts.js.map +1 -0
- package/lib/composition/resolveAutoMovieContactEvents.d.ts +56 -7
- package/lib/composition/resolveAutoMovieContactEvents.js +89 -18
- package/lib/composition/resolveAutoMovieContactEvents.js.map +1 -1
- package/lib/composition/resolveAutoMovieMutualGoal.d.ts +45 -29
- package/lib/composition/resolveAutoMovieMutualGoal.js +123 -60
- package/lib/composition/resolveAutoMovieMutualGoal.js.map +1 -1
- package/lib/composition/resolveAutoMovieSchedule.d.ts +69 -11
- package/lib/composition/resolveAutoMovieSchedule.js +32 -103
- package/lib/composition/resolveAutoMovieSchedule.js.map +1 -1
- package/lib/createAutoMovieGeometryActorReader.js +2 -1
- package/lib/createAutoMovieGeometryActorReader.js.map +1 -1
- package/lib/describeAutoMovieInstanceSetSubject.js +2 -5
- package/lib/describeAutoMovieInstanceSetSubject.js.map +1 -1
- package/lib/film/compileAttach.js +2 -5
- package/lib/film/compileAttach.js.map +1 -1
- package/lib/film/compileLaunch.d.ts +2 -2
- package/lib/film/compileLaunch.js +4 -3
- package/lib/film/compileLaunch.js.map +1 -1
- package/lib/film/propAnchorFrame.js +6 -9
- package/lib/film/propAnchorFrame.js.map +1 -1
- package/lib/film/stageScene.js +3 -10
- package/lib/film/stageScene.js.map +1 -1
- package/lib/film/staging/lowerLightPlacement.js +4 -7
- package/lib/film/staging/lowerLightPlacement.js.map +1 -1
- package/lib/formationSlotPosition.d.ts +6 -1
- package/lib/formationSlotPosition.js +38 -3
- package/lib/formationSlotPosition.js.map +1 -1
- package/lib/geometry/IAutoMovieMark.d.ts +99 -0
- package/lib/geometry/IAutoMovieMark.js +3 -0
- package/lib/geometry/IAutoMovieMark.js.map +1 -0
- package/lib/geometry/IAutoMovieMeshDefect.d.ts +33 -0
- package/lib/geometry/IAutoMovieMeshDefect.js +3 -0
- package/lib/geometry/IAutoMovieMeshDefect.js.map +1 -0
- package/lib/geometry/construction/AutoMovieConstructionAdmission.js +72 -10
- package/lib/geometry/construction/AutoMovieConstructionAdmission.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionBridgeRealize.d.ts +35 -0
- package/lib/geometry/construction/AutoMovieConstructionBridgeRealize.js +155 -0
- package/lib/geometry/construction/AutoMovieConstructionBridgeRealize.js.map +1 -0
- package/lib/geometry/construction/AutoMovieConstructionContinuationRealize.js +4 -0
- package/lib/geometry/construction/AutoMovieConstructionContinuationRealize.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionPortRealize.d.ts +1 -1
- package/lib/geometry/construction/AutoMovieConstructionPortRealize.js +38 -14
- package/lib/geometry/construction/AutoMovieConstructionPortRealize.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionSeeds.d.ts +6 -6
- package/lib/geometry/construction/AutoMovieConstructionSeeds.js +34 -11
- package/lib/geometry/construction/AutoMovieConstructionSeeds.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionSplitBand.d.ts +107 -2
- package/lib/geometry/construction/AutoMovieConstructionSplitBand.js +452 -16
- package/lib/geometry/construction/AutoMovieConstructionSplitBand.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionSplitRealize.js +262 -0
- package/lib/geometry/construction/AutoMovieConstructionSplitRealize.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionSplitSeam.d.ts +28 -2
- package/lib/geometry/construction/AutoMovieConstructionSplitSeam.js +51 -12
- package/lib/geometry/construction/AutoMovieConstructionSplitSeam.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionState.d.ts +11 -0
- package/lib/geometry/construction/AutoMovieConstructionState.js +5 -0
- package/lib/geometry/construction/AutoMovieConstructionState.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftCapRead.js +3 -2
- package/lib/geometry/construction/AutoMovieLoftCapRead.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftCapSource.js +21 -1
- package/lib/geometry/construction/AutoMovieLoftCapSource.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftJet.js +7 -5
- package/lib/geometry/construction/AutoMovieLoftJet.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftPoint.js +7 -4
- package/lib/geometry/construction/AutoMovieLoftPoint.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftRelief.d.ts +25 -0
- package/lib/geometry/construction/AutoMovieLoftRelief.js +37 -0
- package/lib/geometry/construction/AutoMovieLoftRelief.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftViewRead.js +29 -7
- package/lib/geometry/construction/AutoMovieLoftViewRead.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftViewSource.js +4 -2
- package/lib/geometry/construction/AutoMovieLoftViewSource.js.map +1 -1
- package/lib/geometry/construction/AutoMovieNaturalSpline.d.ts +20 -0
- package/lib/geometry/construction/AutoMovieNaturalSpline.js +37 -0
- package/lib/geometry/construction/AutoMovieNaturalSpline.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidBlendChain.d.ts +9 -1
- package/lib/geometry/construction/AutoMovieSolidBlendChain.js +13 -8
- package/lib/geometry/construction/AutoMovieSolidBlendChain.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidBodyMerge.js +2 -0
- package/lib/geometry/construction/AutoMovieSolidBodyMerge.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidClip.d.ts +15 -1
- package/lib/geometry/construction/AutoMovieSolidClip.js +306 -38
- package/lib/geometry/construction/AutoMovieSolidClip.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidCycle.d.ts +20 -5
- package/lib/geometry/construction/AutoMovieSolidCycle.js +68 -16
- package/lib/geometry/construction/AutoMovieSolidCycle.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidIntersectionWalk.js +89 -41
- package/lib/geometry/construction/AutoMovieSolidIntersectionWalk.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidJoin.d.ts +13 -0
- package/lib/geometry/construction/AutoMovieSolidJoin.js +23 -2
- package/lib/geometry/construction/AutoMovieSolidJoin.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidMeshConstraints.d.ts +1 -1
- package/lib/geometry/construction/AutoMovieSolidMeshConstraints.js +28 -3
- package/lib/geometry/construction/AutoMovieSolidMeshConstraints.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidMeshLoop.d.ts +4 -4
- package/lib/geometry/construction/AutoMovieSolidMeshLoop.js +42 -4
- package/lib/geometry/construction/AutoMovieSolidMeshLoop.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidMeshPlan.d.ts +2 -1
- package/lib/geometry/construction/AutoMovieSolidMeshPlan.js +57 -25
- package/lib/geometry/construction/AutoMovieSolidMeshPlan.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidRail.d.ts +40 -0
- package/lib/geometry/construction/AutoMovieSolidRail.js +101 -31
- package/lib/geometry/construction/AutoMovieSolidRail.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidRailSolve.d.ts +7 -3
- package/lib/geometry/construction/AutoMovieSolidRailSolve.js +115 -18
- package/lib/geometry/construction/AutoMovieSolidRailSolve.js.map +1 -1
- package/lib/geometry/construction/AutoMovieViewLoft.js +9 -0
- package/lib/geometry/construction/AutoMovieViewLoft.js.map +1 -1
- package/lib/geometry/construction/IAutoMovieConstructionCurve.d.ts +37 -0
- package/lib/geometry/construction/IAutoMovieConstructionCurve.js +3 -0
- package/lib/geometry/construction/IAutoMovieConstructionCurve.js.map +1 -0
- package/lib/geometry/construction/IAutoMovieLoftChain.d.ts +6 -0
- package/lib/geometry/construction/IAutoMovieLoftRelief.d.ts +10 -0
- package/lib/geometry/construction/IAutoMovieViewPart.d.ts +9 -1
- package/lib/geometry/construction/faceAutoMovieSolidMesh.d.ts +3 -3
- package/lib/geometry/construction/faceAutoMovieSolidMesh.js +65 -16
- package/lib/geometry/construction/faceAutoMovieSolidMesh.js.map +1 -1
- package/lib/geometry/construction/fairAutoMovieSolidMesh.d.ts +45 -0
- package/lib/geometry/construction/fairAutoMovieSolidMesh.js +270 -0
- package/lib/geometry/construction/fairAutoMovieSolidMesh.js.map +1 -0
- package/lib/geometry/construction/gridAutoMovieSolidMesh.d.ts +18 -1
- package/lib/geometry/construction/gridAutoMovieSolidMesh.js +139 -7
- package/lib/geometry/construction/gridAutoMovieSolidMesh.js.map +1 -1
- package/lib/geometry/construction/index.d.ts +5 -0
- package/lib/geometry/construction/index.js +5 -0
- package/lib/geometry/construction/index.js.map +1 -1
- package/lib/geometry/construction/legalizeAutoMovieSolidMesh.d.ts +14 -1
- package/lib/geometry/construction/legalizeAutoMovieSolidMesh.js +26 -4
- package/lib/geometry/construction/legalizeAutoMovieSolidMesh.js.map +1 -1
- package/lib/geometry/construction/markAutoMovieConstructionCurves.d.ts +33 -0
- package/lib/geometry/construction/markAutoMovieConstructionCurves.js +51 -0
- package/lib/geometry/construction/markAutoMovieConstructionCurves.js.map +1 -0
- package/lib/geometry/construction/orientAutoMovieSolidChart.d.ts +1 -1
- package/lib/geometry/construction/orientAutoMovieSolidChart.js +28 -4
- package/lib/geometry/construction/orientAutoMovieSolidChart.js.map +1 -1
- package/lib/geometry/construction/probeAutoMovieSolidMesh.d.ts +11 -5
- package/lib/geometry/construction/probeAutoMovieSolidMesh.js +41 -28
- package/lib/geometry/construction/probeAutoMovieSolidMesh.js.map +1 -1
- package/lib/geometry/construction/realizeAutoMovieConstruction.js +45 -1
- package/lib/geometry/construction/realizeAutoMovieConstruction.js.map +1 -1
- package/lib/geometry/construction/sampleAutoMovieConstructionCurves.d.ts +31 -0
- package/lib/geometry/construction/sampleAutoMovieConstructionCurves.js +234 -0
- package/lib/geometry/construction/sampleAutoMovieConstructionCurves.js.map +1 -0
- package/lib/geometry/index.d.ts +4 -0
- package/lib/geometry/index.js +4 -0
- package/lib/geometry/index.js.map +1 -1
- package/lib/geometry/markAutoMovieMeshClearance.d.ts +32 -0
- package/lib/geometry/markAutoMovieMeshClearance.js +53 -0
- package/lib/geometry/markAutoMovieMeshClearance.js.map +1 -0
- package/lib/geometry/measureAutoMovieMeshDefects.d.ts +31 -0
- package/lib/geometry/measureAutoMovieMeshDefects.js +244 -0
- package/lib/geometry/measureAutoMovieMeshDefects.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/kinematics/AutoMovieHumanoidDigitSurfaces.d.ts +36 -0
- package/lib/kinematics/AutoMovieHumanoidDigitSurfaces.js +67 -0
- package/lib/kinematics/AutoMovieHumanoidDigitSurfaces.js.map +1 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceExtents.d.ts +28 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceExtents.js +52 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceExtents.js.map +1 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRays.d.ts +55 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRays.js +191 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRays.js.map +1 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRegions.d.ts +49 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRegions.js +147 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRegions.js.map +1 -0
- package/lib/kinematics/IAutoMovieHingedArticulation.d.ts +17 -3
- package/lib/kinematics/IAutoMoviePoseRig.d.ts +31 -0
- package/lib/kinematics/IAutoMoviePoseRig.js +3 -0
- package/lib/kinematics/IAutoMoviePoseRig.js.map +1 -0
- package/lib/kinematics/IAutoMovieSwivelNear.d.ts +25 -0
- package/lib/kinematics/IAutoMovieSwivelNear.js +3 -0
- package/lib/kinematics/IAutoMovieSwivelNear.js.map +1 -0
- package/lib/kinematics/IAutoMovieSwivelSeed.d.ts +18 -0
- package/lib/kinematics/IAutoMovieSwivelSeed.js +3 -0
- package/lib/kinematics/IAutoMovieSwivelSeed.js.map +1 -0
- package/lib/kinematics/alternateRigJointAngles.d.ts +27 -0
- package/lib/kinematics/alternateRigJointAngles.js +34 -0
- package/lib/kinematics/alternateRigJointAngles.js.map +1 -0
- package/lib/kinematics/boxExcludedSwivels.d.ts +64 -0
- package/lib/kinematics/boxExcludedSwivels.js +187 -0
- package/lib/kinematics/boxExcludedSwivels.js.map +1 -0
- package/lib/kinematics/constants/HUMANOID_JOINT_AXES.d.ts +16 -2
- package/lib/kinematics/constants/HUMANOID_JOINT_AXES.js +19 -4
- package/lib/kinematics/constants/HUMANOID_JOINT_AXES.js.map +1 -1
- package/lib/kinematics/curlChainUntilContact.d.ts +16 -0
- package/lib/kinematics/curlChainUntilContact.js +45 -5
- package/lib/kinematics/curlChainUntilContact.js.map +1 -1
- package/lib/kinematics/decomposeJointRotation.d.ts +5 -2
- package/lib/kinematics/decomposeJointRotation.js +10 -131
- package/lib/kinematics/decomposeJointRotation.js.map +1 -1
- package/lib/kinematics/decomposeJointRotationOnBasis.d.ts +36 -0
- package/lib/kinematics/decomposeJointRotationOnBasis.js +228 -0
- package/lib/kinematics/decomposeJointRotationOnBasis.js.map +1 -0
- package/lib/kinematics/fitDigitDescent.d.ts +66 -0
- package/lib/kinematics/fitDigitDescent.js +142 -0
- package/lib/kinematics/fitDigitDescent.js.map +1 -0
- package/lib/kinematics/fitDigitToTarget.d.ts +125 -0
- package/lib/kinematics/fitDigitToTarget.js +251 -0
- package/lib/kinematics/fitDigitToTarget.js.map +1 -0
- package/lib/kinematics/hingedArmArticulation.d.ts +55 -7
- package/lib/kinematics/hingedArmArticulation.js +273 -84
- package/lib/kinematics/hingedArmArticulation.js.map +1 -1
- package/lib/kinematics/hingedArmSwivel.d.ts +141 -0
- package/lib/kinematics/hingedArmSwivel.js +196 -0
- package/lib/kinematics/hingedArmSwivel.js.map +1 -0
- package/lib/kinematics/index.d.ts +24 -0
- package/lib/kinematics/index.js +24 -0
- package/lib/kinematics/index.js.map +1 -1
- package/lib/kinematics/jointRomOvershoot.d.ts +13 -9
- package/lib/kinematics/jointRomOvershoot.js +21 -17
- package/lib/kinematics/jointRomOvershoot.js.map +1 -1
- package/lib/kinematics/jointToQuaternion.d.ts +2 -2
- package/lib/kinematics/jointToQuaternion.js +4 -19
- package/lib/kinematics/jointToQuaternion.js.map +1 -1
- package/lib/kinematics/jointToQuaternionOnBasis.d.ts +34 -0
- package/lib/kinematics/jointToQuaternionOnBasis.js +50 -0
- package/lib/kinematics/jointToQuaternionOnBasis.js.map +1 -0
- package/lib/kinematics/markAutoMovieBalance.d.ts +32 -0
- package/lib/kinematics/markAutoMovieBalance.js +65 -0
- package/lib/kinematics/markAutoMovieBalance.js.map +1 -0
- package/lib/kinematics/markAutoMovieRomOvershoot.d.ts +25 -0
- package/lib/kinematics/markAutoMovieRomOvershoot.js +43 -0
- package/lib/kinematics/markAutoMovieRomOvershoot.js.map +1 -0
- package/lib/kinematics/measureAutoMovieHumanoidBody.js +16 -5
- package/lib/kinematics/measureAutoMovieHumanoidBody.js.map +1 -1
- package/lib/kinematics/normalizeJointAxes.d.ts +15 -7
- package/lib/kinematics/normalizeJointAxes.js +52 -12
- package/lib/kinematics/normalizeJointAxes.js.map +1 -1
- package/lib/kinematics/poseJointCodec.d.ts +71 -0
- package/lib/kinematics/poseJointCodec.js +70 -0
- package/lib/kinematics/poseJointCodec.js.map +1 -0
- package/lib/kinematics/resolveAutoMovieBalanceOutcome.d.ts +112 -0
- package/lib/kinematics/resolveAutoMovieBalanceOutcome.js +168 -0
- package/lib/kinematics/resolveAutoMovieBalanceOutcome.js.map +1 -0
- package/lib/kinematics/resolveAutoMovieCenterOfMass.d.ts +29 -4
- package/lib/kinematics/resolveAutoMovieCenterOfMass.js +42 -8
- package/lib/kinematics/resolveAutoMovieCenterOfMass.js.map +1 -1
- package/lib/kinematics/resolveAutoMovieHumanoidRingModules.d.ts +75 -0
- package/lib/kinematics/resolveAutoMovieHumanoidRingModules.js +228 -0
- package/lib/kinematics/resolveAutoMovieHumanoidRingModules.js.map +1 -0
- package/lib/kinematics/resolveAutoMovieHumanoidSurfaces.d.ts +90 -10
- package/lib/kinematics/resolveAutoMovieHumanoidSurfaces.js +183 -258
- package/lib/kinematics/resolveAutoMovieHumanoidSurfaces.js.map +1 -1
- package/lib/kinematics/resolveAutoMovieMomentum.d.ts +112 -0
- package/lib/kinematics/resolveAutoMovieMomentum.js +153 -0
- package/lib/kinematics/resolveAutoMovieMomentum.js.map +1 -0
- package/lib/kinematics/swingTwistBasis.d.ts +108 -0
- package/lib/kinematics/swingTwistBasis.js +116 -0
- package/lib/kinematics/swingTwistBasis.js.map +1 -0
- package/lib/kinematics/swingTwistExcludedSwivels.d.ts +65 -0
- package/lib/kinematics/swingTwistExcludedSwivels.js +138 -0
- package/lib/kinematics/swingTwistExcludedSwivels.js.map +1 -0
- package/lib/kinematics/swingTwistRange.d.ts +246 -0
- package/lib/kinematics/swingTwistRange.js +322 -0
- package/lib/kinematics/swingTwistRange.js.map +1 -0
- package/lib/kinematics/swingTwistRegion.d.ts +50 -0
- package/lib/kinematics/swingTwistRegion.js +212 -0
- package/lib/kinematics/swingTwistRegion.js.map +1 -0
- package/lib/kinematics/swivelArcs.d.ts +166 -0
- package/lib/kinematics/swivelArcs.js +200 -0
- package/lib/kinematics/swivelArcs.js.map +1 -0
- package/lib/math/Quaternion.d.ts +29 -2
- package/lib/math/Quaternion.js +33 -2
- package/lib/math/Quaternion.js.map +1 -1
- package/lib/math/Transform.d.ts +50 -0
- package/lib/math/Transform.js +58 -0
- package/lib/math/Transform.js.map +1 -0
- package/lib/math/assignAutoMovieMinimumCost.d.ts +18 -0
- package/lib/math/assignAutoMovieMinimumCost.js +86 -0
- package/lib/math/assignAutoMovieMinimumCost.js.map +1 -0
- package/lib/math/bracketedBisection.d.ts +33 -0
- package/lib/math/bracketedBisection.js +52 -0
- package/lib/math/bracketedBisection.js.map +1 -0
- package/lib/math/bracketedRoot.d.ts +32 -0
- package/lib/math/bracketedRoot.js +76 -0
- package/lib/math/bracketedRoot.js.map +1 -0
- package/lib/math/index.d.ts +7 -0
- package/lib/math/index.js +7 -0
- package/lib/math/index.js.map +1 -1
- package/lib/math/nearestAngleAlias.d.ts +27 -0
- package/lib/math/nearestAngleAlias.js +44 -0
- package/lib/math/nearestAngleAlias.js.map +1 -0
- package/lib/math/solveAutoMovieHalfPlaneProgram.d.ts +68 -0
- package/lib/math/solveAutoMovieHalfPlaneProgram.js +199 -0
- package/lib/math/solveAutoMovieHalfPlaneProgram.js.map +1 -0
- package/lib/math/tetrahedralizeAutoMovieDelaunay.d.ts +82 -0
- package/lib/math/tetrahedralizeAutoMovieDelaunay.js +187 -0
- package/lib/math/tetrahedralizeAutoMovieDelaunay.js.map +1 -0
- package/lib/measureAutoMovieGeometryReach.js +2 -4
- package/lib/measureAutoMovieGeometryReach.js.map +1 -1
- package/lib/motion/AirborneTakeoffLinear.d.ts +22 -0
- package/lib/motion/AirborneTakeoffLinear.js +58 -0
- package/lib/motion/AirborneTakeoffLinear.js.map +1 -0
- package/lib/motion/IAutoMovieCrowdAgent.d.ts +113 -0
- package/lib/motion/IAutoMovieCrowdAgent.js +3 -0
- package/lib/motion/IAutoMovieCrowdAgent.js.map +1 -0
- package/lib/motion/IAutoMovieSeededChainFit.d.ts +32 -0
- package/lib/motion/IAutoMovieSeededChainFit.js +3 -0
- package/lib/motion/IAutoMovieSeededChainFit.js.map +1 -0
- package/lib/motion/IAutoMovieSolvedChainPlant.d.ts +20 -0
- package/lib/motion/IFitChainToTargetProps.d.ts +59 -0
- package/lib/motion/MotionTrajectoryStepper.d.ts +100 -0
- package/lib/motion/MotionTrajectoryStepper.js +357 -0
- package/lib/motion/MotionTrajectoryStepper.js.map +1 -0
- package/lib/motion/basisOf.d.ts +18 -0
- package/lib/motion/basisOf.js +25 -0
- package/lib/motion/basisOf.js.map +1 -0
- package/lib/motion/carriedAcceleration.d.ts +43 -0
- package/lib/motion/carriedAcceleration.js +55 -0
- package/lib/motion/carriedAcceleration.js.map +1 -0
- package/lib/motion/carriedRate.d.ts +48 -0
- package/lib/motion/carriedRate.js +60 -0
- package/lib/motion/carriedRate.js.map +1 -0
- package/lib/motion/constants/PLANT_RESIDUAL_EPSILON.d.ts +10 -0
- package/lib/motion/constants/PLANT_RESIDUAL_EPSILON.js +14 -0
- package/lib/motion/constants/PLANT_RESIDUAL_EPSILON.js.map +1 -0
- package/lib/motion/constants/index.d.ts +1 -0
- package/lib/motion/constants/index.js +1 -0
- package/lib/motion/constants/index.js.map +1 -1
- package/lib/motion/fitChainBend.d.ts +23 -0
- package/lib/motion/fitChainBend.js +293 -0
- package/lib/motion/fitChainBend.js.map +1 -0
- package/lib/motion/fitChainToTarget.d.ts +11 -13
- package/lib/motion/fitChainToTarget.js +12 -283
- package/lib/motion/fitChainToTarget.js.map +1 -1
- package/lib/motion/fitHingedChainCandidate.d.ts +16 -4
- package/lib/motion/fitHingedChainCandidate.js +186 -76
- package/lib/motion/fitHingedChainCandidate.js.map +1 -1
- package/lib/motion/fitHingedRotationError.d.ts +31 -0
- package/lib/motion/fitHingedRotationError.js +107 -0
- package/lib/motion/fitHingedRotationError.js.map +1 -0
- package/lib/motion/fitSeededChainToTarget.d.ts +20 -0
- package/lib/motion/fitSeededChainToTarget.js +32 -0
- package/lib/motion/fitSeededChainToTarget.js.map +1 -0
- package/lib/motion/gaitMotion.js +7 -13
- package/lib/motion/gaitMotion.js.map +1 -1
- package/lib/motion/gestureMotion.js +2 -5
- package/lib/motion/gestureMotion.js.map +1 -1
- package/lib/motion/importedNodeClipToAutoMovieMotion.js +6 -9
- package/lib/motion/importedNodeClipToAutoMovieMotion.js.map +1 -1
- package/lib/motion/index.d.ts +15 -0
- package/lib/motion/index.js +15 -0
- package/lib/motion/index.js.map +1 -1
- package/lib/motion/inertializeOffset.d.ts +15 -2
- package/lib/motion/inertializeOffset.js +16 -3
- package/lib/motion/inertializeOffset.js.map +1 -1
- package/lib/motion/inertializePose.d.ts +36 -13
- package/lib/motion/inertializePose.js +122 -43
- package/lib/motion/inertializePose.js.map +1 -1
- package/lib/motion/integrateAirborneRotation.d.ts +151 -0
- package/lib/motion/integrateAirborneRotation.js +204 -0
- package/lib/motion/integrateAirborneRotation.js.map +1 -0
- package/lib/motion/integrateMotionTrajectory.d.ts +117 -0
- package/lib/motion/integrateMotionTrajectory.js +156 -0
- package/lib/motion/integrateMotionTrajectory.js.map +1 -0
- package/lib/motion/orientChainEffector.d.ts +1 -1
- package/lib/motion/orientChainEffector.js +15 -7
- package/lib/motion/orientChainEffector.js.map +1 -1
- package/lib/motion/resolveHydrodynamicForce.d.ts +85 -0
- package/lib/motion/resolveHydrodynamicForce.js +100 -0
- package/lib/motion/resolveHydrodynamicForce.js.map +1 -0
- package/lib/motion/sampleMotion.js +2 -5
- package/lib/motion/sampleMotion.js.map +1 -1
- package/lib/motion/samplePoseVelocity.d.ts +76 -13
- package/lib/motion/samplePoseVelocity.js +126 -38
- package/lib/motion/samplePoseVelocity.js.map +1 -1
- package/lib/motion/smoothMinimum.d.ts +29 -0
- package/lib/motion/smoothMinimum.js +40 -0
- package/lib/motion/smoothMinimum.js.map +1 -0
- package/lib/motion/solveAirborneTakeoff.d.ts +150 -0
- package/lib/motion/solveAirborneTakeoff.js +324 -0
- package/lib/motion/solveAirborneTakeoff.js.map +1 -0
- package/lib/motion/solveDistalTwist.d.ts +62 -0
- package/lib/motion/solveDistalTwist.js +152 -0
- package/lib/motion/solveDistalTwist.js.map +1 -0
- package/lib/motion/speedProfile.d.ts +175 -0
- package/lib/motion/speedProfile.js +261 -0
- package/lib/motion/speedProfile.js.map +1 -0
- package/lib/motion/splitDistalTwist.d.ts +12 -17
- package/lib/motion/splitDistalTwist.js +37 -40
- package/lib/motion/splitDistalTwist.js.map +1 -1
- package/lib/motion/steerAutoMovieCrowd.d.ts +74 -0
- package/lib/motion/steerAutoMovieCrowd.js +249 -0
- package/lib/motion/steerAutoMovieCrowd.js.map +1 -0
- package/lib/motion/steerAutoMovieCrowdGeometry.d.ts +241 -0
- package/lib/motion/steerAutoMovieCrowdGeometry.js +470 -0
- package/lib/motion/steerAutoMovieCrowdGeometry.js.map +1 -0
- package/lib/physics/AutoMovieAir.d.ts +21 -0
- package/lib/physics/AutoMovieAir.js +26 -0
- package/lib/physics/AutoMovieAir.js.map +1 -0
- package/lib/physics/AutoMovieGravity.d.ts +22 -0
- package/lib/physics/AutoMovieGravity.js +30 -0
- package/lib/physics/AutoMovieGravity.js.map +1 -0
- package/lib/physics/IAutoMovieHit.d.ts +11 -7
- package/lib/physics/IAutoMovieProjectile.d.ts +65 -6
- package/lib/physics/IAutoMovieProjectileState.d.ts +6 -4
- package/lib/physics/admitMotionGeometry.js +12 -0
- package/lib/physics/admitMotionGeometry.js.map +1 -1
- package/lib/physics/bindPhysicalWorld.js +16 -4
- package/lib/physics/bindPhysicalWorld.js.map +1 -1
- package/lib/physics/combinePhysicalMassProperties.d.ts +2 -1
- package/lib/physics/combinePhysicalMassProperties.js +8 -90
- package/lib/physics/combinePhysicalMassProperties.js.map +1 -1
- package/lib/physics/deriveCenterOfMass.js +2 -5
- package/lib/physics/deriveCenterOfMass.js.map +1 -1
- package/lib/physics/derivePhysicalProfile.js +7 -5
- package/lib/physics/derivePhysicalProfile.js.map +1 -1
- package/lib/physics/index.d.ts +17 -0
- package/lib/physics/index.js +17 -0
- package/lib/physics/index.js.map +1 -1
- package/lib/physics/markAutoMovieSkeleton.d.ts +33 -0
- package/lib/physics/markAutoMovieSkeleton.js +62 -0
- package/lib/physics/markAutoMovieSkeleton.js.map +1 -0
- package/lib/physics/physicalHullErode.d.ts +25 -0
- package/lib/physics/physicalHullErode.js +54 -0
- package/lib/physics/physicalHullErode.js.map +1 -0
- package/lib/physics/physicalHullFaces.d.ts +56 -0
- package/lib/physics/physicalHullFaces.js +151 -0
- package/lib/physics/physicalHullFaces.js.map +1 -0
- package/lib/physics/physicalHullMass.d.ts +32 -0
- package/lib/physics/physicalHullMass.js +80 -0
- package/lib/physics/physicalHullMass.js.map +1 -0
- package/lib/physics/physicalHullNearest.d.ts +37 -0
- package/lib/physics/physicalHullNearest.js +178 -0
- package/lib/physics/physicalHullNearest.js.map +1 -0
- package/lib/physics/physicalHullSegment.d.ts +34 -0
- package/lib/physics/physicalHullSegment.js +276 -0
- package/lib/physics/physicalHullSegment.js.map +1 -0
- package/lib/physics/physicalInertiaTensor.d.ts +28 -0
- package/lib/physics/physicalInertiaTensor.js +58 -0
- package/lib/physics/physicalInertiaTensor.js.map +1 -0
- package/lib/physics/physicalNativeShape.d.ts +1 -1
- package/lib/physics/physicalNativeShape.js +15 -4
- package/lib/physics/physicalNativeShape.js.map +1 -1
- package/lib/physics/physicalPrincipalAxes.d.ts +28 -0
- package/lib/physics/physicalPrincipalAxes.js +96 -0
- package/lib/physics/physicalPrincipalAxes.js.map +1 -0
- package/lib/physics/physicalShapeBounds.d.ts +2 -1
- package/lib/physics/physicalShapeBounds.js +26 -2
- package/lib/physics/physicalShapeBounds.js.map +1 -1
- package/lib/physics/physicalShapeNearest.d.ts +70 -0
- package/lib/physics/physicalShapeNearest.js +201 -0
- package/lib/physics/physicalShapeNearest.js.map +1 -0
- package/lib/physics/physicalShapeNormal.d.ts +26 -0
- package/lib/physics/physicalShapeNormal.js +70 -0
- package/lib/physics/physicalShapeNormal.js.map +1 -0
- package/lib/physics/physicalShapePairDistance.d.ts +32 -0
- package/lib/physics/physicalShapePairDistance.js +124 -0
- package/lib/physics/physicalShapePairDistance.js.map +1 -0
- package/lib/physics/physicalShapeSegmentDistance.d.ts +16 -20
- package/lib/physics/physicalShapeSegmentDistance.js +18 -70
- package/lib/physics/physicalShapeSegmentDistance.js.map +1 -1
- package/lib/physics/physicalShapeSpan.d.ts +21 -0
- package/lib/physics/physicalShapeSpan.js +55 -0
- package/lib/physics/physicalShapeSpan.js.map +1 -0
- package/lib/physics/physicalShapeSurfaceAnchor.d.ts +1 -1
- package/lib/physics/physicalShapeSurfaceAnchor.js +24 -5
- package/lib/physics/physicalShapeSurfaceAnchor.js.map +1 -1
- package/lib/physics/projectileAt.d.ts +14 -12
- package/lib/physics/projectileAt.js +46 -16
- package/lib/physics/projectileAt.js.map +1 -1
- package/lib/physics/projectileContinue.d.ts +114 -0
- package/lib/physics/projectileContinue.js +189 -0
- package/lib/physics/projectileContinue.js.map +1 -0
- package/lib/physics/projectileDragFlight.d.ts +72 -0
- package/lib/physics/projectileDragFlight.js +166 -0
- package/lib/physics/projectileDragFlight.js.map +1 -0
- package/lib/physics/projectileFirstContact.d.ts +105 -0
- package/lib/physics/projectileFirstContact.js +174 -0
- package/lib/physics/projectileFirstContact.js.map +1 -0
- package/lib/physics/projectileTrajectory.js +3 -2
- package/lib/physics/projectileTrajectory.js.map +1 -1
- package/lib/physics/solveBallisticLaunch.js +2 -1
- package/lib/physics/solveBallisticLaunch.js.map +1 -1
- package/lib/physics/solveMovingLaunch.js +2 -1
- package/lib/physics/solveMovingLaunch.js.map +1 -1
- package/lib/physics/validatePhysicalProfile.js +18 -1
- package/lib/physics/validatePhysicalProfile.js.map +1 -1
- package/lib/populationRuntime/materializeCompiledFormation.js +2 -5
- package/lib/populationRuntime/materializeCompiledFormation.js.map +1 -1
- package/lib/resolve/lowerSkeletonNodes.js +3 -10
- package/lib/resolve/lowerSkeletonNodes.js.map +1 -1
- package/lib/rom/clampJointRom.d.ts +11 -3
- package/lib/rom/clampJointRom.js +43 -3
- package/lib/rom/clampJointRom.js.map +1 -1
- package/lib/rom/clampJointToSkeleton.d.ts +25 -2
- package/lib/rom/clampJointToSkeleton.js +39 -8
- package/lib/rom/clampJointToSkeleton.js.map +1 -1
- package/lib/rom/constants/ANKLE_DORSIFLEXION.d.ts +18 -0
- package/lib/rom/constants/ANKLE_DORSIFLEXION.js +22 -0
- package/lib/rom/constants/ANKLE_DORSIFLEXION.js.map +1 -0
- package/lib/rom/constants/DEFAULT_HUMANOID_ROM.d.ts +28 -0
- package/lib/rom/constants/DEFAULT_HUMANOID_ROM.js +129 -39
- package/lib/rom/constants/DEFAULT_HUMANOID_ROM.js.map +1 -1
- package/lib/rom/constants/ROM_TOLERANCE.d.ts +8 -0
- package/lib/rom/constants/ROM_TOLERANCE.js +12 -0
- package/lib/rom/constants/ROM_TOLERANCE.js.map +1 -0
- package/lib/rom/constants/index.d.ts +2 -0
- package/lib/rom/constants/index.js +2 -0
- package/lib/rom/constants/index.js.map +1 -1
- package/lib/rom/index.d.ts +1 -0
- package/lib/rom/index.js +1 -0
- package/lib/rom/index.js.map +1 -1
- package/lib/rom/scanJointRom.d.ts +62 -0
- package/lib/rom/scanJointRom.js +117 -0
- package/lib/rom/scanJointRom.js.map +1 -0
- package/lib/rom/validateJointRom.d.ts +4 -2
- package/lib/rom/validateJointRom.js +23 -45
- package/lib/rom/validateJointRom.js.map +1 -1
- package/lib/soft/IAutoMovieSoftBodyBoundarySample.d.ts +2 -0
- package/lib/soft/IAutoMovieSoftBodyObserver.d.ts +30 -0
- package/lib/soft/IAutoMovieSoftBodyObserver.js +3 -0
- package/lib/soft/IAutoMovieSoftBodyObserver.js.map +1 -0
- package/lib/soft/applySoftBodyFriction.d.ts +34 -0
- package/lib/soft/applySoftBodyFriction.js +52 -0
- package/lib/soft/applySoftBodyFriction.js.map +1 -0
- package/lib/soft/index.d.ts +6 -0
- package/lib/soft/index.js +6 -0
- package/lib/soft/index.js.map +1 -1
- package/lib/soft/projectSoftCordSelfContact.d.ts +53 -0
- package/lib/soft/projectSoftCordSelfContact.js +172 -0
- package/lib/soft/projectSoftCordSelfContact.js.map +1 -0
- package/lib/soft/simulateSoftBodyCore.d.ts +6 -3
- package/lib/soft/simulateSoftBodyCore.js +108 -16
- package/lib/soft/simulateSoftBodyCore.js.map +1 -1
- package/lib/soft/simulateSoftBodyWithBoundaries.d.ts +3 -2
- package/lib/soft/simulateSoftBodyWithBoundaries.js +10 -3
- package/lib/soft/simulateSoftBodyWithBoundaries.js.map +1 -1
- package/lib/soft/softBodyBudget.js +7 -0
- package/lib/soft/softBodyBudget.js.map +1 -1
- package/lib/soft/softBodyHeldLoads.d.ts +34 -0
- package/lib/soft/softBodyHeldLoads.js +69 -0
- package/lib/soft/softBodyHeldLoads.js.map +1 -0
- package/lib/soft/solveSoftBodyCompliantSweep.d.ts +48 -0
- package/lib/soft/solveSoftBodyCompliantSweep.js +86 -0
- package/lib/soft/solveSoftBodyCompliantSweep.js.map +1 -0
- package/lib/soft/validateSoftAnchors.d.ts +24 -0
- package/lib/soft/validateSoftAnchors.js +74 -0
- package/lib/soft/validateSoftAnchors.js.map +1 -0
- package/lib/soft/validateSoftBodyDomain.js +6 -48
- package/lib/soft/validateSoftBodyDomain.js.map +1 -1
- package/lib/soft/validateSoftBounded.d.ts +20 -0
- package/lib/soft/validateSoftBounded.js +27 -0
- package/lib/soft/validateSoftBounded.js.map +1 -0
- package/lib/soft/validateSoftCompliance.d.ts +30 -0
- package/lib/soft/validateSoftCompliance.js +54 -0
- package/lib/soft/validateSoftCompliance.js.map +1 -0
- package/lib/validation/AffordanceArticulation.d.ts +69 -0
- package/lib/validation/AffordanceArticulation.js +142 -0
- package/lib/validation/AffordanceArticulation.js.map +1 -0
- package/lib/validation/affordanceFollowedTravel.d.ts +19 -0
- package/lib/validation/affordanceFollowedTravel.js +43 -0
- package/lib/validation/affordanceFollowedTravel.js.map +1 -0
- package/lib/validation/affordanceLeadingTravel.d.ts +21 -0
- package/lib/validation/affordanceLeadingTravel.js +99 -0
- package/lib/validation/affordanceLeadingTravel.js.map +1 -0
- package/lib/validation/affordanceTravelRange.d.ts +21 -0
- package/lib/validation/affordanceTravelRange.js +39 -0
- package/lib/validation/affordanceTravelRange.js.map +1 -0
- package/lib/validation/appendShotEventsArtifact.js +12 -0
- package/lib/validation/appendShotEventsArtifact.js.map +1 -1
- package/lib/validation/detectFreeFall.js +2 -1
- package/lib/validation/detectFreeFall.js.map +1 -1
- package/lib/validation/index.d.ts +6 -0
- package/lib/validation/index.js +6 -0
- package/lib/validation/index.js.map +1 -1
- package/lib/validation/markAutoMovieSlip.d.ts +26 -0
- package/lib/validation/markAutoMovieSlip.js +52 -0
- package/lib/validation/markAutoMovieSlip.js.map +1 -0
- package/lib/validation/validateAffordance.d.ts +3 -3
- package/lib/validation/validateAffordance.js +21 -3
- package/lib/validation/validateAffordance.js.map +1 -1
- package/lib/validation/validateAffordanceArticulation.d.ts +19 -0
- package/lib/validation/validateAffordanceArticulation.js +183 -0
- package/lib/validation/validateAffordanceArticulation.js.map +1 -0
- package/lib/validation/validateBody.d.ts +2 -2
- package/lib/validation/validateBody.js +27 -3
- package/lib/validation/validateBody.js.map +1 -1
- package/lib/validation/validateJointConstraint.d.ts +1 -1
- package/lib/validation/validateJointConstraint.js +9 -1
- package/lib/validation/validateJointConstraint.js.map +1 -1
- package/lib/validation/validateModel.js +2 -0
- package/lib/validation/validateModel.js.map +1 -1
- package/lib/worldBlock.js +6 -9
- package/lib/worldBlock.js.map +1 -1
- package/package.json +6 -6
- package/src/IAutoMovieFormationPlacement.ts +4 -3
- package/src/anthropometry/AutoMovieHandAnthropometry.ts +65 -0
- package/src/anthropometry/index.ts +1 -0
- package/src/composition/AutoMovieComposition.ts +34 -7
- package/src/composition/AutoMovieScheduleCut.ts +141 -0
- package/src/composition/AutoMovieScheduleError.ts +108 -0
- package/src/composition/AutoMovieSchedulePlace.ts +253 -0
- package/src/composition/AutoMovieScheduleWalk.ts +215 -0
- package/src/composition/IAutoMovieIntent.ts +9 -7
- package/src/composition/index.ts +5 -0
- package/src/composition/markAutoMovieContacts.ts +79 -0
- package/src/composition/resolveAutoMovieContactEvents.ts +160 -19
- package/src/composition/resolveAutoMovieMutualGoal.ts +146 -72
- package/src/composition/resolveAutoMovieSchedule.ts +106 -145
- package/src/createAutoMovieGeometryActorReader.ts +2 -1
- package/src/describeAutoMovieInstanceSetSubject.ts +2 -5
- package/src/film/compileAttach.ts +2 -5
- package/src/film/compileLaunch.ts +5 -4
- package/src/film/propAnchorFrame.ts +3 -6
- package/src/film/stageScene.ts +3 -10
- package/src/film/staging/lowerLightPlacement.ts +3 -7
- package/src/formationSlotPosition.ts +54 -7
- package/src/geometry/IAutoMovieMark.ts +115 -0
- package/src/geometry/IAutoMovieMeshDefect.ts +39 -0
- package/src/geometry/construction/AutoMovieConstructionAdmission.ts +98 -13
- package/src/geometry/construction/AutoMovieConstructionBridgeRealize.ts +172 -0
- package/src/geometry/construction/AutoMovieConstructionContinuationRealize.ts +3 -0
- package/src/geometry/construction/AutoMovieConstructionPortRealize.ts +48 -16
- package/src/geometry/construction/AutoMovieConstructionSeeds.ts +54 -10
- package/src/geometry/construction/AutoMovieConstructionSplitBand.ts +509 -15
- package/src/geometry/construction/AutoMovieConstructionSplitRealize.ts +278 -0
- package/src/geometry/construction/AutoMovieConstructionSplitSeam.ts +50 -18
- package/src/geometry/construction/AutoMovieConstructionState.ts +13 -0
- package/src/geometry/construction/AutoMovieLoftCapRead.ts +3 -2
- package/src/geometry/construction/AutoMovieLoftCapSource.ts +34 -1
- package/src/geometry/construction/AutoMovieLoftJet.ts +10 -5
- package/src/geometry/construction/AutoMovieLoftPoint.ts +13 -4
- package/src/geometry/construction/AutoMovieLoftRelief.ts +42 -0
- package/src/geometry/construction/AutoMovieLoftViewRead.ts +34 -6
- package/src/geometry/construction/AutoMovieLoftViewSource.ts +4 -2
- package/src/geometry/construction/AutoMovieNaturalSpline.ts +44 -0
- package/src/geometry/construction/AutoMovieSolidBlendChain.ts +34 -20
- package/src/geometry/construction/AutoMovieSolidBodyMerge.ts +2 -0
- package/src/geometry/construction/AutoMovieSolidClip.ts +341 -54
- package/src/geometry/construction/AutoMovieSolidCycle.ts +104 -26
- package/src/geometry/construction/AutoMovieSolidIntersectionWalk.ts +100 -50
- package/src/geometry/construction/AutoMovieSolidJoin.ts +48 -2
- package/src/geometry/construction/AutoMovieSolidMeshConstraints.ts +35 -3
- package/src/geometry/construction/AutoMovieSolidMeshLoop.ts +55 -4
- package/src/geometry/construction/AutoMovieSolidMeshPlan.ts +79 -34
- package/src/geometry/construction/AutoMovieSolidRail.ts +124 -22
- package/src/geometry/construction/AutoMovieSolidRailSolve.ts +116 -25
- package/src/geometry/construction/AutoMovieViewLoft.ts +9 -0
- package/src/geometry/construction/IAutoMovieConstructionCurve.ts +42 -0
- package/src/geometry/construction/IAutoMovieLoftChain.ts +7 -0
- package/src/geometry/construction/IAutoMovieLoftRelief.ts +11 -0
- package/src/geometry/construction/IAutoMovieViewPart.ts +10 -1
- package/src/geometry/construction/faceAutoMovieSolidMesh.ts +76 -15
- package/src/geometry/construction/fairAutoMovieSolidMesh.ts +252 -0
- package/src/geometry/construction/gridAutoMovieSolidMesh.ts +173 -8
- package/src/geometry/construction/index.ts +5 -0
- package/src/geometry/construction/legalizeAutoMovieSolidMesh.ts +28 -2
- package/src/geometry/construction/markAutoMovieConstructionCurves.ts +58 -0
- package/src/geometry/construction/orientAutoMovieSolidChart.ts +32 -7
- package/src/geometry/construction/probeAutoMovieSolidMesh.ts +52 -30
- package/src/geometry/construction/realizeAutoMovieConstruction.ts +47 -5
- package/src/geometry/construction/sampleAutoMovieConstructionCurves.ts +307 -0
- package/src/geometry/index.ts +4 -0
- package/src/geometry/markAutoMovieMeshClearance.ts +69 -0
- package/src/geometry/measureAutoMovieMeshDefects.ts +327 -0
- package/src/index.ts +1 -0
- package/src/kinematics/AutoMovieHumanoidDigitSurfaces.ts +110 -0
- package/src/kinematics/AutoMovieHumanoidSurfaceExtents.ts +81 -0
- package/src/kinematics/AutoMovieHumanoidSurfaceRays.ts +286 -0
- package/src/kinematics/AutoMovieHumanoidSurfaceRegions.ts +189 -0
- package/src/kinematics/IAutoMovieHingedArticulation.ts +21 -3
- package/src/kinematics/IAutoMoviePoseRig.ts +39 -0
- package/src/kinematics/IAutoMovieSwivelNear.ts +26 -0
- package/src/kinematics/IAutoMovieSwivelSeed.ts +19 -0
- package/src/kinematics/alternateRigJointAngles.ts +41 -0
- package/src/kinematics/boxExcludedSwivels.ts +260 -0
- package/src/kinematics/constants/HUMANOID_JOINT_AXES.ts +19 -4
- package/src/kinematics/curlChainUntilContact.ts +35 -8
- package/src/kinematics/decomposeJointRotation.ts +15 -178
- package/src/kinematics/decomposeJointRotationOnBasis.ts +310 -0
- package/src/kinematics/fitDigitDescent.ts +253 -0
- package/src/kinematics/fitDigitToTarget.ts +425 -0
- package/src/kinematics/hingedArmArticulation.ts +402 -116
- package/src/kinematics/hingedArmSwivel.ts +295 -0
- package/src/kinematics/index.ts +24 -0
- package/src/kinematics/jointRomOvershoot.ts +30 -19
- package/src/kinematics/jointToQuaternion.ts +8 -43
- package/src/kinematics/jointToQuaternionOnBasis.ts +84 -0
- package/src/kinematics/markAutoMovieBalance.ts +75 -0
- package/src/kinematics/markAutoMovieRomOvershoot.ts +52 -0
- package/src/kinematics/measureAutoMovieHumanoidBody.ts +31 -9
- package/src/kinematics/normalizeJointAxes.ts +66 -12
- package/src/kinematics/poseJointCodec.ts +148 -0
- package/src/kinematics/resolveAutoMovieBalanceOutcome.ts +293 -0
- package/src/kinematics/resolveAutoMovieCenterOfMass.ts +63 -10
- package/src/kinematics/resolveAutoMovieHumanoidRingModules.ts +434 -0
- package/src/kinematics/resolveAutoMovieHumanoidSurfaces.ts +230 -356
- package/src/kinematics/resolveAutoMovieMomentum.ts +253 -0
- package/src/kinematics/swingTwistBasis.ts +162 -0
- package/src/kinematics/swingTwistExcludedSwivels.ts +204 -0
- package/src/kinematics/swingTwistRange.ts +460 -0
- package/src/kinematics/swingTwistRegion.ts +298 -0
- package/src/kinematics/swivelArcs.ts +245 -0
- package/src/math/Quaternion.ts +42 -2
- package/src/math/Transform.ts +65 -0
- package/src/math/assignAutoMovieMinimumCost.ts +86 -0
- package/src/math/bracketedBisection.ts +51 -0
- package/src/math/bracketedRoot.ts +72 -0
- package/src/math/index.ts +7 -0
- package/src/math/nearestAngleAlias.ts +43 -0
- package/src/math/solveAutoMovieHalfPlaneProgram.ts +288 -0
- package/src/math/tetrahedralizeAutoMovieDelaunay.ts +264 -0
- package/src/measureAutoMovieGeometryReach.ts +2 -4
- package/src/motion/AirborneTakeoffLinear.ts +70 -0
- package/src/motion/IAutoMovieCrowdAgent.ts +121 -0
- package/src/motion/IAutoMovieSeededChainFit.ts +32 -0
- package/src/motion/IAutoMovieSolvedChainPlant.ts +20 -0
- package/src/motion/IFitChainToTargetProps.ts +67 -0
- package/src/motion/MotionTrajectoryStepper.ts +478 -0
- package/src/motion/basisOf.ts +29 -0
- package/src/motion/carriedAcceleration.ts +56 -0
- package/src/motion/carriedRate.ts +61 -0
- package/src/motion/constants/PLANT_RESIDUAL_EPSILON.ts +10 -0
- package/src/motion/constants/index.ts +1 -0
- package/src/motion/fitChainBend.ts +491 -0
- package/src/motion/fitChainToTarget.ts +13 -485
- package/src/motion/fitHingedChainCandidate.ts +281 -148
- package/src/motion/fitHingedRotationError.ts +164 -0
- package/src/motion/fitSeededChainToTarget.ts +34 -0
- package/src/motion/gaitMotion.ts +6 -10
- package/src/motion/gestureMotion.ts +2 -5
- package/src/motion/importedNodeClipToAutoMovieMotion.ts +3 -6
- package/src/motion/index.ts +15 -0
- package/src/motion/inertializeOffset.ts +16 -2
- package/src/motion/inertializePose.ts +158 -53
- package/src/motion/integrateAirborneRotation.ts +334 -0
- package/src/motion/integrateMotionTrajectory.ts +309 -0
- package/src/motion/orientChainEffector.ts +19 -13
- package/src/motion/resolveHydrodynamicForce.ts +143 -0
- package/src/motion/sampleMotion.ts +2 -5
- package/src/motion/samplePoseVelocity.ts +168 -41
- package/src/motion/smoothMinimum.ts +36 -0
- package/src/motion/solveAirborneTakeoff.ts +471 -0
- package/src/motion/solveDistalTwist.ts +256 -0
- package/src/motion/speedProfile.ts +470 -0
- package/src/motion/splitDistalTwist.ts +55 -64
- package/src/motion/steerAutoMovieCrowd.ts +381 -0
- package/src/motion/steerAutoMovieCrowdGeometry.ts +592 -0
- package/src/physics/AutoMovieAir.ts +22 -0
- package/src/physics/AutoMovieGravity.ts +28 -0
- package/src/physics/IAutoMovieHit.ts +13 -7
- package/src/physics/IAutoMovieProjectile.ts +82 -6
- package/src/physics/IAutoMovieProjectileState.ts +10 -4
- package/src/physics/admitMotionGeometry.ts +16 -0
- package/src/physics/bindPhysicalWorld.ts +22 -11
- package/src/physics/combinePhysicalMassProperties.ts +9 -117
- package/src/physics/deriveCenterOfMass.ts +2 -5
- package/src/physics/derivePhysicalProfile.ts +3 -1
- package/src/physics/index.ts +17 -0
- package/src/physics/markAutoMovieSkeleton.ts +69 -0
- package/src/physics/physicalHullErode.ts +72 -0
- package/src/physics/physicalHullFaces.ts +215 -0
- package/src/physics/physicalHullMass.ts +99 -0
- package/src/physics/physicalHullNearest.ts +210 -0
- package/src/physics/physicalHullSegment.ts +338 -0
- package/src/physics/physicalInertiaTensor.ts +75 -0
- package/src/physics/physicalNativeShape.ts +31 -9
- package/src/physics/physicalPrincipalAxes.ts +114 -0
- package/src/physics/physicalShapeBounds.ts +24 -2
- package/src/physics/physicalShapeNearest.ts +287 -0
- package/src/physics/physicalShapeNormal.ts +105 -0
- package/src/physics/physicalShapePairDistance.ts +153 -0
- package/src/physics/physicalShapeSegmentDistance.ts +18 -92
- package/src/physics/physicalShapeSpan.ts +75 -0
- package/src/physics/physicalShapeSurfaceAnchor.ts +33 -14
- package/src/physics/projectileAt.ts +61 -20
- package/src/physics/projectileContinue.ts +287 -0
- package/src/physics/projectileDragFlight.ts +208 -0
- package/src/physics/projectileFirstContact.ts +286 -0
- package/src/physics/projectileTrajectory.ts +6 -5
- package/src/physics/solveBallisticLaunch.ts +2 -1
- package/src/physics/solveMovingLaunch.ts +2 -1
- package/src/physics/validatePhysicalProfile.ts +20 -1
- package/src/populationRuntime/materializeCompiledFormation.ts +3 -6
- package/src/resolve/lowerSkeletonNodes.ts +3 -10
- package/src/rom/clampJointRom.ts +59 -2
- package/src/rom/clampJointToSkeleton.ts +52 -15
- package/src/rom/constants/ANKLE_DORSIFLEXION.ts +20 -0
- package/src/rom/constants/DEFAULT_HUMANOID_ROM.ts +148 -37
- package/src/rom/constants/ROM_TOLERANCE.ts +8 -0
- package/src/rom/constants/index.ts +2 -0
- package/src/rom/index.ts +1 -0
- package/src/rom/scanJointRom.ts +169 -0
- package/src/rom/validateJointRom.ts +69 -74
- package/src/soft/IAutoMovieSoftBodyBoundarySample.ts +3 -0
- package/src/soft/IAutoMovieSoftBodyObserver.ts +36 -0
- package/src/soft/applySoftBodyFriction.ts +65 -0
- package/src/soft/index.ts +6 -0
- package/src/soft/projectSoftCordSelfContact.ts +239 -0
- package/src/soft/simulateSoftBodyCore.ts +127 -15
- package/src/soft/simulateSoftBodyWithBoundaries.ts +16 -2
- package/src/soft/softBodyBudget.ts +11 -0
- package/src/soft/softBodyHeldLoads.ts +85 -0
- package/src/soft/solveSoftBodyCompliantSweep.ts +107 -0
- package/src/soft/validateSoftAnchors.ts +143 -0
- package/src/soft/validateSoftBodyDomain.ts +5 -124
- package/src/soft/validateSoftBounded.ts +42 -0
- package/src/soft/validateSoftCompliance.ts +102 -0
- package/src/validation/AffordanceArticulation.ts +173 -0
- package/src/validation/affordanceFollowedTravel.ts +40 -0
- package/src/validation/affordanceLeadingTravel.ts +108 -0
- package/src/validation/affordanceTravelRange.ts +42 -0
- package/src/validation/appendShotEventsArtifact.ts +26 -0
- package/src/validation/detectFreeFall.ts +3 -2
- package/src/validation/index.ts +6 -0
- package/src/validation/markAutoMovieSlip.ts +65 -0
- package/src/validation/validateAffordance.ts +38 -3
- package/src/validation/validateAffordanceArticulation.ts +311 -0
- package/src/validation/validateBody.ts +80 -3
- package/src/validation/validateJointConstraint.ts +19 -1
- package/src/validation/validateModel.ts +7 -0
- package/src/worldBlock.ts +3 -6
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.physicalInertiaTensor = physicalInertiaTensor;
|
|
4
|
+
const Quaternion_1 = require("../math/Quaternion");
|
|
5
|
+
const Vector3_1 = require("../math/Vector3");
|
|
6
|
+
/**
|
|
7
|
+
* The inertia tensor of rigid parts about one point, in their common frame:
|
|
8
|
+
* each part's principal tensor turned into that frame, `R diag(I) R^T`, plus
|
|
9
|
+
* its mass moved to the point by the parallel-axis theorem, `m (|d|² E - d dᵀ)`
|
|
10
|
+
* with `d` the part's centre less the point.
|
|
11
|
+
*
|
|
12
|
+
* The one owner of that sum in the engine: `combinePhysicalMassProperties`
|
|
13
|
+
* reads it about the parts' combined centre, and the whole-body momentum of a
|
|
14
|
+
* posed body (`resolveAutoMovieMomentum`) about the body's centre of mass. A
|
|
15
|
+
* part may have zero principal moments, a point mass such as a held load; the
|
|
16
|
+
* caller admits its inputs, since what counts as admissible differs between
|
|
17
|
+
* them.
|
|
18
|
+
*
|
|
19
|
+
* @param parts The parts, each with its mass, centre and principal frame in the common frame.
|
|
20
|
+
* @param about The point the tensor is taken about, in the common frame.
|
|
21
|
+
* @returns The symmetric tensor, three rows of three, in the parts' mass and length units (kg m² for SI parts).
|
|
22
|
+
*
|
|
23
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the two terms of the sum, the frame, the units, the zero-moment part and who admits the inputs.
|
|
24
|
+
* @evidence contracts/development/implementation.md#principled-implementation The rotation of a principal tensor into another frame, `R diag(I) R^T`, written as the sum over the principal axes `a_k` of `I_k a_k a_kᵀ`, and the parallel-axis (Huygens-Steiner) theorem for the shift of each part's mass to the point; both are exact, so the sum is the rigid assembly's tensor.
|
|
25
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One accumulation over the parts; the principal frame's axes are read once per part.
|
|
26
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No input is clamped or skipped: a non-finite input yields a non-finite tensor that the caller's admission refuses.
|
|
27
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Linear in the parts: three axis rotations and nine entries per part.
|
|
28
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its arguments with nothing to share between calls.
|
|
29
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Retains nothing; the returned rows are fresh.
|
|
30
|
+
*/
|
|
31
|
+
function physicalInertiaTensor(parts, about) {
|
|
32
|
+
const basis = [
|
|
33
|
+
{ x: 1, y: 0, z: 0 },
|
|
34
|
+
{ x: 0, y: 1, z: 0 },
|
|
35
|
+
{ x: 0, y: 0, z: 1 },
|
|
36
|
+
];
|
|
37
|
+
const axes = ["x", "y", "z"];
|
|
38
|
+
const tensor = Array.from({ length: 3 }, () => [
|
|
39
|
+
0, 0, 0,
|
|
40
|
+
]);
|
|
41
|
+
for (const part of parts) {
|
|
42
|
+
const rotated = basis.map((axis) => Quaternion_1.Quaternion.rotateVector(part.inertiaRotation, axis));
|
|
43
|
+
const displacement = Vector3_1.Vector3.subtract(part.centerOfMass, about);
|
|
44
|
+
for (let row = 0; row < 3; row++)
|
|
45
|
+
for (let column = 0; column < 3; column++) {
|
|
46
|
+
tensor[row][column] +=
|
|
47
|
+
rotated.reduce((sum, direction, index) => sum +
|
|
48
|
+
part.inertia[axes[index]] *
|
|
49
|
+
direction[axes[row]] *
|
|
50
|
+
direction[axes[column]], 0) +
|
|
51
|
+
part.mass *
|
|
52
|
+
((row === column ? Vector3_1.Vector3.dot(displacement, displacement) : 0) -
|
|
53
|
+
displacement[axes[row]] * displacement[axes[column]]);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return tensor;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=physicalInertiaTensor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"physicalInertiaTensor.js","sourceRoot":"","sources":["../../src/physics/physicalInertiaTensor.ts"],"names":[],"mappings":";;;AAEA,mDAAgD;AAChD,6CAA0C;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,+BACE,KAAqD,EACrD,KAAwB;IAExB,MAAM,KAAK,GAAwB;QACjC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;QACpB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;QACpB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;KACrB,CAAC;IACF,MAAM,IAAI,GAAwB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAClD,MAAM,MAAM,GAAe,KAAK,CAAC,IAAI,CAAC,EAA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@
|
|
|
1
1
|
import type { IAutoMoviePhysicalProfile as P } from "@automovie/interface";
|
|
2
2
|
import RAPIER from "@dimforge/rapier3d-compat";
|
|
3
3
|
/**
|
|
4
|
-
* Preserve primitive geometry while avoiding the pinned narrow phase's degenerate zero-axis capsule path.
|
|
4
|
+
* Preserve primitive geometry while avoiding the pinned narrow phase's degenerate zero-axis capsule path; a hull maps to the native convex polyhedron of its vertices.
|
|
5
5
|
*
|
|
6
6
|
* @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Preserve primitive geometry while avoiding the pinned narrow phase's degenerate zero-axis capsule path) as stated in this comment.
|
|
7
7
|
* @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Preserve primitive geometry while avoiding the pinned narrow phase's degenerate zero-axis capsule path) directly over its typed inputs (`shape`) as a fixed number of statements with no loop or recursion in the body; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body performs no validation and relies on its callers. Apart from structural 0, 1 and 2 the body uses no numeric literal.
|
|
@@ -5,8 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.physicalNativeShape = physicalNativeShape;
|
|
7
7
|
const rapier3d_compat_1 = __importDefault(require("@dimforge/rapier3d-compat"));
|
|
8
|
+
const physicalHullFaces_1 = require("./physicalHullFaces");
|
|
8
9
|
/**
|
|
9
|
-
* Preserve primitive geometry while avoiding the pinned narrow phase's degenerate zero-axis capsule path.
|
|
10
|
+
* Preserve primitive geometry while avoiding the pinned narrow phase's degenerate zero-axis capsule path; a hull maps to the native convex polyhedron of its vertices.
|
|
10
11
|
*
|
|
11
12
|
* @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Preserve primitive geometry while avoiding the pinned narrow phase's degenerate zero-axis capsule path) as stated in this comment.
|
|
12
13
|
* @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Preserve primitive geometry while avoiding the pinned narrow phase's degenerate zero-axis capsule path) directly over its typed inputs (`shape`) as a fixed number of statements with no loop or recursion in the body; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body performs no validation and relies on its callers. Apart from structural 0, 1 and 2 the body uses no numeric literal.
|
|
@@ -20,8 +21,18 @@ function physicalNativeShape(shape) {
|
|
|
20
21
|
if (shape.kind === "sphere" ||
|
|
21
22
|
(shape.kind === "capsule" && shape.halfLength === 0))
|
|
22
23
|
return new rapier3d_compat_1.default.Ball(shape.radius);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
if (shape.kind === "capsule")
|
|
25
|
+
return new rapier3d_compat_1.default.Capsule(shape.halfLength, shape.radius);
|
|
26
|
+
if (shape.kind === "box")
|
|
27
|
+
return new rapier3d_compat_1.default.Cuboid(shape.halfExtents.x, shape.halfExtents.y, shape.halfExtents.z);
|
|
28
|
+
if (shape.kind === "hull")
|
|
29
|
+
// Without indices the native shape computes the hull of the vertices.
|
|
30
|
+
return new rapier3d_compat_1.default.ConvexPolyhedron(new Float32Array((0, physicalHullFaces_1.physicalHullFaces)(shape.points).vertices.flatMap((vertex) => [
|
|
31
|
+
vertex.x,
|
|
32
|
+
vertex.y,
|
|
33
|
+
vertex.z,
|
|
34
|
+
])), null);
|
|
35
|
+
shape;
|
|
36
|
+
throw new Error("Unknown physical shape kind");
|
|
26
37
|
}
|
|
27
38
|
//# sourceMappingURL=physicalNativeShape.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"physicalNativeShape.js","sourceRoot":"","sources":["../../src/physics/physicalNativeShape.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"physicalNativeShape.js","sourceRoot":"","sources":["../../src/physics/physicalNativeShape.ts"],"names":[],"mappings":";;;;;;AAIA,gFAA+C;AAE/C,2DAAwD;AAExD;;;;;;;;;;GAUG;AACH,6BAAoC,KAAe;IACjD,IACE,KAAK,CAAC,IAAI,KAAK,QAAQ;QACvB,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,KAAK,CAAC,CAAC;QAEpD,OAAO,IAAI,yBAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;QAC1B,OAAO,IAAI,yBAAM,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5D,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK;QACtB,OAAO,IAAI,yBAAM,CAAC,MAAM,CACtB,KAAK,CAAC,WAAW,CAAC,CAAC,EACnB,KAAK,CAAC,WAAW,CAAC,CAAC,EACnB,KAAK,CAAC,WAAW,CAAC,CAAC,CACpB,CAAC;IACJ,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;QACvB,sEAAsE;QACtE,OAAO,IAAI,yBAAM,CAAC,gBAAgB,CAChC,IAAI,YAAY,CACd,IAAA,qCAAiB,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAC9C,CAAC,MAAyB,EAAY,EAAE,CAAC;YACvC,MAAM,CAAC,CAAC;YACR,MAAM,CAAC,CAAC;YACR,MAAM,CAAC,CAAC;SACT,CACF,CACF,EACD,IAAI,CACL,CAAC;IACJ,KAAqB,CAAC;IACtB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IAutoMovieQuaternion, IAutoMovieVector3 } from "@automovie/interface";
|
|
2
|
+
/**
|
|
3
|
+
* The principal moments and axes of a symmetric 3x3 inertia tensor, by a
|
|
4
|
+
* Jacobi diagonalization of the tensor divided by its largest entry, so the
|
|
5
|
+
* stopping criterion compares dimensionless numbers at any SI scale.
|
|
6
|
+
*
|
|
7
|
+
* The moments come back in ascending order with their axes as a right-handed
|
|
8
|
+
* rotation from the principal frame to the tensor's frame. The input rows are
|
|
9
|
+
* modified in place.
|
|
10
|
+
*
|
|
11
|
+
* @param tensor Three rows of three finite numbers, symmetric, kg m² or any
|
|
12
|
+
* one unit; modified in place.
|
|
13
|
+
* @returns The ascending principal moments in the tensor's unit and the
|
|
14
|
+
* rotation whose columns are their axes.
|
|
15
|
+
* @throws {Error} When every entry is zero.
|
|
16
|
+
*
|
|
17
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the method, the scaling, the order of the moments, the handedness of the axes and that the input is consumed.
|
|
18
|
+
* @evidence contracts/development/implementation.md#principled-implementation Cyclic Jacobi rotations (Golub and Van Loan, Matrix Computations, section 8.5) zero each off-diagonal pair in a fixed order; an entry counts as zero against the machine epsilon of its two diagonal neighbours, and 32 sweeps bound the work far above the handful a 3x3 tensor needs.
|
|
19
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The single owner of the engine's inertia diagonalization: aggregate mass properties and hull solids both read it instead of carrying their own solve.
|
|
20
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No fixed absolute tolerance enters; the non-null assertions index fixed 3x3 arrays the function itself builds or requires.
|
|
21
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Constant work: at most 32 sweeps of three plane rotations over nine entries.
|
|
22
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its tensor; it shares nothing between calls.
|
|
23
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Keeps nothing between calls; its temporaries die with the call.
|
|
24
|
+
*/
|
|
25
|
+
export declare function physicalPrincipalAxes(tensor: number[][]): {
|
|
26
|
+
moments: IAutoMovieVector3;
|
|
27
|
+
rotation: IAutoMovieQuaternion;
|
|
28
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.physicalPrincipalAxes = physicalPrincipalAxes;
|
|
4
|
+
const Vector3_1 = require("../math/Vector3");
|
|
5
|
+
const quaternionFromAutoMovieBasis_1 = require("../math/quaternionFromAutoMovieBasis");
|
|
6
|
+
/**
|
|
7
|
+
* The principal moments and axes of a symmetric 3x3 inertia tensor, by a
|
|
8
|
+
* Jacobi diagonalization of the tensor divided by its largest entry, so the
|
|
9
|
+
* stopping criterion compares dimensionless numbers at any SI scale.
|
|
10
|
+
*
|
|
11
|
+
* The moments come back in ascending order with their axes as a right-handed
|
|
12
|
+
* rotation from the principal frame to the tensor's frame. The input rows are
|
|
13
|
+
* modified in place.
|
|
14
|
+
*
|
|
15
|
+
* @param tensor Three rows of three finite numbers, symmetric, kg m² or any
|
|
16
|
+
* one unit; modified in place.
|
|
17
|
+
* @returns The ascending principal moments in the tensor's unit and the
|
|
18
|
+
* rotation whose columns are their axes.
|
|
19
|
+
* @throws {Error} When every entry is zero.
|
|
20
|
+
*
|
|
21
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the method, the scaling, the order of the moments, the handedness of the axes and that the input is consumed.
|
|
22
|
+
* @evidence contracts/development/implementation.md#principled-implementation Cyclic Jacobi rotations (Golub and Van Loan, Matrix Computations, section 8.5) zero each off-diagonal pair in a fixed order; an entry counts as zero against the machine epsilon of its two diagonal neighbours, and 32 sweeps bound the work far above the handful a 3x3 tensor needs.
|
|
23
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The single owner of the engine's inertia diagonalization: aggregate mass properties and hull solids both read it instead of carrying their own solve.
|
|
24
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No fixed absolute tolerance enters; the non-null assertions index fixed 3x3 arrays the function itself builds or requires.
|
|
25
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Constant work: at most 32 sweeps of three plane rotations over nine entries.
|
|
26
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its tensor; it shares nothing between calls.
|
|
27
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Keeps nothing between calls; its temporaries die with the call.
|
|
28
|
+
*/
|
|
29
|
+
function physicalPrincipalAxes(tensor) {
|
|
30
|
+
// Jacobi's stopping criterion must compare dimensionless entries rather
|
|
31
|
+
// than mixing a fixed unit-one floor with moments measured in kg m².
|
|
32
|
+
const scale = Math.max(...tensor.flat().map((value) => Math.abs(value)));
|
|
33
|
+
if (!(scale > 0))
|
|
34
|
+
throw new Error("Invalid aggregate inertia tensor");
|
|
35
|
+
for (const row of tensor)
|
|
36
|
+
for (let column = 0; column < 3; column++)
|
|
37
|
+
row[column] /= scale;
|
|
38
|
+
const vectors = [
|
|
39
|
+
[1, 0, 0],
|
|
40
|
+
[0, 1, 0],
|
|
41
|
+
[0, 0, 1],
|
|
42
|
+
];
|
|
43
|
+
// Symmetric Jacobi diagonalization, fixed pair order and bounded work.
|
|
44
|
+
for (let sweep = 0; sweep < 32; sweep++)
|
|
45
|
+
for (const [p, q] of [
|
|
46
|
+
[0, 1],
|
|
47
|
+
[0, 2],
|
|
48
|
+
[1, 2],
|
|
49
|
+
]) {
|
|
50
|
+
const off = tensor[p][q];
|
|
51
|
+
if (Math.abs(off) <=
|
|
52
|
+
Number.EPSILON *
|
|
53
|
+
Math.max(Math.abs(tensor[p][p]), Math.abs(tensor[q][q])))
|
|
54
|
+
continue;
|
|
55
|
+
const angle = 0.5 * Math.atan2(2 * off, tensor[q][q] - tensor[p][p]);
|
|
56
|
+
const c = Math.cos(angle);
|
|
57
|
+
const s = Math.sin(angle);
|
|
58
|
+
const pp = tensor[p][p];
|
|
59
|
+
const qq = tensor[q][q];
|
|
60
|
+
tensor[p][p] = c * c * pp - 2 * s * c * off + s * s * qq;
|
|
61
|
+
tensor[q][q] = s * s * pp + 2 * s * c * off + c * c * qq;
|
|
62
|
+
tensor[p][q] = 0;
|
|
63
|
+
tensor[q][p] = 0;
|
|
64
|
+
for (let k = 0; k < 3; k++) {
|
|
65
|
+
if (k !== p && k !== q) {
|
|
66
|
+
const kp = tensor[k][p];
|
|
67
|
+
const kq = tensor[k][q];
|
|
68
|
+
tensor[k][p] = c * kp - s * kq;
|
|
69
|
+
tensor[p][k] = tensor[k][p];
|
|
70
|
+
tensor[k][q] = s * kp + c * kq;
|
|
71
|
+
tensor[q][k] = tensor[k][q];
|
|
72
|
+
}
|
|
73
|
+
const vp = vectors[k][p];
|
|
74
|
+
const vq = vectors[k][q];
|
|
75
|
+
vectors[k][p] = c * vp - s * vq;
|
|
76
|
+
vectors[k][q] = s * vp + c * vq;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const order = [0, 1, 2].sort((a, b) => tensor[a][a] - tensor[b][b]);
|
|
80
|
+
const principal = order.map((index) => ({
|
|
81
|
+
x: vectors[0][index],
|
|
82
|
+
y: vectors[1][index],
|
|
83
|
+
z: vectors[2][index],
|
|
84
|
+
}));
|
|
85
|
+
if (Vector3_1.Vector3.dot(Vector3_1.Vector3.cross(principal[0], principal[1]), principal[2]) < 0)
|
|
86
|
+
principal[2] = Vector3_1.Vector3.scale(principal[2], -1);
|
|
87
|
+
return {
|
|
88
|
+
moments: {
|
|
89
|
+
x: tensor[order[0]][order[0]] * scale,
|
|
90
|
+
y: tensor[order[1]][order[1]] * scale,
|
|
91
|
+
z: tensor[order[2]][order[2]] * scale,
|
|
92
|
+
},
|
|
93
|
+
rotation: (0, quaternionFromAutoMovieBasis_1.quaternionFromAutoMovieBasis)(principal[0], principal[1], principal[2]),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=physicalPrincipalAxes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"physicalPrincipalAxes.js","sourceRoot":"","sources":["../../src/physics/physicalPrincipalAxes.ts"],"names":[],"mappings":";;;AAKA,6CAA0C;AAC1C,uFAAoF;AAEpF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,+BAAsC,MAAkB;IAItD,wEAAwE;IACxE,qEAAqE;IACrE,MAAM,KAAK,GAAW,IAAI,CAAC,GAAG,CAC5B,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC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C,CACH,CAAC;IACF,IACE,iBAAO,CAAC,GAAG,CAAC,iBAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAE,EAAE,SAAS,CAAC,CAAC,CAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAE,CAAC,GAAG,CAAC;QAE3E,SAAS,CAAC,CAAC,CAAC,GAAG,iBAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAClD,OAAO;QACL,OAAO,EAAE;YACP,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAE,CAAE,CAAC,KAAK,CAAC,CAAC,CAAE,CAAE,GAAG,KAAK;YACzC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAE,CAAE,CAAC,KAAK,CAAC,CAAC,CAAE,CAAE,GAAG,KAAK;YACzC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAE,CAAE,CAAC,KAAK,CAAC,CAAC,CAAE,CAAE,GAAG,KAAK;SAC1C;QACD,QAAQ,EAAE,IAAA,2DAA4B,EACpC,SAAS,CAAC,CAAC,CAAE,EACb,SAAS,CAAC,CAAC,CAAE,EACb,SAAS,CAAC,CAAC,CAAE,CACd;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IAutoMovieVector3, IAutoMoviePhysicalProfile as P } from "@automovie/interface";
|
|
2
2
|
/**
|
|
3
|
-
* Exact world axis bounds of the admitted sphere, Y capsule
|
|
3
|
+
* Exact world axis bounds of the admitted sphere, Y capsule, oriented box or
|
|
4
|
+
* convex hull; a hull's bounds are those of its rotated points.
|
|
4
5
|
*
|
|
5
6
|
* @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Exact world axis bounds of the admitted sphere, Y capsule or oriented box) as stated in this comment.
|
|
6
7
|
* @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Exact world axis bounds of the admitted sphere, Y capsule or oriented box) directly over its typed inputs (`pose`, `shape`) as a fixed number of statements with no loop or recursion in the body, delegating to `Vector3.add`, `Quaternion.rotateVector`, `Quaternion.multiply`, `Math.abs`, `Vector3.subtract`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body performs no validation and relies on its callers. Apart from structural 0, 1 and 2 the body uses no numeric literal.
|
|
@@ -4,7 +4,8 @@ exports.physicalShapeBounds = physicalShapeBounds;
|
|
|
4
4
|
const Quaternion_1 = require("../math/Quaternion");
|
|
5
5
|
const Vector3_1 = require("../math/Vector3");
|
|
6
6
|
/**
|
|
7
|
-
* Exact world axis bounds of the admitted sphere, Y capsule
|
|
7
|
+
* Exact world axis bounds of the admitted sphere, Y capsule, oriented box or
|
|
8
|
+
* convex hull; a hull's bounds are those of its rotated points.
|
|
8
9
|
*
|
|
9
10
|
* @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Exact world axis bounds of the admitted sphere, Y capsule or oriented box) as stated in this comment.
|
|
10
11
|
* @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Exact world axis bounds of the admitted sphere, Y capsule or oriented box) directly over its typed inputs (`pose`, `shape`) as a fixed number of statements with no loop or recursion in the body, delegating to `Vector3.add`, `Quaternion.rotateVector`, `Quaternion.multiply`, `Math.abs`, `Vector3.subtract`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body performs no validation and relies on its callers. Apart from structural 0, 1 and 2 the body uses no numeric literal.
|
|
@@ -32,7 +33,26 @@ function physicalShapeBounds(pose, shape) {
|
|
|
32
33
|
z: Math.abs(axis.z) * shape.halfLength + shape.radius,
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
|
-
else {
|
|
36
|
+
else if (shape.kind === "hull") {
|
|
37
|
+
// A hull's bounds are its vertices' bounds about the shape centre.
|
|
38
|
+
let min = { x: Infinity, y: Infinity, z: Infinity };
|
|
39
|
+
let max = { x: -Infinity, y: -Infinity, z: -Infinity };
|
|
40
|
+
for (const point of shape.points) {
|
|
41
|
+
const world = Quaternion_1.Quaternion.rotateVector(rotation, point);
|
|
42
|
+
min = {
|
|
43
|
+
x: Math.min(min.x, world.x),
|
|
44
|
+
y: Math.min(min.y, world.y),
|
|
45
|
+
z: Math.min(min.z, world.z),
|
|
46
|
+
};
|
|
47
|
+
max = {
|
|
48
|
+
x: Math.max(max.x, world.x),
|
|
49
|
+
y: Math.max(max.y, world.y),
|
|
50
|
+
z: Math.max(max.z, world.z),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return { min: Vector3_1.Vector3.add(center, min), max: Vector3_1.Vector3.add(center, max) };
|
|
54
|
+
}
|
|
55
|
+
else if (shape.kind === "box") {
|
|
36
56
|
const x = Quaternion_1.Quaternion.rotateVector(rotation, {
|
|
37
57
|
x: 1,
|
|
38
58
|
y: 0,
|
|
@@ -60,6 +80,10 @@ function physicalShapeBounds(pose, shape) {
|
|
|
60
80
|
Math.abs(z.z) * shape.halfExtents.z,
|
|
61
81
|
};
|
|
62
82
|
}
|
|
83
|
+
else {
|
|
84
|
+
shape;
|
|
85
|
+
throw new Error("Unknown physical shape kind");
|
|
86
|
+
}
|
|
63
87
|
return {
|
|
64
88
|
min: Vector3_1.Vector3.subtract(center, extent),
|
|
65
89
|
max: Vector3_1.Vector3.add(center, extent),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"physicalShapeBounds.js","sourceRoot":"","sources":["../../src/physics/physicalShapeBounds.ts"],"names":[],"mappings":";;;AAKA,mDAAgD;AAChD,6CAA0C;AAE1C
|
|
1
|
+
{"version":3,"file":"physicalShapeBounds.js","sourceRoot":"","sources":["../../src/physics/physicalShapeBounds.ts"],"names":[],"mappings":";;;AAKA,mDAAgD;AAChD,6CAA0C;AAE1C;;;;;;;;;;;GAWG;AACH,6BACE,IAAkB,EAClB,KAAe;IAEf,MAAM,MAAM,GAAsB,iBAAO,CAAC,GAAG,CAC3C,IAAI,CAAC,QAAQ,EACb,uBAAU,CAAC,YAAY,CAAC,IAAI,C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AK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IACD,OAAO;QACL,GAAG,EAAE,iBAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACrC,GAAG,EAAE,iBAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { IAutoMovieVector3, IAutoMoviePhysicalProfile as P } from "@automovie/interface";
|
|
2
|
+
/**
|
|
3
|
+
* Where a world segment comes nearest an admitted sphere, Y capsule,
|
|
4
|
+
* oriented box or convex hull placed by a parent pose: the signed distance,
|
|
5
|
+
* negative when the segment enters the shape, the point of the shape's
|
|
6
|
+
* surface there, the outward normal at that point and the point of the
|
|
7
|
+
* segment. A segment whose two ends coincide is a point, so this is also the
|
|
8
|
+
* point query.
|
|
9
|
+
*
|
|
10
|
+
* The shape's frame is the parent pose composed with the shape's own
|
|
11
|
+
* transform, as in `physicalShapeBounds`. A sphere is its centre and a
|
|
12
|
+
* capsule its axis segment, each widened by the radius, so both reduce to
|
|
13
|
+
* the closest points between two segments (`closestPointsBetweenSegments`,
|
|
14
|
+
* Eberly 2023); the normal runs from the axis point to the segment point. A
|
|
15
|
+
* hull's nearest or deepest segment parameter is exact from
|
|
16
|
+
* `physicalHullSegment`. A box is convex, so its signed distance is convex
|
|
17
|
+
* along the segment, and 44 golden-section steps narrow the segment's unit
|
|
18
|
+
* parameter below 1e-9 before the least of both ends and the two final
|
|
19
|
+
* probes is taken. The point and the normal are read at that parameter from
|
|
20
|
+
* the box's exact signed distance or from `physicalHullNearest`.
|
|
21
|
+
*
|
|
22
|
+
* When the segment passes through a sphere's centre or a capsule's axis, no
|
|
23
|
+
* direction is nearest; the normal is then the shape's local X axis, a
|
|
24
|
+
* direction perpendicular to a capsule's axis.
|
|
25
|
+
*
|
|
26
|
+
* A segment widened by a radius that runs linearly from one end to the other
|
|
27
|
+
* (a tapered capsule, the round cone of a limb that narrows toward its far
|
|
28
|
+
* joint) is read by the same search: its signed distance is the least over
|
|
29
|
+
* the segment's points of the point's signed distance less the radius
|
|
30
|
+
* there. The point's distance to a convex shape is convex along the segment
|
|
31
|
+
* (the distance to a convex set is a convex function and the segment's
|
|
32
|
+
* points are affine in the parameter), and the radius is affine in it, so
|
|
33
|
+
* the difference is convex and the golden-section search finds its minimum
|
|
34
|
+
* for every shape kind, a sphere and a capsule included.
|
|
35
|
+
*
|
|
36
|
+
* @param pose The shape's parent pose, world metres.
|
|
37
|
+
* @param shape The admitted shape.
|
|
38
|
+
* @param a One end of the segment, world metres.
|
|
39
|
+
* @param b The other end, world metres.
|
|
40
|
+
* @param taper The radii the segment is widened by at `a` and at `b`, metres, not negative; absent for the bare segment.
|
|
41
|
+
* @returns The signed distance in metres (less the widening, for a tapered
|
|
42
|
+
* segment), the surface point, the outward unit normal and the segment
|
|
43
|
+
* point, all in the world frame.
|
|
44
|
+
*
|
|
45
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the frame composition, the sign, the point case, the method for each shape kind with its precision, and the convention where no nearest direction exists.
|
|
46
|
+
* @evidence contracts/development/implementation.md#principled-implementation Spheres and capsules are segments widened by a radius, so their nearest points are the engine's exact closest-segment-points query moved out by the radius; a hull segment's parameter is the exact polytope query of `physicalHullSegment`; the signed distance of a convex solid is a convex function, so golden-section search along the segment finds its minimum to 1e-9 of the parameter without missing an entry; a tapered segment subtracts an affine radius from that convex distance, which keeps it convex, so the same search reads it for every kind.
|
|
47
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The single owner of shape proximity: one frame composition and one branch per shape kind, each named, with an exhaustive check. Distance, contact point and contact normal are one reading, so no caller derives a normal from a distance gradient or a point from samples.
|
|
48
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No tolerance is added to the distance; the 44 golden-section steps are the count that narrows a unit interval below 1e-9 (0.618^44 ≈ 6.4e-10), 1e-12 metres is the length below which an offset carries no direction in double arithmetic at body scale, and the shape's dimensions are taken as admitted by the profile.
|
|
49
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Constant work per call: one closest-segment query for a sphere or capsule, one exact segment query and one local evaluation for a hull segment, 47 local evaluations for a box segment, or for any kind under a taper, and one for a point.
|
|
50
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its arguments; callers that query many shapes hold their own placed frames, and a hull's faces are shared by `physicalHullFaces`.
|
|
51
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Keeps nothing between calls; its temporaries die with the call.
|
|
52
|
+
*/
|
|
53
|
+
export declare function physicalShapeNearest(pose: P.ITransform, shape: P.IShape, a: IAutoMovieVector3, b: IAutoMovieVector3, taper?: readonly [number, number]): physicalShapeNearest.IResult;
|
|
54
|
+
/**
|
|
55
|
+
* The reading of one proximity query.
|
|
56
|
+
*
|
|
57
|
+
* @evidence contracts/development/common.md#meaningful-documentation Names the record the proximity owner returns; each member states its frame, unit and sign.
|
|
58
|
+
* @evidence contracts/development/design.md#principled-representation One contact reading as the four quantities that define it, all in the world frame, with no optional member: a distance without its point and normal is the split this record removes.
|
|
59
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface Owned by `physicalShapeNearest`; the distance is read by `physicalShapeSegmentDistance` and the colliders, the point and normal by contact laws.
|
|
60
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts No `any`, `unknown`, index signature or cast; it repeats no type another owner declares.
|
|
61
|
+
*/
|
|
62
|
+
export declare namespace physicalShapeNearest {
|
|
63
|
+
/** Where a segment comes nearest a shape. */
|
|
64
|
+
interface IResult {
|
|
65
|
+
/** Signed distance, metres; negative when the segment enters. */ distance: number;
|
|
66
|
+
/** The nearest point of the shape's surface, world metres. */ point: IAutoMovieVector3;
|
|
67
|
+
/** Outward unit normal of the surface at `point`, world frame. */ normal: IAutoMovieVector3;
|
|
68
|
+
/** The nearest point of the segment, world metres. */ at: IAutoMovieVector3;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.physicalShapeNearest = physicalShapeNearest;
|
|
4
|
+
const Quaternion_1 = require("../math/Quaternion");
|
|
5
|
+
const Vector3_1 = require("../math/Vector3");
|
|
6
|
+
const closestPointsBetweenSegments_1 = require("../math/closestPointsBetweenSegments");
|
|
7
|
+
const physicalHullNearest_1 = require("./physicalHullNearest");
|
|
8
|
+
const physicalHullSegment_1 = require("./physicalHullSegment");
|
|
9
|
+
/**
|
|
10
|
+
* Where a world segment comes nearest an admitted sphere, Y capsule,
|
|
11
|
+
* oriented box or convex hull placed by a parent pose: the signed distance,
|
|
12
|
+
* negative when the segment enters the shape, the point of the shape's
|
|
13
|
+
* surface there, the outward normal at that point and the point of the
|
|
14
|
+
* segment. A segment whose two ends coincide is a point, so this is also the
|
|
15
|
+
* point query.
|
|
16
|
+
*
|
|
17
|
+
* The shape's frame is the parent pose composed with the shape's own
|
|
18
|
+
* transform, as in `physicalShapeBounds`. A sphere is its centre and a
|
|
19
|
+
* capsule its axis segment, each widened by the radius, so both reduce to
|
|
20
|
+
* the closest points between two segments (`closestPointsBetweenSegments`,
|
|
21
|
+
* Eberly 2023); the normal runs from the axis point to the segment point. A
|
|
22
|
+
* hull's nearest or deepest segment parameter is exact from
|
|
23
|
+
* `physicalHullSegment`. A box is convex, so its signed distance is convex
|
|
24
|
+
* along the segment, and 44 golden-section steps narrow the segment's unit
|
|
25
|
+
* parameter below 1e-9 before the least of both ends and the two final
|
|
26
|
+
* probes is taken. The point and the normal are read at that parameter from
|
|
27
|
+
* the box's exact signed distance or from `physicalHullNearest`.
|
|
28
|
+
*
|
|
29
|
+
* When the segment passes through a sphere's centre or a capsule's axis, no
|
|
30
|
+
* direction is nearest; the normal is then the shape's local X axis, a
|
|
31
|
+
* direction perpendicular to a capsule's axis.
|
|
32
|
+
*
|
|
33
|
+
* A segment widened by a radius that runs linearly from one end to the other
|
|
34
|
+
* (a tapered capsule, the round cone of a limb that narrows toward its far
|
|
35
|
+
* joint) is read by the same search: its signed distance is the least over
|
|
36
|
+
* the segment's points of the point's signed distance less the radius
|
|
37
|
+
* there. The point's distance to a convex shape is convex along the segment
|
|
38
|
+
* (the distance to a convex set is a convex function and the segment's
|
|
39
|
+
* points are affine in the parameter), and the radius is affine in it, so
|
|
40
|
+
* the difference is convex and the golden-section search finds its minimum
|
|
41
|
+
* for every shape kind, a sphere and a capsule included.
|
|
42
|
+
*
|
|
43
|
+
* @param pose The shape's parent pose, world metres.
|
|
44
|
+
* @param shape The admitted shape.
|
|
45
|
+
* @param a One end of the segment, world metres.
|
|
46
|
+
* @param b The other end, world metres.
|
|
47
|
+
* @param taper The radii the segment is widened by at `a` and at `b`, metres, not negative; absent for the bare segment.
|
|
48
|
+
* @returns The signed distance in metres (less the widening, for a tapered
|
|
49
|
+
* segment), the surface point, the outward unit normal and the segment
|
|
50
|
+
* point, all in the world frame.
|
|
51
|
+
*
|
|
52
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the frame composition, the sign, the point case, the method for each shape kind with its precision, and the convention where no nearest direction exists.
|
|
53
|
+
* @evidence contracts/development/implementation.md#principled-implementation Spheres and capsules are segments widened by a radius, so their nearest points are the engine's exact closest-segment-points query moved out by the radius; a hull segment's parameter is the exact polytope query of `physicalHullSegment`; the signed distance of a convex solid is a convex function, so golden-section search along the segment finds its minimum to 1e-9 of the parameter without missing an entry; a tapered segment subtracts an affine radius from that convex distance, which keeps it convex, so the same search reads it for every kind.
|
|
54
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The single owner of shape proximity: one frame composition and one branch per shape kind, each named, with an exhaustive check. Distance, contact point and contact normal are one reading, so no caller derives a normal from a distance gradient or a point from samples.
|
|
55
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No tolerance is added to the distance; the 44 golden-section steps are the count that narrows a unit interval below 1e-9 (0.618^44 ≈ 6.4e-10), 1e-12 metres is the length below which an offset carries no direction in double arithmetic at body scale, and the shape's dimensions are taken as admitted by the profile.
|
|
56
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Constant work per call: one closest-segment query for a sphere or capsule, one exact segment query and one local evaluation for a hull segment, 47 local evaluations for a box segment, or for any kind under a taper, and one for a point.
|
|
57
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its arguments; callers that query many shapes hold their own placed frames, and a hull's faces are shared by `physicalHullFaces`.
|
|
58
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Keeps nothing between calls; its temporaries die with the call.
|
|
59
|
+
*/
|
|
60
|
+
function physicalShapeNearest(pose, shape, a, b, taper) {
|
|
61
|
+
const centre = Vector3_1.Vector3.add(pose.position, Quaternion_1.Quaternion.rotateVector(pose.rotation, shape.transform.position));
|
|
62
|
+
const rotation = Quaternion_1.Quaternion.multiply(pose.rotation, shape.transform.rotation);
|
|
63
|
+
if (taper === undefined &&
|
|
64
|
+
(shape.kind === "sphere" || shape.kind === "capsule")) {
|
|
65
|
+
const axis = Quaternion_1.Quaternion.rotateVector(rotation, {
|
|
66
|
+
x: 0,
|
|
67
|
+
y: shape.kind === "capsule" ? shape.halfLength : 0,
|
|
68
|
+
z: 0,
|
|
69
|
+
});
|
|
70
|
+
const closest = (0, closestPointsBetweenSegments_1.closestPointsBetweenSegments)(a, b, Vector3_1.Vector3.subtract(centre, axis), Vector3_1.Vector3.add(centre, axis));
|
|
71
|
+
const normal = closest.distance > 1e-12
|
|
72
|
+
? Vector3_1.Vector3.scale(Vector3_1.Vector3.subtract(closest.pointA, closest.pointB), 1 / closest.distance)
|
|
73
|
+
: Quaternion_1.Quaternion.rotateVector(rotation, { x: 1, y: 0, z: 0 });
|
|
74
|
+
return {
|
|
75
|
+
distance: closest.distance - shape.radius,
|
|
76
|
+
point: Vector3_1.Vector3.add(closest.pointB, Vector3_1.Vector3.scale(normal, shape.radius)),
|
|
77
|
+
normal,
|
|
78
|
+
at: closest.pointA,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
const inverse = Quaternion_1.Quaternion.inverse(rotation);
|
|
82
|
+
const la = Quaternion_1.Quaternion.rotateVector(inverse, Vector3_1.Vector3.subtract(a, centre));
|
|
83
|
+
const lb = Quaternion_1.Quaternion.rotateVector(inverse, Vector3_1.Vector3.subtract(b, centre));
|
|
84
|
+
const local = (p) => {
|
|
85
|
+
if (shape.kind === "hull")
|
|
86
|
+
return (0, physicalHullNearest_1.physicalHullNearest)(shape.points, p);
|
|
87
|
+
if (shape.kind === "box")
|
|
88
|
+
return boxNearest(shape.halfExtents, p);
|
|
89
|
+
if (shape.kind === "sphere" || shape.kind === "capsule")
|
|
90
|
+
return roundNearest(shape.kind === "capsule" ? shape.halfLength : 0, shape.radius, p);
|
|
91
|
+
shape;
|
|
92
|
+
throw new Error("Unknown physical shape kind");
|
|
93
|
+
};
|
|
94
|
+
const along = (t) => ({
|
|
95
|
+
x: la.x + (lb.x - la.x) * t,
|
|
96
|
+
y: la.y + (lb.y - la.y) * t,
|
|
97
|
+
z: la.z + (lb.z - la.z) * t,
|
|
98
|
+
});
|
|
99
|
+
const widened = (t) => taper === undefined ? 0 : taper[0] + (taper[1] - taper[0]) * t;
|
|
100
|
+
const gap = (t) => local(along(t)).distance - widened(t);
|
|
101
|
+
let parameter = 0;
|
|
102
|
+
const point = la.x === lb.x && la.y === lb.y && la.z === lb.z;
|
|
103
|
+
if (!point && shape.kind === "hull" && taper === undefined)
|
|
104
|
+
parameter = (0, physicalHullSegment_1.physicalHullSegment)(shape.points, la, lb);
|
|
105
|
+
else if (!point) {
|
|
106
|
+
const ratio = (Math.sqrt(5) - 1) / 2;
|
|
107
|
+
let lo = 0;
|
|
108
|
+
let hi = 1;
|
|
109
|
+
let c = hi - ratio * (hi - lo);
|
|
110
|
+
let d = lo + ratio * (hi - lo);
|
|
111
|
+
let fc = gap(c);
|
|
112
|
+
let fd = gap(d);
|
|
113
|
+
for (let i = 0; i < 44; i++) {
|
|
114
|
+
if (fc <= fd) {
|
|
115
|
+
hi = d;
|
|
116
|
+
d = c;
|
|
117
|
+
fd = fc;
|
|
118
|
+
c = hi - ratio * (hi - lo);
|
|
119
|
+
fc = gap(c);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
lo = c;
|
|
123
|
+
c = d;
|
|
124
|
+
fc = fd;
|
|
125
|
+
d = lo + ratio * (hi - lo);
|
|
126
|
+
fd = gap(d);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
let least = gap(0);
|
|
130
|
+
for (const [t, value] of [
|
|
131
|
+
[1, gap(1)],
|
|
132
|
+
[c, fc],
|
|
133
|
+
[d, fd],
|
|
134
|
+
])
|
|
135
|
+
if (value < least) {
|
|
136
|
+
least = value;
|
|
137
|
+
parameter = t;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const found = local(along(parameter));
|
|
141
|
+
return {
|
|
142
|
+
distance: found.distance - widened(parameter),
|
|
143
|
+
point: Vector3_1.Vector3.add(centre, Quaternion_1.Quaternion.rotateVector(rotation, found.point)),
|
|
144
|
+
normal: Quaternion_1.Quaternion.rotateVector(rotation, found.normal),
|
|
145
|
+
at: Vector3_1.Vector3.add(a, Vector3_1.Vector3.scale(Vector3_1.Vector3.subtract(b, a), parameter)),
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* The nearest surface point, outward normal and signed distance of an
|
|
150
|
+
* origin-centred box to a point in the box's frame: outside, the point
|
|
151
|
+
* clamped to the box; inside, the projection onto the nearest face.
|
|
152
|
+
*/
|
|
153
|
+
const boxNearest = (h, p) => {
|
|
154
|
+
const q = {
|
|
155
|
+
x: Math.abs(p.x) - h.x,
|
|
156
|
+
y: Math.abs(p.y) - h.y,
|
|
157
|
+
z: Math.abs(p.z) - h.z,
|
|
158
|
+
};
|
|
159
|
+
const outside = Math.hypot(Math.max(q.x, 0), Math.max(q.y, 0), Math.max(q.z, 0));
|
|
160
|
+
const face = q.x >= q.y && q.x >= q.z ? "x" : q.y >= q.z ? "y" : "z";
|
|
161
|
+
const outward = { x: 0, y: 0, z: 0 };
|
|
162
|
+
outward[face] = p[face] < 0 ? -1 : 1;
|
|
163
|
+
if (!(outside > 1e-12)) {
|
|
164
|
+
const point = { ...p };
|
|
165
|
+
point[face] = outward[face] * h[face];
|
|
166
|
+
return { distance: q[face], point, normal: outward };
|
|
167
|
+
}
|
|
168
|
+
const point = {
|
|
169
|
+
x: Math.min(h.x, Math.max(-h.x, p.x)),
|
|
170
|
+
y: Math.min(h.y, Math.max(-h.y, p.y)),
|
|
171
|
+
z: Math.min(h.z, Math.max(-h.z, p.z)),
|
|
172
|
+
};
|
|
173
|
+
return {
|
|
174
|
+
distance: outside,
|
|
175
|
+
point,
|
|
176
|
+
normal: Vector3_1.Vector3.scale(Vector3_1.Vector3.subtract(p, point), 1 / outside),
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* The nearest surface point, outward normal and signed distance of an
|
|
181
|
+
* origin-centred Y capsule (a sphere when its half length is 0) to a point in
|
|
182
|
+
* its frame: the axis point nearest the point, moved out by the radius; the
|
|
183
|
+
* local X axis when the point is on the axis.
|
|
184
|
+
*/
|
|
185
|
+
const roundNearest = (half, radius, p) => {
|
|
186
|
+
const axis = {
|
|
187
|
+
x: 0,
|
|
188
|
+
y: Math.min(half, Math.max(-half, p.y)),
|
|
189
|
+
z: 0,
|
|
190
|
+
};
|
|
191
|
+
const away = Vector3_1.Vector3.length(Vector3_1.Vector3.subtract(p, axis));
|
|
192
|
+
const normal = away > 1e-12
|
|
193
|
+
? Vector3_1.Vector3.scale(Vector3_1.Vector3.subtract(p, axis), 1 / away)
|
|
194
|
+
: { x: 1, y: 0, z: 0 };
|
|
195
|
+
return {
|
|
196
|
+
distance: away - radius,
|
|
197
|
+
point: Vector3_1.Vector3.add(axis, Vector3_1.Vector3.scale(normal, radius)),
|
|
198
|
+
normal,
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
//# sourceMappingURL=physicalShapeNearest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"physicalShapeNearest.js","sourceRoot":"","sources":["../../src/physics/physicalShapeNearest.ts"],"names":[],"mappings":";;;AAMA,mDAAgD;AAChD,6CAA0C;AAC1C,uFAAoF;AACpF,+DAA4D;AAC5D,+DAA4D;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,8BACE,IAAkB,EAClB,KAAe,EACf,CAAoB,EACpB,CAAoB,EACpB,KAAiC;IAEjC,MAAM,MAAM,GAAsB,iBAAO,CAAC,GAAG,CAC3C,IAAI,CAAC,QAAQ,EACb,uBAAU,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CACjE,CAAC;IACF,MAAM,QAAQ,GAAyB,uBAAU,CAAC,QAAQ,CACxD,IAAI,CAAC,QAAQ,EACb,KAAK,CAAC,SAAS,CAAC,QAAQ,CACzB,CAAC;IACF,IACE,KAAK,KAAK,SAAS;QACnB,CAAC,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,EACrD,CAAC;QACD,MAAM,IAAI,GAAsB,uBAAU,CAAC,YAAY,CAAC,QAAQ,EAAE;YAChE,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAClD,CAAC,EAAE,CAAC;SACL,CAAC,CAAC;QACH,MAAM,OAAO,GACX,IAAA,2DAA4B,EAC1B,CAAC,EACD,CAAC,EACD,iBAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,EAC9B,iBAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAC1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