build-dxf 0.1.138 → 0.1.139
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/package.json +1 -1
- package/src/2025/build-dxf/src/api/getSocket.d.ts +1 -0
- package/src/2025/build-dxf/src/demo.d.ts +1 -0
- package/src/{utils → 2025/build-dxf/src/utils}/algorithms/AlignToParallelSegments.d.ts +1 -0
- package/src/2025/build-dxf/src/utils/algorithms/ConstraintSystem.d.ts +17 -0
- package/src/{utils → 2025/build-dxf/src/utils}/algorithms/LineSegmentSpatialHash.d.ts +4 -0
- package/src/{utils → 2025/build-dxf/src/utils}/algorithms/OBB.d.ts +4 -4
- package/src/{utils → 2025/build-dxf/src/utils}/algorithms/PointSpatialHash.d.ts +15 -3
- package/src/{utils → 2025/build-dxf/src/utils}/algorithms/PointUtils.d.ts +11 -0
- package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Polygon.d.ts +4 -4
- package/src/2025/build-dxf/src/utils/algorithms/PolygonUtils.d.ts +9 -0
- package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Rectangle.d.ts +9 -1
- package/src/2025/build-dxf/src/utils/geometry-manager/GeometryManager.d.ts +2 -0
- package/src/build.js +202 -386
- package/src/index.css +4 -0
- package/src/index3.js +359 -8
- package/src/static_assets/libs/LLM.d.ts +43 -0
- /package/src/{App.vue.d.ts → 2025/build-dxf/src/App.vue.d.ts} +0 -0
- /package/src/{api → 2025/build-dxf/src/api}/index.d.ts +0 -0
- /package/src/{api → 2025/build-dxf/src/api}/type.d.ts +0 -0
- /package/src/{components → 2025/build-dxf/src/components}/DragContainer.vue.d.ts +0 -0
- /package/src/{components → 2025/build-dxf/src/components}/NumberEditor.vue.d.ts +0 -0
- /package/src/{constants.d.ts → 2025/build-dxf/src/constants.d.ts} +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/DxfSystem.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/build.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/components/CorrectionDxf.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/components/Dxf.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/components/ThreeVJia.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/components/Variable.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/ClippingLine.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/Command.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DefaultCommand.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DeleteSelectLine.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DrawDoorLine.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DrawHole.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DrawLine.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/DrawWindow.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/ManualDistance.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/MergeLine.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/PointDrag/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/PointDrag/modifyDoor.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/PointDrag/modifyLine.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/PointDrag/modifyWindow.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/PropertiesPanel.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/RayDistance.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/SelectAll.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/TwoLineConnectionLine.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/TwoPointConnection.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/VerticalCorr.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/VerticalCorrContinue.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Command/ViewAngle.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/Editor.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/RenderManager.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/EditorTool/EditorTool.vue.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/EditorTool/EditorToolContent.vue.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/PropertiesPanel.vue.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/components/Button.vue.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/components/Input.vue.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/pages/components/ToolToggle.vue.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/type.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/us-service/DragControlPoint.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/us-service/LineSelector.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/us-service/PointerFollowMove.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/us-service/SnapController.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/editor/utils/Wall2D.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/model3d/components/DxfLineModel.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/model3d/components/WhiteModel.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/model3d/components/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/model3d/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/DomContainer.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/DomEventRegister.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/EventInput.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/ModelDataRender.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/Renderer.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/components/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/plugins/renderer/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/type.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/BayWindowHelper.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/BoundExt.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/DoorFind.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/DoubleWallFinder.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/HeightQuery.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/LineGroupType.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/LoadModel.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/SceneAutoGenerat.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/ThreeVJiaPipeline.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/WallGroupManager.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/WallHole.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/WallHoleDrawData.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/ZHouseMockData.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/DxfDataPlugin.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/DxfDrawPlugin.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/draw-data.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/draw-dxf-image.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/draw-dxf-string.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/cad/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/clipping-double-wall.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/draw-helper.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/find-discrete.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/find-rooms.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/get-win-draw-data.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/axis-align-corr.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/bound-ext.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/build-group/bay-window.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/build-group/double-wall.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/build-group/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/door-space-handle.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/door-to-hole.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/double-wall-alignment.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/init.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/remove-short-double-wall.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/builtin/wall-height-handle.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/line-pipeline/index.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/remove-dangline.d.ts +0 -0
- /package/src/{dxf-system → 2025/build-dxf/src/dxf-system}/utils/tools.d.ts +0 -0
- /package/src/{main.d.ts → 2025/build-dxf/src/main.d.ts} +0 -0
- /package/src/{pages → 2025/build-dxf/src/pages}/DxfPreview.vue.d.ts +0 -0
- /package/src/{pages → 2025/build-dxf/src/pages}/Editor.vue.d.ts +0 -0
- /package/src/{pages → 2025/build-dxf/src/pages}/ExportGLB.vue.d.ts +0 -0
- /package/src/{pages → 2025/build-dxf/src/pages}/ImagePreview.vue.d.ts +0 -0
- /package/src/{pages → 2025/build-dxf/src/pages}/ModelView.vue.d.ts +0 -0
- /package/src/{pages → 2025/build-dxf/src/pages}/Setting.vue.d.ts +0 -0
- /package/src/{pages → 2025/build-dxf/src/pages}/SplitWindow.vue.d.ts +0 -0
- /package/src/{pages → 2025/build-dxf/src/pages}/Todo.vue.d.ts +0 -0
- /package/src/{pages → 2025/build-dxf/src/pages}/WallView.vue.d.ts +0 -0
- /package/src/{pages → 2025/build-dxf/src/pages}/buildJson.vue.d.ts +0 -0
- /package/src/{pages → 2025/build-dxf/src/pages}/modelCarrier/index.vue.d.ts +0 -0
- /package/src/{router → 2025/build-dxf/src/router}/index.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/EventDispatcher.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/AxisAlignCorr.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Box2.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/ConvexHullGraham.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Debouncing.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/LineIndexGenerator.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/LineQueryer.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/LineSegment.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/LineSegmentUtils.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Map.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/MaxiCircles.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/MiniCircles.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/PCSparseOctree.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Pipeline.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Point.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/Quadtree.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/UndirectedGraph.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/UnionFindSet.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/ccw.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/lazy.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/precision.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/stepElimination.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/algorithms/uuid.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/command/CommandFlow.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/command/CommandSystem.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/command/index.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/decorators/measure-time.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/ecs/Component.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/ecs/Container.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/ecs/index.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/index.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/modelScenario/bayWindow.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/modelScenario/scenario.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/three-object-3d/ExtrudeMesh.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/three-object-3d/LineAlignmentGuide.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/three-object-3d/Lines.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/three-object-3d/Lines2.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/three-object-3d/Shape2D.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/GCHandle.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/Gltf.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/StorageHelper.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/clone-user-data.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/create-html.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/create-promise.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/createVueApp.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/download.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/get-json.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/include.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/is-mobile.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/repetitive-task.d.ts +0 -0
- /package/src/{utils → 2025/build-dxf/src/utils}/tools/selectLocal-file.d.ts +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getPjPointAndPathSocketApi: (idRegion: any, resourceType: any) => Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class Variable {
|
|
2
|
+
value: number;
|
|
3
|
+
fixed: boolean;
|
|
4
|
+
constructor(value: number, fixed?: boolean);
|
|
5
|
+
}
|
|
6
|
+
export interface Constraint {
|
|
7
|
+
evaluate(): number[];
|
|
8
|
+
}
|
|
9
|
+
export declare class ConstraintSystem {
|
|
10
|
+
constraints: Constraint[];
|
|
11
|
+
variables: Variable[];
|
|
12
|
+
addConstraint(c: Constraint): void;
|
|
13
|
+
addVariable(v: Variable): void;
|
|
14
|
+
residuals(): number[];
|
|
15
|
+
jacobian(eps?: number): number[][];
|
|
16
|
+
solve(iterations?: number): void;
|
|
17
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Box2 } from './Box2';
|
|
2
2
|
import { LineSegment } from './LineSegment';
|
|
3
3
|
import { Point } from './Point';
|
|
4
|
+
import { Rectangle } from './Rectangle';
|
|
4
5
|
export interface RaycastHit {
|
|
5
6
|
line: LineSegment;
|
|
6
7
|
point: Point;
|
|
@@ -60,6 +61,9 @@ export declare class LineSegmentSpatialHash {
|
|
|
60
61
|
* 查询相交线段
|
|
61
62
|
*/
|
|
62
63
|
queryLine(line: LineSegment, out?: LineSegment[]): LineSegment<Record<string, any>>[];
|
|
64
|
+
private rectangleBounds;
|
|
65
|
+
/** 通过矩形查询 */
|
|
66
|
+
queryRectangle(rectangle: Rectangle, out?: LineSegment[]): LineSegment<Record<string, any>>[];
|
|
63
67
|
private rayIntersectSegment;
|
|
64
68
|
/**
|
|
65
69
|
* 射线检测
|
|
@@ -12,19 +12,19 @@ export declare class OBB extends OBB_ {
|
|
|
12
12
|
* @param box
|
|
13
13
|
* @param position
|
|
14
14
|
* @param rotation
|
|
15
|
-
* @param
|
|
15
|
+
* @param out
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
|
-
static from(box: THREE.Vector3, position: THREE.Vector3, rotation: THREE.Euler | THREE.Quaternion,
|
|
18
|
+
static from(box: THREE.Vector3, position: THREE.Vector3, rotation: THREE.Euler | THREE.Quaternion, out?: OBB): OBB;
|
|
19
19
|
/** 通过2d路径创建
|
|
20
20
|
* @param path
|
|
21
21
|
* @param origin
|
|
22
22
|
* @param height
|
|
23
|
-
* @param
|
|
23
|
+
* @param out
|
|
24
24
|
* @returns
|
|
25
25
|
*/
|
|
26
26
|
static fromByPath2D(path: {
|
|
27
27
|
x: number;
|
|
28
28
|
y: number;
|
|
29
|
-
}[], origin: THREE.Vector3, height: number,
|
|
29
|
+
}[], origin: THREE.Vector3, height: number, out?: OBB): OBB;
|
|
30
30
|
}
|
|
@@ -10,6 +10,11 @@ type Target<T> = {
|
|
|
10
10
|
type NodeSet<T> = Set<Target<T>>;
|
|
11
11
|
export type PvgTarget<T> = Target<T>;
|
|
12
12
|
export type ResultList<T = any> = Array<Target<T>>;
|
|
13
|
+
export type CircleResult<T = any> = {
|
|
14
|
+
point: Point;
|
|
15
|
+
distanceSq: number;
|
|
16
|
+
userData?: T;
|
|
17
|
+
};
|
|
13
18
|
export declare class PointSpatialHash<T = Record<string, any>> {
|
|
14
19
|
map: Map<string, NodeSet<T>>;
|
|
15
20
|
gridSize: number;
|
|
@@ -109,10 +114,17 @@ export declare class PointSpatialHash<T = Record<string, any>> {
|
|
|
109
114
|
point: Point;
|
|
110
115
|
userData: T;
|
|
111
116
|
} | null;
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
117
|
+
/** 通过点,从近到远按圈层搜索
|
|
118
|
+
* 同一圈内不保证距离顺序
|
|
119
|
+
* 返回第一个满足条件的圈层
|
|
120
|
+
*/
|
|
121
|
+
searchByRing(point: Point, fn: (circle: CircleResult<T>[], circleNum: number) => boolean, maxRing?: number): CircleResult<T>[] | null;
|
|
122
|
+
/**
|
|
123
|
+
* @param point
|
|
124
|
+
* @param excludeSelf
|
|
125
|
+
* @returns
|
|
114
126
|
*/
|
|
115
|
-
|
|
127
|
+
findNearest(point: Point, excludeSelf?: boolean): CircleResult<T> | null;
|
|
116
128
|
/**
|
|
117
129
|
* @param point
|
|
118
130
|
*/
|
|
@@ -3,6 +3,7 @@ import { Point } from './Point';
|
|
|
3
3
|
export declare class PointUtils {
|
|
4
4
|
private static _globalPoint;
|
|
5
5
|
static get globalPoint(): Point<Record<string, any>>;
|
|
6
|
+
static getCenter(points: Point[]): Point<Record<string, any>>;
|
|
6
7
|
/** 值网格化
|
|
7
8
|
* @param points
|
|
8
9
|
* @param tolerance
|
|
@@ -33,4 +34,14 @@ export declare class PointUtils {
|
|
|
33
34
|
* @returns
|
|
34
35
|
*/
|
|
35
36
|
static constrainPointToAxis(point: Point, baseLine: LineSegment, normalStartPoint?: Point | null, baseNormalLine?: LineSegment): Point<Record<string, any>>;
|
|
37
|
+
/** 导出为数组
|
|
38
|
+
* @param points
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
static toArray(points: Point[]): Float32Array<ArrayBuffer>;
|
|
42
|
+
/** 导出为数组
|
|
43
|
+
* @param points
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
static fromArray(array: Array<number> | Float32Array): Point<Record<string, any>>[];
|
|
36
47
|
}
|
|
@@ -45,6 +45,10 @@ export declare class Polygon<T = any> extends Array<Point<T>> {
|
|
|
45
45
|
* @param width
|
|
46
46
|
*/
|
|
47
47
|
closedExpansion(width: number, scale?: number): this | null;
|
|
48
|
+
/** 通过线段分割
|
|
49
|
+
* @param line
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
48
52
|
clipByLine(line: LineSegment): Polygon<Record<string, any>>[];
|
|
49
53
|
/**
|
|
50
54
|
* 获取点相对于多边形的位置
|
|
@@ -91,10 +95,6 @@ export declare class Polygon<T = any> extends Array<Point<T>> {
|
|
|
91
95
|
* @param polygon
|
|
92
96
|
*/
|
|
93
97
|
difference(polygons: Polygon | Polygon[], scale?: number): boolean;
|
|
94
|
-
/** 拆分为凸包
|
|
95
|
-
* @returns
|
|
96
|
-
*/
|
|
97
|
-
splitConvexHull(): Polygon<Record<string, any>>[] | null;
|
|
98
98
|
/** 包围盒检测
|
|
99
99
|
* @param box
|
|
100
100
|
* @returns
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LineSegment } from './LineSegment';
|
|
2
|
+
import { Polygon } from './Polygon';
|
|
3
|
+
export declare class PolygonUtils {
|
|
4
|
+
/** 拆分为凸包
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
static splitConvexHull(ploy: Polygon): Polygon<Record<string, any>>[] | null;
|
|
8
|
+
static splitByLine(lines: LineSegment[], clipLine: LineSegment): LineSegment[][];
|
|
9
|
+
}
|
|
@@ -27,6 +27,14 @@ export declare class Rectangle {
|
|
|
27
27
|
* @returns 是否完全在矩形内部
|
|
28
28
|
*/
|
|
29
29
|
containsLineSegment(line: LineSegment): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 获取所有点在轴上的投影,并且返回区间
|
|
32
|
+
* @param rect
|
|
33
|
+
* @param axis
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
private projectRectangle;
|
|
37
|
+
private isProjectionOverlap;
|
|
30
38
|
/**
|
|
31
39
|
* 判断矩形是否与矩形相交
|
|
32
40
|
* @description 使用分离轴定理
|
|
@@ -43,7 +51,7 @@ export declare class Rectangle {
|
|
|
43
51
|
*
|
|
44
52
|
* @returns
|
|
45
53
|
*/
|
|
46
|
-
toBox(): Box2;
|
|
54
|
+
toBox(out?: Box2): Box2;
|
|
47
55
|
/**
|
|
48
56
|
*
|
|
49
57
|
* @param line
|