@nnepoch/dtc-sdk 3.0.11 → 3.0.13
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/dist/browser/dtc-sdk-3.0.13.js +2 -0
- package/dist/cjs/index.cjs +4 -4
- package/dist/cjs/index.d.cts +329 -9
- package/dist/esm/index.d.ts +329 -9
- package/dist/esm/index.js +4 -4
- package/docs/api/api/classes/ApiRegistryError.md +2 -2
- package/docs/api/api/classes/Camera.md +3 -3
- package/docs/api/api/classes/GizmosTool.md +94 -0
- package/docs/api/api/classes/HeatMap.md +217 -0
- package/docs/api/api/classes/HighLighterEffect.md +6 -0
- package/docs/api/api/classes/Layer.md +103 -1
- package/docs/api/api/classes/Model.md +58 -0
- package/docs/api/api/classes/Navigation.md +618 -0
- package/docs/api/api/classes/PathPatrol.md +8 -4
- package/docs/api/api/classes/PointEditor.md +265 -0
- package/docs/api/api/classes/PointIcon.md +275 -0
- package/docs/api/api/classes/SpatialQuery.md +175 -0
- package/docs/api/api/classes/TimeLine.md +4 -0
- package/docs/api/api/classes/TrainSimulate.md +250 -0
- package/docs/api/api/classes/WeatherSystem.md +55 -6
- package/docs/api/api/classes/WebView.md +61 -0
- package/docs/api/api/index.md +11 -0
- package/docs/api/api/interfaces/ApiInstanceMap.md +52 -0
- package/docs/api/api/interfaces/ApiRegistryContext.md +21 -1
- package/docs/api/api/interfaces/PointIconIdsRequest.md +9 -0
- package/docs/api/api/interfaces/PointIconVisibilityResult.md +31 -0
- package/docs/api/api/type-aliases/ApiModuleFactory.md +1 -1
- package/docs/api/api/type-aliases/PointIconIdsInput.md +5 -0
- package/docs/api/application/DTCEngine/classes/DTCEngine.md +72 -0
- package/docs/api/application/DTCEngine/interfaces/DTCEngineOptions.md +2 -2
- package/docs/api/index.md +1 -1
- package/docs/api/typedoc-sidebar.json +260 -0
- package/docs/api/types/enumerations/FilterMode.md +21 -0
- package/docs/api/types/enumerations/GizmoType.md +37 -0
- package/docs/api/types/enumerations/TrainBehavior.md +29 -0
- package/docs/api/types/index.md +54 -0
- package/docs/api/types/interfaces/AnimationGetLengthRequest.md +1 -1
- package/docs/api/types/interfaces/AnimationPlayRequest.md +5 -5
- package/docs/api/types/interfaces/AnimationSetSpeedRequest.md +1 -1
- package/docs/api/types/interfaces/AnimationStartLoopRequest.md +4 -4
- package/docs/api/types/interfaces/AnimationStopLoopRequest.md +1 -1
- package/docs/api/types/interfaces/AnimationStopRequest.md +1 -1
- package/docs/api/types/interfaces/ApiRequestEnvelope.md +1 -1
- package/docs/api/types/interfaces/ApiResponseEnvelope.md +3 -3
- package/docs/api/types/interfaces/AuthSessionSnapshot.md +4 -4
- package/docs/api/types/interfaces/BuildingFloorCancelOptions.md +11 -0
- package/docs/api/types/interfaces/BuildingFloorItem.md +29 -0
- package/docs/api/types/interfaces/BuildingFloorOverview.md +21 -0
- package/docs/api/types/interfaces/BuildingFloorOverviewOptions.md +19 -0
- package/docs/api/types/interfaces/BuildingFloorRegistration.md +37 -0
- package/docs/api/types/interfaces/BuildingFloorRegistrationResult.md +11 -0
- package/docs/api/types/interfaces/BuildingFloorState.md +35 -0
- package/docs/api/types/interfaces/BuildingFloorStateOptions.md +11 -0
- package/docs/api/types/interfaces/BuildingFloorSwitchOptions.md +25 -0
- package/docs/api/types/interfaces/BuildingFloorTransitionResult.md +43 -0
- package/docs/api/types/interfaces/BuildingFloorViewPoint.md +37 -0
- package/docs/api/types/interfaces/CameraFlyByPathRequest.md +4 -4
- package/docs/api/types/interfaces/CameraFlyToTargetRequest.md +11 -3
- package/docs/api/types/interfaces/CameraLookAtRequest.md +7 -7
- package/docs/api/types/interfaces/CameraObjFollowRequest.md +3 -3
- package/docs/api/types/interfaces/CenterConnectResult.md +4 -4
- package/docs/api/types/interfaces/CenterEnvelope.md +4 -4
- package/docs/api/types/interfaces/CenterServiceInfo.md +5 -5
- package/docs/api/types/interfaces/CenterTokenAuthorizeResult.md +1 -1
- package/docs/api/types/interfaces/DlssSetEnableRequest.md +2 -2
- package/docs/api/types/interfaces/DlssSetQualityRequest.md +1 -1
- package/docs/api/types/interfaces/EngineConfig.md +34 -18
- package/docs/api/types/interfaces/GizmosStartSimpleRequest.md +21 -0
- package/docs/api/types/interfaces/HeatMapConfigRequest.md +53 -0
- package/docs/api/types/interfaces/HeatMapCreateRequest.md +85 -0
- package/docs/api/types/interfaces/HeatMapPointRequest.md +21 -0
- package/docs/api/types/interfaces/HeatMapRemoveRequest.md +21 -0
- package/docs/api/types/interfaces/HighLighterRemoveHighLightModelRequest.md +1 -1
- package/docs/api/types/interfaces/HighLighterSetHighLightModelRequest.md +1 -1
- package/docs/api/types/interfaces/LayerAddRequest.md +14 -6
- package/docs/api/types/interfaces/LayerChildElementRequest.md +1 -1
- package/docs/api/types/interfaces/LayerModelAddRequest.md +19 -7
- package/docs/api/types/interfaces/LayerPOIAddRequest.md +22 -14
- package/docs/api/types/interfaces/LayerResetPOINameRequest.md +21 -0
- package/docs/api/types/interfaces/LayerSelectorRequest.md +1 -1
- package/docs/api/types/interfaces/LayerShowUIPopRequest.md +5 -5
- package/docs/api/types/interfaces/LayerUpdatePOINameRequest.md +37 -0
- package/docs/api/types/interfaces/ModelAddRequest.md +5 -5
- package/docs/api/types/interfaces/ModelPOIAddRequest.md +3 -3
- package/docs/api/types/interfaces/ModelPOIUpdateRequest.md +4 -4
- package/docs/api/types/interfaces/ModelSelectorRequest.md +1 -1
- package/docs/api/types/interfaces/ModelSetVisibleByAttributeRequest.md +37 -0
- package/docs/api/types/interfaces/ModelSetVisibleByTagsRequest.md +1 -1
- package/docs/api/types/interfaces/ModelSetVisibleRequest.md +2 -2
- package/docs/api/types/interfaces/ModelTransformNodeRequest.md +1 -1
- package/docs/api/types/interfaces/ModelTransformRestoreRequest.md +1 -1
- package/docs/api/types/interfaces/ModelTransformRotateByTargetRequest.md +7 -7
- package/docs/api/types/interfaces/ModelTransformRotateRequest.md +1 -1
- package/docs/api/types/interfaces/ModelTransformScaleRequest.md +2 -2
- package/docs/api/types/interfaces/ModelTransformStartMoveRequest.md +5 -5
- package/docs/api/types/interfaces/NavigationMeshNavRequest.md +121 -0
- package/docs/api/types/interfaces/NavigationNavByPathRequest.md +61 -0
- package/docs/api/types/interfaces/NavigationNodeRequest.md +21 -0
- package/docs/api/types/interfaces/NavigationUpdateMeshNavRequest.md +45 -0
- package/docs/api/types/interfaces/NavigationUpdateNavPathRequest.md +45 -0
- package/docs/api/types/interfaces/NavigationUpdateSpeedRequest.md +27 -0
- package/docs/api/types/interfaces/NetworkAdaptationActionStep.md +1 -1
- package/docs/api/types/interfaces/NetworkAdaptationState.md +1 -1
- package/docs/api/types/interfaces/NetworkDecisionTrace.md +2 -2
- package/docs/api/types/interfaces/NetworkDiagnosticsSnapshot.md +2 -2
- package/docs/api/types/interfaces/NetworkMetricsSnapshot.md +7 -7
- package/docs/api/types/interfaces/PathPatrolAddRequest.md +18 -10
- package/docs/api/types/interfaces/PathPatrolNodeRequest.md +1 -1
- package/docs/api/types/interfaces/PathPatrolSetTimeNodeRequest.md +3 -3
- package/docs/api/types/interfaces/PathPatrolUpdateRequest.md +5 -5
- package/docs/api/types/interfaces/PointEditorAddRequest.md +149 -0
- package/docs/api/types/interfaces/PointEditorCategory.md +29 -0
- package/docs/api/types/interfaces/PointEditorClientPosition.md +21 -0
- package/docs/api/types/interfaces/PointEditorDeleteRequest.md +21 -0
- package/docs/api/types/interfaces/PointEditorDeleteResult.md +21 -0
- package/docs/api/types/interfaces/PointEditorResource.md +37 -0
- package/docs/api/types/interfaces/PointEditorScreenPosition.md +21 -0
- package/docs/api/types/interfaces/PointEditorVector.md +29 -0
- package/docs/api/types/interfaces/PopupAddRequest.md +2 -2
- package/docs/api/types/interfaces/PopupItemRequest.md +5 -5
- package/docs/api/types/interfaces/PopupRemoveRequest.md +2 -2
- package/docs/api/types/interfaces/PopupShowRequest.md +3 -3
- package/docs/api/types/interfaces/PopupSyncInfoRequest.md +2 -2
- package/docs/api/types/interfaces/QosEvent.md +5 -5
- package/docs/api/types/interfaces/QosRuntimeContext.md +4 -4
- package/docs/api/types/interfaces/ResolvedEngineConfig.md +17 -5
- package/docs/api/types/interfaces/ScreenSetSceneFPSRequest.md +1 -1
- package/docs/api/types/interfaces/ScreenSetSceneRenderBitrateRequest.md +1 -1
- package/docs/api/types/interfaces/ScreenSetScreenResolutionRequest.md +2 -2
- package/docs/api/types/interfaces/SignallingAllocateResponse.md +4 -4
- package/docs/api/types/interfaces/SpatialQueryLayerByModelBoxRequest.md +29 -0
- package/docs/api/types/interfaces/SpatialQueryLayerByModelRequest.md +53 -0
- package/docs/api/types/interfaces/SpatialQueryLayerByPositionRequest.md +45 -0
- package/docs/api/types/interfaces/StandardResponse.md +1 -1
- package/docs/api/types/interfaces/TimelineNodeRequest.md +2 -2
- package/docs/api/types/interfaces/TimelinePlayRequest.md +6 -6
- package/docs/api/types/interfaces/TimelineSetSpeedRequest.md +3 -3
- package/docs/api/types/interfaces/TimelineStopRequest.md +5 -5
- package/docs/api/types/interfaces/TrainSimulateSetCameraFollowTrainRequest.md +29 -0
- package/docs/api/types/interfaces/TrainSimulateSetTrainBehaviorRequest.md +29 -0
- package/docs/api/types/interfaces/TrainSimulateSetTrainVolumeRequest.md +29 -0
- package/docs/api/types/interfaces/TrainSimulateStartTrainRequest.md +77 -0
- package/docs/api/types/interfaces/UIPOIEnableOverlapRequest.md +1 -1
- package/docs/api/types/interfaces/Vector2JsonInput.md +15 -0
- package/docs/api/types/interfaces/WeatherChangeSeasonRequest.md +1 -1
- package/docs/api/types/interfaces/WeatherOpenCameraFogRequest.md +8 -8
- package/docs/api/types/interfaces/WeatherSetAnimateTimeOfDayRequest.md +3 -3
- package/docs/api/types/interfaces/WeatherSetSceneTimeRequest.md +1 -1
- package/docs/api/types/interfaces/WeatherSetTimeSyncRequest.md +1 -1
- package/docs/api/types/interfaces/WeatherSetVolumeRequest.md +13 -0
- package/docs/api/types/interfaces/WeatherTypeRequest.md +2 -8
- package/docs/api/types/interfaces/WebViewUpdateRequest.md +29 -0
- package/docs/api/types/type-aliases/ApiCallback.md +1 -1
- package/docs/api/types/type-aliases/BuildingFloorFocusMode.md +5 -0
- package/docs/api/types/type-aliases/BuildingFloorInput.md +7 -0
- package/docs/api/types/type-aliases/BuildingFloorRuntimeStatus.md +5 -0
- package/docs/api/types/type-aliases/BuildingFloorTransitionStatus.md +5 -0
- package/docs/api/types/type-aliases/PointEditorCreateCallback.md +7 -0
- package/docs/api/types/type-aliases/PointEditorPoint.md +7 -0
- package/docs/api/types/type-aliases/PointEditorUpdateRequest.md +15 -0
- package/docs/api/types/type-aliases/Vector2Input.md +5 -0
- package/package.json +1 -1
- package/dist/browser/dtc-sdk-3.0.11.js +0 -2
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
[@nnepoch/dtc-sdk](../../index.md) / [api](../index.md) / PointEditor
|
|
2
|
+
|
|
3
|
+
# Class: PointEditor
|
|
4
|
+
|
|
5
|
+
MODEL 打点 API,复用既有场景对象;不读写平台 JSON、PointTool 文件或修改 MQTT 流程。
|
|
6
|
+
PointTool 本地工作台对象仍由其自身管理;本期不支持独立 POI。
|
|
7
|
+
|
|
8
|
+
## Agent Title
|
|
9
|
+
|
|
10
|
+
模型点位编辑
|
|
11
|
+
|
|
12
|
+
## Agent Capabilities
|
|
13
|
+
|
|
14
|
+
按坐标创建点位, 点击创建点位, 拖放创建点位, 落点坐标换算, 取消点位放置, 局部更新点位, 批量删除点位
|
|
15
|
+
|
|
16
|
+
## Extends
|
|
17
|
+
|
|
18
|
+
- `BaseApi`
|
|
19
|
+
|
|
20
|
+
## Methods
|
|
21
|
+
|
|
22
|
+
### addPoint()
|
|
23
|
+
|
|
24
|
+
> **addPoint**(`payload`, `callback?`): `Promise`\<[`PointEditorPoint`](../../types/type-aliases/PointEditorPoint.md)\>
|
|
25
|
+
|
|
26
|
+
创建模型点位;未传 position/screenPosition 时等待视频区域的一次有效点击,可按 Escape/右键取消。
|
|
27
|
+
默认显示模型和附属 POI,缩放为 (1,1,1),旋转为 (0,0,0)。
|
|
28
|
+
|
|
29
|
+
#### Parameters
|
|
30
|
+
|
|
31
|
+
| Parameter | Type | Description |
|
|
32
|
+
| ------ | ------ | ------ |
|
|
33
|
+
| `payload` | [`PointEditorAddRequest`](../../types/interfaces/PointEditorAddRequest.md) | 网页分组、全局 ID、坐标及 UE 资源。 |
|
|
34
|
+
| `callback?` | [`PointEditorCreateCallback`](../../types/type-aliases/PointEditorCreateCallback.md) | 成功收到实际点位;失败收到 Error。 |
|
|
35
|
+
|
|
36
|
+
#### Returns
|
|
37
|
+
|
|
38
|
+
`Promise`\<[`PointEditorPoint`](../../types/type-aliases/PointEditorPoint.md)\>
|
|
39
|
+
|
|
40
|
+
UE 实际创建的点位,不是通用响应信封。
|
|
41
|
+
|
|
42
|
+
#### Agent Side Effects
|
|
43
|
+
|
|
44
|
+
write
|
|
45
|
+
|
|
46
|
+
#### Agent Preconditions
|
|
47
|
+
|
|
48
|
+
已建立 WebRTC 连接,UE CoreModules 支持 sdk3 点位编辑
|
|
49
|
+
|
|
50
|
+
#### Agent Risk Level
|
|
51
|
+
|
|
52
|
+
medium
|
|
53
|
+
|
|
54
|
+
#### Agent Example
|
|
55
|
+
|
|
56
|
+
#### Example
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
const point = await dtcEngine.PointEditor.addPoint({
|
|
60
|
+
parentId: 'sdk3-point-editor-test', id: 'G-test-1', type: 'MODEL',
|
|
61
|
+
position: { x: 120, y: 30, z: 5 },
|
|
62
|
+
resource: { path: '/Game/Devices/BP_Camera.BP_Camera_C' }
|
|
63
|
+
});
|
|
64
|
+
console.log(point.position);
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
***
|
|
68
|
+
|
|
69
|
+
### addPointByDrag()
|
|
70
|
+
|
|
71
|
+
> **addPointByDrag**(`payload`, `callback?`): `Promise`\<[`PointEditorPoint`](../../types/type-aliases/PointEditorPoint.md)\>
|
|
72
|
+
|
|
73
|
+
拖放创建;使用 drop 当时保存的 screenPosition 或显式经纬高,不读取当前或上一次鼠标位置。
|
|
74
|
+
|
|
75
|
+
#### Parameters
|
|
76
|
+
|
|
77
|
+
| Parameter | Type | Description |
|
|
78
|
+
| ------ | ------ | ------ |
|
|
79
|
+
| `payload` | [`PointEditorAddRequest`](../../types/interfaces/PointEditorAddRequest.md) | 点位参数及 position 或 screenPosition(二选一)。 |
|
|
80
|
+
| `callback?` | [`PointEditorCreateCallback`](../../types/type-aliases/PointEditorCreateCallback.md) | 成功收到实际点位;失败收到 Error。 |
|
|
81
|
+
|
|
82
|
+
#### Returns
|
|
83
|
+
|
|
84
|
+
`Promise`\<[`PointEditorPoint`](../../types/type-aliases/PointEditorPoint.md)\>
|
|
85
|
+
|
|
86
|
+
UE 实际创建的点位。
|
|
87
|
+
|
|
88
|
+
#### Agent Side Effects
|
|
89
|
+
|
|
90
|
+
write
|
|
91
|
+
|
|
92
|
+
#### Agent Preconditions
|
|
93
|
+
|
|
94
|
+
已建立 WebRTC 连接;必须提供 position 或 drop 时记录的 screenPosition
|
|
95
|
+
|
|
96
|
+
#### Agent Risk Level
|
|
97
|
+
|
|
98
|
+
medium
|
|
99
|
+
|
|
100
|
+
#### Agent Example
|
|
101
|
+
|
|
102
|
+
#### Example
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
await dtcEngine.PointEditor.addPointByDrag({ ...point, id: 'G-copy-1' }, (result) => {
|
|
106
|
+
if (result instanceof Error) return console.error(result);
|
|
107
|
+
console.log(result.position);
|
|
108
|
+
});
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
***
|
|
112
|
+
|
|
113
|
+
### getScreenPosition()
|
|
114
|
+
|
|
115
|
+
> **getScreenPosition**(`payload`): [`PointEditorScreenPosition`](../../types/interfaces/PointEditorScreenPosition.md)
|
|
116
|
+
|
|
117
|
+
在实际 drop 事件中同步换算位置,随后可等待后端保存;不在等待结束后重新读取鼠标。
|
|
118
|
+
校验有效视频区域并排除 contain 黑边,支持页面偏移、滚动及轴对齐 CSS 缩放。
|
|
119
|
+
|
|
120
|
+
#### Parameters
|
|
121
|
+
|
|
122
|
+
| Parameter | Type | Description |
|
|
123
|
+
| ------ | ------ | ------ |
|
|
124
|
+
| `payload` | [`PointEditorClientPosition`](../../types/interfaces/PointEditorClientPosition.md) | 事件的 clientX/clientY,不是 pageX/pageY。 |
|
|
125
|
+
|
|
126
|
+
#### Returns
|
|
127
|
+
|
|
128
|
+
[`PointEditorScreenPosition`](../../types/interfaces/PointEditorScreenPosition.md)
|
|
129
|
+
|
|
130
|
+
视频完整图像中的归一化坐标。
|
|
131
|
+
|
|
132
|
+
#### Agent Side Effects
|
|
133
|
+
|
|
134
|
+
read
|
|
135
|
+
|
|
136
|
+
#### Agent Preconditions
|
|
137
|
+
|
|
138
|
+
视频已就绪,必须使用真实 drop 事件坐标
|
|
139
|
+
|
|
140
|
+
#### Agent Risk Level
|
|
141
|
+
|
|
142
|
+
low
|
|
143
|
+
|
|
144
|
+
#### Agent Example
|
|
145
|
+
|
|
146
|
+
#### Example
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
const screenPosition = dtcEngine.PointEditor.getScreenPosition({ clientX: event.clientX, clientY: event.clientY });
|
|
150
|
+
await savePointToBackend();
|
|
151
|
+
await dtcEngine.PointEditor.addPointByDrag({ ...payload, screenPosition });
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
***
|
|
155
|
+
|
|
156
|
+
### cancelPlacement()
|
|
157
|
+
|
|
158
|
+
> **cancelPlacement**(): `Promise`\<`void`\>
|
|
159
|
+
|
|
160
|
+
取消正在等待网页点击的放置操作并恢复输入;不撤销已经发送到 UE 的创建请求。
|
|
161
|
+
|
|
162
|
+
#### Returns
|
|
163
|
+
|
|
164
|
+
`Promise`\<`void`\>
|
|
165
|
+
|
|
166
|
+
取消完成;原 addPoint Promise 将以取消错误拒绝。
|
|
167
|
+
|
|
168
|
+
#### Agent Side Effects
|
|
169
|
+
|
|
170
|
+
write
|
|
171
|
+
|
|
172
|
+
#### Agent Risk Level
|
|
173
|
+
|
|
174
|
+
low
|
|
175
|
+
|
|
176
|
+
#### Example
|
|
177
|
+
|
|
178
|
+
```ts
|
|
179
|
+
await dtcEngine.PointEditor.cancelPlacement();
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
***
|
|
183
|
+
|
|
184
|
+
### updatePoint()
|
|
185
|
+
|
|
186
|
+
> **updatePoint**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
187
|
+
|
|
188
|
+
局部更新 MODEL 及附属 POI;不传的字段保持原值,false、0 和空名称有效。
|
|
189
|
+
|
|
190
|
+
#### Parameters
|
|
191
|
+
|
|
192
|
+
| Parameter | Type | Description |
|
|
193
|
+
| ------ | ------ | ------ |
|
|
194
|
+
| `payload` | [`PointEditorUpdateRequest`](../../types/type-aliases/PointEditorUpdateRequest.md) | 点位定位条件及需要修改的属性;extraProps 整体替换。 |
|
|
195
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选响应回调。 |
|
|
196
|
+
|
|
197
|
+
#### Returns
|
|
198
|
+
|
|
199
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
200
|
+
|
|
201
|
+
通用响应信封。
|
|
202
|
+
|
|
203
|
+
#### Agent Side Effects
|
|
204
|
+
|
|
205
|
+
write
|
|
206
|
+
|
|
207
|
+
#### Agent Preconditions
|
|
208
|
+
|
|
209
|
+
目标是既有场景加载或 API 创建的 MODEL;PointTool 本地工作台对象除外
|
|
210
|
+
|
|
211
|
+
#### Agent Risk Level
|
|
212
|
+
|
|
213
|
+
medium
|
|
214
|
+
|
|
215
|
+
#### Agent Example
|
|
216
|
+
|
|
217
|
+
#### Example
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
await dtcEngine.PointEditor.updatePoint({
|
|
221
|
+
parentId: 'sdk3-point-editor-test', id: 'G-test-1', type: 'MODEL',
|
|
222
|
+
name: '摄像机', poiOffsetY: 0, poiEnabled: false
|
|
223
|
+
});
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
***
|
|
227
|
+
|
|
228
|
+
### deletePoints()
|
|
229
|
+
|
|
230
|
+
> **deletePoints**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<[`PointEditorDeleteResult`](../../types/interfaces/PointEditorDeleteResult.md)\>\>
|
|
231
|
+
|
|
232
|
+
批量删除网页模型点位及附属 POI;混入其他来源或纯 POI 目标时整批拒绝。
|
|
233
|
+
|
|
234
|
+
#### Parameters
|
|
235
|
+
|
|
236
|
+
| Parameter | Type | Description |
|
|
237
|
+
| ------ | ------ | ------ |
|
|
238
|
+
| `payload` | [`PointEditorDeleteRequest`](../../types/interfaces/PointEditorDeleteRequest.md) | 分组与点位全局 ID。 |
|
|
239
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<[`PointEditorDeleteResult`](../../types/interfaces/PointEditorDeleteResult.md)\>\> | 可选响应回调;params 中含 deletedIds 和 failedIds。 |
|
|
240
|
+
|
|
241
|
+
#### Returns
|
|
242
|
+
|
|
243
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<[`PointEditorDeleteResult`](../../types/interfaces/PointEditorDeleteResult.md)\>\>
|
|
244
|
+
|
|
245
|
+
通用响应信封,保留部分删除结果。
|
|
246
|
+
|
|
247
|
+
#### Agent Side Effects
|
|
248
|
+
|
|
249
|
+
write
|
|
250
|
+
|
|
251
|
+
#### Agent Preconditions
|
|
252
|
+
|
|
253
|
+
目标属于场景 MODEL 点位管理范围,按 parentId/id 准确定位
|
|
254
|
+
|
|
255
|
+
#### Agent Risk Level
|
|
256
|
+
|
|
257
|
+
high
|
|
258
|
+
|
|
259
|
+
#### Agent Example
|
|
260
|
+
|
|
261
|
+
#### Example
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
await dtcEngine.PointEditor.deletePoints({ parentId: 'sdk3-point-editor-test', ids: ['G-test-1'] });
|
|
265
|
+
```
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
[@nnepoch/dtc-sdk](../../index.md) / [api](../index.md) / PointIcon
|
|
2
|
+
|
|
3
|
+
# Class: PointIcon
|
|
4
|
+
|
|
5
|
+
设备点位图标显隐控制 API。
|
|
6
|
+
|
|
7
|
+
## Agent Title
|
|
8
|
+
|
|
9
|
+
设备点位图标
|
|
10
|
+
|
|
11
|
+
## Agent Capabilities
|
|
12
|
+
|
|
13
|
+
指定点位显隐, 按编码点位显隐, 分组点位显隐, 全部点位显隐
|
|
14
|
+
|
|
15
|
+
## Extends
|
|
16
|
+
|
|
17
|
+
- `BaseApi`
|
|
18
|
+
|
|
19
|
+
## Methods
|
|
20
|
+
|
|
21
|
+
### show()
|
|
22
|
+
|
|
23
|
+
> **show**(`payload`, `callback?`): `Promise`\<`PointIconResponse`\>
|
|
24
|
+
|
|
25
|
+
显示指定设备点位的图标。
|
|
26
|
+
|
|
27
|
+
#### Parameters
|
|
28
|
+
|
|
29
|
+
| Parameter | Type |
|
|
30
|
+
| ------ | ------ |
|
|
31
|
+
| `payload` | [`PointIconIdsInput`](../type-aliases/PointIconIdsInput.md) |
|
|
32
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<`PointIconResponse`\> |
|
|
33
|
+
|
|
34
|
+
#### Returns
|
|
35
|
+
|
|
36
|
+
`Promise`\<`PointIconResponse`\>
|
|
37
|
+
|
|
38
|
+
#### Agent Side Effects
|
|
39
|
+
|
|
40
|
+
write
|
|
41
|
+
|
|
42
|
+
#### Agent Preconditions
|
|
43
|
+
|
|
44
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
45
|
+
|
|
46
|
+
#### Agent Risk Level
|
|
47
|
+
|
|
48
|
+
low
|
|
49
|
+
|
|
50
|
+
#### Agent Example
|
|
51
|
+
|
|
52
|
+
***
|
|
53
|
+
|
|
54
|
+
### hide()
|
|
55
|
+
|
|
56
|
+
> **hide**(`payload`, `callback?`): `Promise`\<`PointIconResponse`\>
|
|
57
|
+
|
|
58
|
+
隐藏指定设备点位的图标。
|
|
59
|
+
|
|
60
|
+
#### Parameters
|
|
61
|
+
|
|
62
|
+
| Parameter | Type |
|
|
63
|
+
| ------ | ------ |
|
|
64
|
+
| `payload` | [`PointIconIdsInput`](../type-aliases/PointIconIdsInput.md) |
|
|
65
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<`PointIconResponse`\> |
|
|
66
|
+
|
|
67
|
+
#### Returns
|
|
68
|
+
|
|
69
|
+
`Promise`\<`PointIconResponse`\>
|
|
70
|
+
|
|
71
|
+
#### Agent Side Effects
|
|
72
|
+
|
|
73
|
+
write
|
|
74
|
+
|
|
75
|
+
#### Agent Preconditions
|
|
76
|
+
|
|
77
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
78
|
+
|
|
79
|
+
#### Agent Risk Level
|
|
80
|
+
|
|
81
|
+
low
|
|
82
|
+
|
|
83
|
+
#### Agent Example
|
|
84
|
+
|
|
85
|
+
***
|
|
86
|
+
|
|
87
|
+
### showByCode()
|
|
88
|
+
|
|
89
|
+
> **showByCode**(`payload`, `callback?`): `Promise`\<`PointIconResponse`\>
|
|
90
|
+
|
|
91
|
+
显示指定编码(code)的全部设备点位图标,编码精确匹配且不要求唯一。
|
|
92
|
+
|
|
93
|
+
#### Parameters
|
|
94
|
+
|
|
95
|
+
| Parameter | Type |
|
|
96
|
+
| ------ | ------ |
|
|
97
|
+
| `payload` | `PointIconCodesInput` |
|
|
98
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<`PointIconResponse`\> |
|
|
99
|
+
|
|
100
|
+
#### Returns
|
|
101
|
+
|
|
102
|
+
`Promise`\<`PointIconResponse`\>
|
|
103
|
+
|
|
104
|
+
#### Agent Side Effects
|
|
105
|
+
|
|
106
|
+
write
|
|
107
|
+
|
|
108
|
+
#### Agent Preconditions
|
|
109
|
+
|
|
110
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
111
|
+
|
|
112
|
+
#### Agent Risk Level
|
|
113
|
+
|
|
114
|
+
low
|
|
115
|
+
|
|
116
|
+
#### Agent Example
|
|
117
|
+
|
|
118
|
+
***
|
|
119
|
+
|
|
120
|
+
### hideByCode()
|
|
121
|
+
|
|
122
|
+
> **hideByCode**(`payload`, `callback?`): `Promise`\<`PointIconResponse`\>
|
|
123
|
+
|
|
124
|
+
隐藏指定编码(code)的全部设备点位图标,编码精确匹配且不要求唯一。
|
|
125
|
+
|
|
126
|
+
#### Parameters
|
|
127
|
+
|
|
128
|
+
| Parameter | Type |
|
|
129
|
+
| ------ | ------ |
|
|
130
|
+
| `payload` | `PointIconCodesInput` |
|
|
131
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<`PointIconResponse`\> |
|
|
132
|
+
|
|
133
|
+
#### Returns
|
|
134
|
+
|
|
135
|
+
`Promise`\<`PointIconResponse`\>
|
|
136
|
+
|
|
137
|
+
#### Agent Side Effects
|
|
138
|
+
|
|
139
|
+
write
|
|
140
|
+
|
|
141
|
+
#### Agent Preconditions
|
|
142
|
+
|
|
143
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
144
|
+
|
|
145
|
+
#### Agent Risk Level
|
|
146
|
+
|
|
147
|
+
low
|
|
148
|
+
|
|
149
|
+
#### Agent Example
|
|
150
|
+
|
|
151
|
+
***
|
|
152
|
+
|
|
153
|
+
### showByGroup()
|
|
154
|
+
|
|
155
|
+
> **showByGroup**(`payload`, `callback?`): `Promise`\<`PointIconResponse`\>
|
|
156
|
+
|
|
157
|
+
显示指定分组及其子分组内的设备点位图标。
|
|
158
|
+
|
|
159
|
+
#### Parameters
|
|
160
|
+
|
|
161
|
+
| Parameter | Type |
|
|
162
|
+
| ------ | ------ |
|
|
163
|
+
| `payload` | [`PointIconIdsInput`](../type-aliases/PointIconIdsInput.md) |
|
|
164
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<`PointIconResponse`\> |
|
|
165
|
+
|
|
166
|
+
#### Returns
|
|
167
|
+
|
|
168
|
+
`Promise`\<`PointIconResponse`\>
|
|
169
|
+
|
|
170
|
+
#### Agent Side Effects
|
|
171
|
+
|
|
172
|
+
write
|
|
173
|
+
|
|
174
|
+
#### Agent Preconditions
|
|
175
|
+
|
|
176
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
177
|
+
|
|
178
|
+
#### Agent Risk Level
|
|
179
|
+
|
|
180
|
+
low
|
|
181
|
+
|
|
182
|
+
#### Agent Example
|
|
183
|
+
|
|
184
|
+
***
|
|
185
|
+
|
|
186
|
+
### hideByGroup()
|
|
187
|
+
|
|
188
|
+
> **hideByGroup**(`payload`, `callback?`): `Promise`\<`PointIconResponse`\>
|
|
189
|
+
|
|
190
|
+
隐藏指定分组及其子分组内的设备点位图标。
|
|
191
|
+
|
|
192
|
+
#### Parameters
|
|
193
|
+
|
|
194
|
+
| Parameter | Type |
|
|
195
|
+
| ------ | ------ |
|
|
196
|
+
| `payload` | [`PointIconIdsInput`](../type-aliases/PointIconIdsInput.md) |
|
|
197
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<`PointIconResponse`\> |
|
|
198
|
+
|
|
199
|
+
#### Returns
|
|
200
|
+
|
|
201
|
+
`Promise`\<`PointIconResponse`\>
|
|
202
|
+
|
|
203
|
+
#### Agent Side Effects
|
|
204
|
+
|
|
205
|
+
write
|
|
206
|
+
|
|
207
|
+
#### Agent Preconditions
|
|
208
|
+
|
|
209
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
210
|
+
|
|
211
|
+
#### Agent Risk Level
|
|
212
|
+
|
|
213
|
+
low
|
|
214
|
+
|
|
215
|
+
#### Agent Example
|
|
216
|
+
|
|
217
|
+
***
|
|
218
|
+
|
|
219
|
+
### showAll()
|
|
220
|
+
|
|
221
|
+
> **showAll**(`callback?`): `Promise`\<`PointIconResponse`\>
|
|
222
|
+
|
|
223
|
+
显示全部设备点位图标。
|
|
224
|
+
|
|
225
|
+
#### Parameters
|
|
226
|
+
|
|
227
|
+
| Parameter | Type |
|
|
228
|
+
| ------ | ------ |
|
|
229
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<`PointIconResponse`\> |
|
|
230
|
+
|
|
231
|
+
#### Returns
|
|
232
|
+
|
|
233
|
+
`Promise`\<`PointIconResponse`\>
|
|
234
|
+
|
|
235
|
+
#### Agent Side Effects
|
|
236
|
+
|
|
237
|
+
write
|
|
238
|
+
|
|
239
|
+
#### Agent Preconditions
|
|
240
|
+
|
|
241
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
242
|
+
|
|
243
|
+
#### Agent Risk Level
|
|
244
|
+
|
|
245
|
+
low
|
|
246
|
+
|
|
247
|
+
***
|
|
248
|
+
|
|
249
|
+
### hideAll()
|
|
250
|
+
|
|
251
|
+
> **hideAll**(`callback?`): `Promise`\<`PointIconResponse`\>
|
|
252
|
+
|
|
253
|
+
隐藏全部设备点位图标。
|
|
254
|
+
|
|
255
|
+
#### Parameters
|
|
256
|
+
|
|
257
|
+
| Parameter | Type |
|
|
258
|
+
| ------ | ------ |
|
|
259
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<`PointIconResponse`\> |
|
|
260
|
+
|
|
261
|
+
#### Returns
|
|
262
|
+
|
|
263
|
+
`Promise`\<`PointIconResponse`\>
|
|
264
|
+
|
|
265
|
+
#### Agent Side Effects
|
|
266
|
+
|
|
267
|
+
write
|
|
268
|
+
|
|
269
|
+
#### Agent Preconditions
|
|
270
|
+
|
|
271
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
272
|
+
|
|
273
|
+
#### Agent Risk Level
|
|
274
|
+
|
|
275
|
+
low
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
[@nnepoch/dtc-sdk](../../index.md) / [api](../index.md) / SpatialQuery
|
|
2
|
+
|
|
3
|
+
# Class: SpatialQuery
|
|
4
|
+
|
|
5
|
+
场景缓冲空间查询 API,支持三种查询方式:
|
|
6
|
+
1. 根据场景模型当前的位置进行空间查询;
|
|
7
|
+
2. 根据场景坐标位置进行空间查询;
|
|
8
|
+
3. 根据场景模型的边界框进行空间查询。
|
|
9
|
+
|
|
10
|
+
## Agent Title
|
|
11
|
+
|
|
12
|
+
空间查询
|
|
13
|
+
|
|
14
|
+
## Agent Capabilities
|
|
15
|
+
|
|
16
|
+
模型空间查询, 坐标空间查询, 模型包围盒空间查询
|
|
17
|
+
|
|
18
|
+
## Extends
|
|
19
|
+
|
|
20
|
+
- `BaseApi`
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
|
|
24
|
+
### layerQueryByModel()
|
|
25
|
+
|
|
26
|
+
> **layerQueryByModel**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
27
|
+
|
|
28
|
+
模型空间查询:根据场景模型当前的位置进行空间查询。
|
|
29
|
+
默认值:`queryRadius=50`、`queryMinHeight=0`、`queryMaxHeight=20`。
|
|
30
|
+
`queryParentIds` 不能为空,至少指定一个查询的图层组编号。
|
|
31
|
+
|
|
32
|
+
#### Parameters
|
|
33
|
+
|
|
34
|
+
| Parameter | Type | Description |
|
|
35
|
+
| ------ | ------ | ------ |
|
|
36
|
+
| `payload` | [`SpatialQueryLayerByModelRequest`](../../types/interfaces/SpatialQueryLayerByModelRequest.md) | 空间查询参数。 |
|
|
37
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
38
|
+
|
|
39
|
+
#### Returns
|
|
40
|
+
|
|
41
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
42
|
+
|
|
43
|
+
Promise 形式的接口响应。
|
|
44
|
+
|
|
45
|
+
#### Agent Side Effects
|
|
46
|
+
|
|
47
|
+
write
|
|
48
|
+
|
|
49
|
+
#### Agent Preconditions
|
|
50
|
+
|
|
51
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
52
|
+
|
|
53
|
+
#### Agent Risk Level
|
|
54
|
+
|
|
55
|
+
low
|
|
56
|
+
|
|
57
|
+
#### Agent Example
|
|
58
|
+
|
|
59
|
+
#### Example
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
dtcEngine.SpatialQuery.layerQueryByModel(
|
|
63
|
+
{
|
|
64
|
+
parentId: '',
|
|
65
|
+
id: 'LayerSearchCore',
|
|
66
|
+
queryRadius: 10,
|
|
67
|
+
queryMinHeight: 0,
|
|
68
|
+
queryMaxHeight: 50,
|
|
69
|
+
queryParentIds: ['SM_B8_XueShenSuShe', 'daoZha']
|
|
70
|
+
},
|
|
71
|
+
(result) => { console.log(result); }
|
|
72
|
+
);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
***
|
|
76
|
+
|
|
77
|
+
### layerQueryByPosition()
|
|
78
|
+
|
|
79
|
+
> **layerQueryByPosition**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
80
|
+
|
|
81
|
+
坐标空间查询:根据场景坐标位置进行空间查询。
|
|
82
|
+
默认值:`queryRadius=50`、`queryMinHeight=0`、`queryMaxHeight=20`。
|
|
83
|
+
`queryParentIds` 不能为空,至少指定一个查询的图层组编号。
|
|
84
|
+
|
|
85
|
+
#### Parameters
|
|
86
|
+
|
|
87
|
+
| Parameter | Type | Description |
|
|
88
|
+
| ------ | ------ | ------ |
|
|
89
|
+
| `payload` | [`SpatialQueryLayerByPositionRequest`](../../types/interfaces/SpatialQueryLayerByPositionRequest.md) | 空间查询参数。 |
|
|
90
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
91
|
+
|
|
92
|
+
#### Returns
|
|
93
|
+
|
|
94
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
95
|
+
|
|
96
|
+
Promise 形式的接口响应。
|
|
97
|
+
|
|
98
|
+
#### Agent Side Effects
|
|
99
|
+
|
|
100
|
+
write
|
|
101
|
+
|
|
102
|
+
#### Agent Preconditions
|
|
103
|
+
|
|
104
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
105
|
+
|
|
106
|
+
#### Agent Risk Level
|
|
107
|
+
|
|
108
|
+
low
|
|
109
|
+
|
|
110
|
+
#### Agent Example
|
|
111
|
+
|
|
112
|
+
#### Example
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
dtcEngine.SpatialQuery.layerQueryByPosition(
|
|
116
|
+
{
|
|
117
|
+
queryPosition: new dtcEngine.Type.Vector3(120.2076273621342, 30.372304875047895, 16.01983620418444),
|
|
118
|
+
queryRadius: 20,
|
|
119
|
+
queryMinHeight: 0,
|
|
120
|
+
queryMaxHeight: 50,
|
|
121
|
+
queryParentIds: ['SM_B8_XueShenSuShe', 'daoZha']
|
|
122
|
+
}, (res) => {
|
|
123
|
+
console.log(res);
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
***
|
|
129
|
+
|
|
130
|
+
### layerQueryByModelBox()
|
|
131
|
+
|
|
132
|
+
> **layerQueryByModelBox**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
133
|
+
|
|
134
|
+
模型包围盒空间查询:根据场景模型的边界框进行空间查询。
|
|
135
|
+
`queryParentIds` 不能为空,至少指定一个查询的图层组编号。
|
|
136
|
+
|
|
137
|
+
#### Parameters
|
|
138
|
+
|
|
139
|
+
| Parameter | Type | Description |
|
|
140
|
+
| ------ | ------ | ------ |
|
|
141
|
+
| `payload` | [`SpatialQueryLayerByModelBoxRequest`](../../types/interfaces/SpatialQueryLayerByModelBoxRequest.md) | 空间查询参数。 |
|
|
142
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
143
|
+
|
|
144
|
+
#### Returns
|
|
145
|
+
|
|
146
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
147
|
+
|
|
148
|
+
Promise 形式的接口响应。
|
|
149
|
+
|
|
150
|
+
#### Agent Side Effects
|
|
151
|
+
|
|
152
|
+
write
|
|
153
|
+
|
|
154
|
+
#### Agent Preconditions
|
|
155
|
+
|
|
156
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
157
|
+
|
|
158
|
+
#### Agent Risk Level
|
|
159
|
+
|
|
160
|
+
low
|
|
161
|
+
|
|
162
|
+
#### Agent Example
|
|
163
|
+
|
|
164
|
+
#### Example
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
dtcEngine.SpatialQuery.layerQueryByModelBox(
|
|
168
|
+
{
|
|
169
|
+
parentId: '',
|
|
170
|
+
id: 'LayerSearchCore',
|
|
171
|
+
queryParentIds: ['JianKong_QiangJiTest', 'daoZha']
|
|
172
|
+
},
|
|
173
|
+
(result) => { console.log(result); }
|
|
174
|
+
);
|
|
175
|
+
```
|