@inweb/viewer-visualize 25.7.0 → 25.7.2
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/LICENSE +2 -2
- package/dist/viewer-visualize.js +330 -295
- package/dist/viewer-visualize.js.map +1 -1
- package/dist/viewer-visualize.min.js +1 -1
- package/dist/viewer-visualize.module.js +164 -149
- package/dist/viewer-visualize.module.js.map +1 -1
- package/lib/Viewer/Markup/Api/IMarkupLine.d.ts +4 -0
- package/lib/Viewer/Markup/Api/Impl/Konva/KonvaLine.d.ts +2 -3
- package/lib/Viewer/Markup/IMarkup.d.ts +28 -32
- package/lib/Viewer/Markup/IWorldTransform.d.ts +39 -0
- package/lib/Viewer/Markup/Impl/Konva/KonvaMarkup.d.ts +11 -6
- package/lib/Viewer/Markup/Impl/Konva/MarkupColor.d.ts +3 -0
- package/lib/Viewer/Markup/Impl/Visualize/VisualizeMarkup.d.ts +4 -4
- package/lib/Viewer/Markup/MarkupFactory.d.ts +10 -10
- package/lib/Viewer/Viewer.d.ts +60 -42
- package/lib/index.d.ts +12 -0
- package/package.json +5 -5
- package/src/Viewer/Commands/ApplyModelTransform.ts +2 -2
- package/src/Viewer/Commands/ClearMarkup.ts +2 -2
- package/src/Viewer/Commands/ClearSlices.ts +2 -2
- package/src/Viewer/Commands/CreatePreview.ts +2 -2
- package/src/Viewer/Commands/Explode.ts +2 -2
- package/src/Viewer/Commands/GetDefaultViewPositions.ts +2 -2
- package/src/Viewer/Commands/GetModels.ts +2 -2
- package/src/Viewer/Commands/GetSelected.ts +2 -2
- package/src/Viewer/Commands/HideSelected.ts +2 -2
- package/src/Viewer/Commands/IsolateSelected.ts +2 -2
- package/src/Viewer/Commands/RegenerateAll.ts +2 -2
- package/src/Viewer/Commands/ResetView.ts +2 -2
- package/src/Viewer/Commands/SelectModel.ts +2 -2
- package/src/Viewer/Commands/SetActiveDragger.ts +2 -2
- package/src/Viewer/Commands/SetDefaultViewPosition.ts +2 -2
- package/src/Viewer/Commands/SetMarkupColor.ts +2 -2
- package/src/Viewer/Commands/SetSelected.ts +2 -2
- package/src/Viewer/Commands/ShowAll.ts +2 -2
- package/src/Viewer/Commands/Unselect.ts +2 -2
- package/src/Viewer/Commands/ZoomToExtents.ts +2 -2
- package/src/Viewer/Commands/ZoomToObjects.ts +2 -2
- package/src/Viewer/Commands/ZoomToSelected.ts +2 -2
- package/src/Viewer/Commands/index.ts +2 -2
- package/src/Viewer/Draggers/Actions/OrbitAction.ts +2 -2
- package/src/Viewer/Draggers/Actions/PanAction.ts +2 -2
- package/src/Viewer/Draggers/Actions/ZoomAction.ts +2 -2
- package/src/Viewer/Draggers/Common/Geometry.ts +2 -2
- package/src/Viewer/Draggers/Common/GestureManager.ts +2 -2
- package/src/Viewer/Draggers/Common/OdBaseDragger.ts +2 -2
- package/src/Viewer/Draggers/Common/OdaGeAction.ts +2 -2
- package/src/Viewer/Draggers/MeasureLineDragger/MeasureLineItem.ts +2 -2
- package/src/Viewer/Draggers/MeasureLineDragger/MeasureUtils.ts +2 -2
- package/src/Viewer/Draggers/MeasureLineDragger/index.ts +2 -2
- package/src/Viewer/Draggers/OdBaseCuttingPlaneDragger.ts +2 -2
- package/src/Viewer/Draggers/OdCuttingPlaneXAxisDragger.ts +2 -2
- package/src/Viewer/Draggers/OdCuttingPlaneYAxisDragger.ts +2 -2
- package/src/Viewer/Draggers/OdCuttingPlaneZAxisDragger.ts +2 -2
- package/src/Viewer/Draggers/OdOrbitDragger.ts +2 -2
- package/src/Viewer/Draggers/OdPanDragger.ts +2 -2
- package/src/Viewer/Draggers/OdZoomDragger.ts +2 -2
- package/src/Viewer/Draggers/OdZoomWheelDragger.ts +2 -2
- package/src/Viewer/Draggers/OdZoomWindowDragger/OdSelectionFrame.ts +2 -2
- package/src/Viewer/Draggers/OdZoomWindowDragger/index.ts +2 -2
- package/src/Viewer/Draggers/OdaLineDragger.ts +2 -2
- package/src/Viewer/Draggers/OdaTextDragger.ts +2 -2
- package/src/Viewer/Draggers/OdaWalkDragger.ts +2 -2
- package/src/Viewer/Draggers/OrbitAroundBuildingDragger.ts +2 -2
- package/src/Viewer/Loaders/BaseLoader.ts +2 -2
- package/src/Viewer/Loaders/LoaderFactory.ts +2 -2
- package/src/Viewer/Loaders/TCSLoader.ts +2 -2
- package/src/Viewer/Loaders/VsfXLoader.ts +2 -2
- package/src/Viewer/Loaders/VsfXPartialLoader.ts +2 -2
- package/src/Viewer/Loaders/VsfXStreamingLoader.ts +2 -2
- package/src/Viewer/Markup/Api/IMarkupLine.ts +5 -0
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaArrow.ts +1 -1
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaCloud.ts +1 -1
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.ts +1 -1
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaLine.ts +4 -5
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.ts +1 -1
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaText.ts +1 -1
- package/src/Viewer/Markup/IMarkup.ts +34 -35
- package/src/Viewer/Markup/IWorldTransform.ts +46 -0
- package/src/Viewer/Markup/Impl/Konva/KonvaMarkup.ts +85 -161
- package/src/Viewer/Markup/Impl/Konva/MarkupColor.ts +3 -0
- package/src/Viewer/Markup/Impl/Visualize/VisualizeMarkup.ts +45 -10
- package/src/Viewer/Markup/MarkupFactory.ts +16 -20
- package/src/Viewer/Viewer.ts +103 -95
- package/src/Viewer/utils.ts +2 -2
- package/src/index.ts +14 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Konva from "konva";
|
|
2
|
-
import {
|
|
3
|
-
import { IMarkupLine } from "../../IMarkupLine";
|
|
2
|
+
import { IMarkupLine, MarkupLineType } from "../../IMarkupLine";
|
|
4
3
|
import { IMarkupColorable } from "../../IMarkupColorable";
|
|
5
4
|
|
|
6
5
|
const LineTypeSpecs = new Map<string, number[]>([
|
|
@@ -13,7 +12,7 @@ export class KonvaLine implements IMarkupLine, IMarkupColorable {
|
|
|
13
12
|
private _ref: Konva.Line;
|
|
14
13
|
|
|
15
14
|
constructor(
|
|
16
|
-
params: { points: { x: number; y: number }[]; type?:
|
|
15
|
+
params: { points: { x: number; y: number }[]; type?: MarkupLineType; width?: number; color?: string; id?: string },
|
|
17
16
|
ref = null
|
|
18
17
|
) {
|
|
19
18
|
if (ref) {
|
|
@@ -64,7 +63,7 @@ export class KonvaLine implements IMarkupLine, IMarkupColorable {
|
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
getColor(): string {
|
|
67
|
-
return this._ref.stroke();
|
|
66
|
+
return this._ref.stroke() as string;
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
setColor(hex: string) {
|
|
@@ -106,7 +105,7 @@ export class KonvaLine implements IMarkupLine, IMarkupColorable {
|
|
|
106
105
|
|
|
107
106
|
getLineType(): string {
|
|
108
107
|
const typeSpecs = this._ref.dash() || [];
|
|
109
|
-
let type:
|
|
108
|
+
let type: MarkupLineType;
|
|
110
109
|
switch (typeSpecs) {
|
|
111
110
|
case LineTypeSpecs.get("dot"):
|
|
112
111
|
type = "dot";
|
|
@@ -21,24 +21,14 @@
|
|
|
21
21
|
// acknowledge and accept the above terms.
|
|
22
22
|
///////////////////////////////////////////////////////////////////////////////
|
|
23
23
|
|
|
24
|
+
import { IEventEmitter } from "@inweb/eventemitter2";
|
|
24
25
|
import { IViewpoint } from "@inweb/viewer-core";
|
|
25
|
-
|
|
26
|
-
import { OdBaseDragger } from "../Draggers/Common/OdBaseDragger";
|
|
27
|
-
import { Viewer } from "../Viewer";
|
|
26
|
+
import { IWorldTransform } from "./IWorldTransform";
|
|
28
27
|
import { IMarkupObject } from "./Api/IMarkupObject";
|
|
29
28
|
|
|
30
29
|
/**
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
export enum MarkupType {
|
|
34
|
-
Unknown,
|
|
35
|
-
Konva = "Konva",
|
|
36
|
-
Visualize = "Visualize",
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Defines type of markup object. For old Visualize markup ({@link MarkupType}) only "Line" and
|
|
41
|
-
* "Text" markup objects are supported.
|
|
30
|
+
* Defines type of markup object. For `VisualizeJS` markup only the `Line` and `Text` markup
|
|
31
|
+
* objects are supported.
|
|
42
32
|
*/
|
|
43
33
|
export enum MarkupMode {
|
|
44
34
|
SelectMarkup = "SelectMarkup",
|
|
@@ -52,32 +42,42 @@ export enum MarkupMode {
|
|
|
52
42
|
}
|
|
53
43
|
|
|
54
44
|
/**
|
|
55
|
-
*
|
|
45
|
+
* 2D markup core interface.
|
|
56
46
|
*/
|
|
57
47
|
export interface IMarkup {
|
|
58
48
|
/**
|
|
59
|
-
*
|
|
49
|
+
* Line width of the markup objects. Default is 4.
|
|
60
50
|
*/
|
|
61
51
|
lineWidth: number;
|
|
62
52
|
|
|
63
53
|
/**
|
|
64
|
-
* Type of the
|
|
54
|
+
* Type of the markup line. Available types: `solid`, `dot`, `dash`. Default is `solid`.
|
|
65
55
|
*/
|
|
66
56
|
lineType: string;
|
|
67
57
|
|
|
68
58
|
/**
|
|
69
|
-
* Font size of the markup text. Default is 34.
|
|
59
|
+
* Font size of the markup text. Default is 34 px.
|
|
70
60
|
*/
|
|
71
61
|
fontSize: number;
|
|
72
62
|
|
|
73
63
|
/**
|
|
74
64
|
* Start method to init Markup support for the Viewer instance.
|
|
75
65
|
*
|
|
76
|
-
* @param
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
* @param canvas -
|
|
67
|
+
* {@link https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement | HTMLCanvasElement}
|
|
68
|
+
* used to operate on.
|
|
69
|
+
* @param canvasEvents - List of `canvas` events that the markup should redirect to the `viewer`.
|
|
70
|
+
* @param viewer - `Viewer` instance viewer that receives `canvas` events.
|
|
71
|
+
* @param worldTransformer - Transformer of screen space into world space and vice versa. If
|
|
72
|
+
* a transformer is defined, viewpoint objects will be stored in world coordinates,
|
|
73
|
+
* otherwise in screen coordinates.
|
|
74
|
+
*/
|
|
75
|
+
initialize(
|
|
76
|
+
canvas: HTMLCanvasElement,
|
|
77
|
+
canvasEvents: string[],
|
|
78
|
+
viewer?: IEventEmitter,
|
|
79
|
+
worldTransformer?: IWorldTransform
|
|
80
|
+
): void;
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* Releases all resources allocated by this `Markup` instance. Call this method before
|
|
@@ -86,13 +86,12 @@ export interface IMarkup {
|
|
|
86
86
|
dispose(): void;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
90
|
-
* map to register in {@link Viewer.registerDragger}
|
|
89
|
+
* Create markup overlay.
|
|
91
90
|
*/
|
|
92
|
-
|
|
91
|
+
syncOverlay(): void;
|
|
93
92
|
|
|
94
93
|
/**
|
|
95
|
-
*
|
|
94
|
+
* Clear markup overlay.
|
|
96
95
|
*/
|
|
97
96
|
clearOverlay(): void;
|
|
98
97
|
|
|
@@ -138,37 +137,37 @@ export interface IMarkup {
|
|
|
138
137
|
setViewpoint(viewpoint: IViewpoint): void;
|
|
139
138
|
|
|
140
139
|
/**
|
|
141
|
-
* Create a
|
|
140
|
+
* Create a viewpoint.
|
|
142
141
|
*/
|
|
143
142
|
getViewpoint(): IViewpoint;
|
|
144
143
|
|
|
145
144
|
/**
|
|
146
|
-
* Create a Markup object
|
|
145
|
+
* Create a Markup object.
|
|
147
146
|
*
|
|
148
|
-
* @param type - string identificator of Markup type
|
|
149
|
-
* @param params - object
|
|
147
|
+
* @param type - string identificator of Markup object type.
|
|
148
|
+
* @param params - Markup object parameters.
|
|
150
149
|
*/
|
|
151
150
|
createObject(type: string, params: any): IMarkupObject;
|
|
152
151
|
|
|
153
152
|
/**
|
|
154
|
-
* Get
|
|
153
|
+
* Get Markup objects.
|
|
155
154
|
*/
|
|
156
155
|
getObjects(): IMarkupObject[];
|
|
157
156
|
|
|
158
157
|
/**
|
|
159
|
-
* Get
|
|
158
|
+
* Get selected Markup objects.
|
|
160
159
|
*/
|
|
161
160
|
getSelectedObjects(): IMarkupObject[];
|
|
162
161
|
|
|
163
162
|
/**
|
|
164
|
-
* Select
|
|
163
|
+
* Select Markup objects.
|
|
165
164
|
*
|
|
166
165
|
* @param objects
|
|
167
166
|
*/
|
|
168
167
|
selectObjects(objects: IMarkupObject[]): void;
|
|
169
168
|
|
|
170
169
|
/**
|
|
171
|
-
* Clear
|
|
170
|
+
* Clear Markup objects selection.
|
|
172
171
|
*/
|
|
173
172
|
clearSelected(): void;
|
|
174
173
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
|
+
// All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
// This software and its documentation and related materials are owned by
|
|
6
|
+
// the Alliance. The software may only be incorporated into application
|
|
7
|
+
// programs owned by members of the Alliance, subject to a signed
|
|
8
|
+
// Membership Agreement and Supplemental Software License Agreement with the
|
|
9
|
+
// Alliance. The structure and organization of this software are the valuable
|
|
10
|
+
// trade secrets of the Alliance and its suppliers. The software is also
|
|
11
|
+
// protected by copyright law and international treaty provisions. Application
|
|
12
|
+
// programs incorporating this software must include the following statement
|
|
13
|
+
// with their copyright notices:
|
|
14
|
+
//
|
|
15
|
+
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
|
+
// license agreement with Open Design Alliance.
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
|
+
// All rights reserved.
|
|
19
|
+
//
|
|
20
|
+
// By use of this software, its documentation or related materials, you
|
|
21
|
+
// acknowledge and accept the above terms.
|
|
22
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Viewer coordiate system transformer.
|
|
26
|
+
*/
|
|
27
|
+
export interface IWorldTransform {
|
|
28
|
+
/**
|
|
29
|
+
* Transforms `position` from screen space into world space.
|
|
30
|
+
*
|
|
31
|
+
* @param position - screen position in pixels.
|
|
32
|
+
*/
|
|
33
|
+
screenToWorld(position: { x: number; y: number }): { x: number; y: number; z: number };
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Transforms `position` from world space into screen space.
|
|
37
|
+
*
|
|
38
|
+
* @param position - position in world space coordinates.
|
|
39
|
+
*/
|
|
40
|
+
worldToScreen(position: { x: number; y: number; z: number }): { x: number; y: number };
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Returns the scaling factors for each axis in world space.
|
|
44
|
+
*/
|
|
45
|
+
getScale(): { x: number; y: number; z: number };
|
|
46
|
+
}
|