@openglobus/og 0.22.2 → 0.24.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/css/og.css +137 -1
- package/lib/@openglobus/js/Globe.d.ts +0 -1
- package/lib/@openglobus/js/Object3d.d.ts +20 -10
- package/lib/@openglobus/js/camera/Camera.d.ts +57 -15
- package/lib/@openglobus/js/camera/Frustum.d.ts +3 -0
- package/lib/@openglobus/js/camera/PlanetCamera.d.ts +13 -0
- package/lib/@openglobus/js/control/CameraLock.d.ts +38 -0
- package/lib/@openglobus/js/control/MouseNavigation.d.ts +62 -51
- package/lib/@openglobus/js/control/OldMouseNavigation.d.ts +64 -0
- package/lib/@openglobus/js/control/SimpleNavigation.d.ts +27 -10
- package/lib/@openglobus/js/control/geoObjectEditor/ArrowEntity.d.ts +15 -0
- package/lib/@openglobus/js/control/geoObjectEditor/AxisTrackEntity.d.ts +9 -0
- package/lib/@openglobus/js/control/geoObjectEditor/GeoObjectEditor.d.ts +13 -0
- package/lib/@openglobus/js/control/geoObjectEditor/GeoObjectEditorDialog.d.ts +69 -0
- package/lib/@openglobus/js/control/geoObjectEditor/GeoObjectEditorScene.d.ts +78 -9
- package/lib/@openglobus/js/control/geoObjectEditor/MoveAxisEntity.d.ts +17 -0
- package/lib/@openglobus/js/control/geoObjectEditor/MovePlaneEntity.d.ts +7 -0
- package/lib/@openglobus/js/control/geoObjectEditor/RotateEntity.d.ts +9 -0
- package/lib/@openglobus/js/control/geoObjectEditor/colors.d.ts +8 -0
- package/lib/@openglobus/js/control/index.d.ts +3 -2
- package/lib/@openglobus/js/entity/Entity.d.ts +282 -19
- package/lib/@openglobus/js/entity/EntityCollection.d.ts +8 -9
- package/lib/@openglobus/js/entity/GeoObject.d.ts +135 -39
- package/lib/@openglobus/js/entity/GeoObjectHandler.d.ts +39 -63
- package/lib/@openglobus/js/entity/InstanceData.d.ts +76 -0
- package/lib/@openglobus/js/entity/Polyline.d.ts +19 -6
- package/lib/@openglobus/js/entity/PolylineHandler.d.ts +7 -0
- package/lib/@openglobus/js/index.d.ts +2 -1
- package/lib/@openglobus/js/input/MouseHandler.d.ts +1 -0
- package/lib/@openglobus/js/layer/Vector.d.ts +4 -0
- package/lib/@openglobus/js/light/LightSource.d.ts +1 -139
- package/lib/@openglobus/js/math/Mat3.d.ts +1 -1
- package/lib/@openglobus/js/math/Mat4.d.ts +10 -1
- package/lib/@openglobus/js/math/Plane.d.ts +3 -1
- package/lib/@openglobus/js/math/Quat.d.ts +47 -33
- package/lib/@openglobus/js/math/Ray.d.ts +10 -14
- package/lib/@openglobus/js/math/Vec2.d.ts +22 -0
- package/lib/@openglobus/js/math/Vec3.d.ts +15 -0
- package/lib/@openglobus/js/math.d.ts +2 -2
- package/lib/@openglobus/js/quadTree/EntityCollectionNode.d.ts +2 -2
- package/lib/@openglobus/js/quadTree/Node.d.ts +1 -1
- package/lib/@openglobus/js/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +1 -1
- package/lib/@openglobus/js/quadTree/equi/EquiEntityCollectionNodeLonLat.d.ts +1 -1
- package/lib/@openglobus/js/renderer/Renderer.d.ts +63 -44
- package/lib/@openglobus/js/renderer/RendererEvents.d.ts +2 -0
- package/lib/@openglobus/js/scene/Planet.d.ts +15 -7
- package/lib/@openglobus/js/scene/RenderNode.d.ts +10 -25
- package/lib/@openglobus/js/shaders/drawnode.d.ts +1 -0
- package/lib/@openglobus/js/shaders/geoObject.d.ts +1 -0
- package/lib/@openglobus/js/shaders/utils.d.ts +1 -1
- package/lib/@openglobus/js/ui/Checkbox.d.ts +31 -0
- package/lib/@openglobus/js/ui/Dialog.d.ts +3 -0
- package/lib/@openglobus/js/ui/Input.d.ts +32 -0
- package/lib/@openglobus/js/ui/View.d.ts +3 -1
- package/lib/@openglobus/js/utils/objParser.d.ts +44 -12
- package/lib/@openglobus/js/utils/shared.d.ts +22 -0
- package/lib/@openglobus/js/webgl/BaseFramebuffer.d.ts +0 -1
- package/lib/@openglobus/js/webgl/Framebuffer.d.ts +35 -8
- package/lib/@openglobus/js/webgl/Handler.d.ts +22 -12
- package/lib/@openglobus/og.css +1 -1
- package/lib/@openglobus/og.esm.js +1 -1
- package/lib/@openglobus/og.esm.js.map +1 -1
- package/lib/@openglobus/og.umd.js +1 -1
- package/lib/@openglobus/og.umd.js.map +1 -1
- package/lib/js/Globe.d.ts +0 -1
- package/lib/js/Globe.js +4 -2
- package/lib/js/Object3d.d.ts +20 -10
- package/lib/js/Object3d.js +124 -48
- package/lib/js/Popup.js +1 -1
- package/lib/js/camera/Camera.d.ts +57 -15
- package/lib/js/camera/Camera.js +109 -29
- package/lib/js/camera/Frustum.d.ts +3 -0
- package/lib/js/camera/Frustum.js +7 -0
- package/lib/js/camera/PlanetCamera.d.ts +13 -0
- package/lib/js/camera/PlanetCamera.js +52 -5
- package/lib/js/control/Atmosphere.js +10 -6
- package/lib/js/control/CameraLock.d.ts +38 -0
- package/lib/js/control/CameraLock.js +216 -0
- package/lib/js/control/Control.js +1 -1
- package/lib/js/control/DebugInfo.js +38 -8
- package/lib/js/control/KeyboardNavigation.js +9 -9
- package/lib/js/control/MouseNavigation.d.ts +62 -51
- package/lib/js/control/MouseNavigation.js +361 -305
- package/lib/js/control/MouseWheelZoomControl.d.ts +0 -44
- package/lib/js/control/MouseWheelZoomControl.js +270 -181
- package/lib/js/control/OldMouseNavigation.d.ts +64 -0
- package/lib/js/control/OldMouseNavigation.js +368 -0
- package/lib/js/control/ScaleControl.js +11 -5
- package/lib/js/control/SimpleNavigation.d.ts +27 -10
- package/lib/js/control/SimpleNavigation.js +149 -49
- package/lib/js/control/Sun.js +6 -6
- package/lib/js/control/TouchNavigation.js +11 -8
- package/lib/js/control/elevationProfile/ElevationProfileScene.js +6 -5
- package/lib/js/control/geoObjectEditor/ArrowEntity.d.ts +15 -0
- package/lib/js/control/geoObjectEditor/ArrowEntity.js +59 -0
- package/lib/js/control/geoObjectEditor/AxisTrackEntity.d.ts +9 -0
- package/lib/js/control/geoObjectEditor/AxisTrackEntity.js +93 -0
- package/lib/js/control/geoObjectEditor/GeoObjectEditor.d.ts +13 -0
- package/lib/js/control/geoObjectEditor/GeoObjectEditor.js +30 -0
- package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.d.ts +69 -0
- package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.js +488 -0
- package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.d.ts +78 -9
- package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.js +487 -43
- package/lib/js/control/geoObjectEditor/MoveAxisEntity.d.ts +17 -0
- package/lib/js/control/geoObjectEditor/MoveAxisEntity.js +107 -0
- package/lib/js/control/geoObjectEditor/MovePlaneEntity.d.ts +7 -0
- package/lib/js/control/geoObjectEditor/MovePlaneEntity.js +31 -0
- package/lib/js/control/geoObjectEditor/RotateEntity.d.ts +9 -0
- package/lib/js/control/geoObjectEditor/RotateEntity.js +105 -0
- package/lib/js/control/geoObjectEditor/colors.d.ts +8 -0
- package/lib/js/control/geoObjectEditor/colors.js +8 -0
- package/lib/js/control/index.d.ts +3 -2
- package/lib/js/control/index.js +3 -2
- package/lib/js/control/timeline/TimelineControl.js +2 -0
- package/lib/js/control/visibleExtent/Segment.js +4 -4
- package/lib/js/entity/Entity.d.ts +282 -19
- package/lib/js/entity/Entity.js +497 -62
- package/lib/js/entity/EntityCollection.d.ts +8 -9
- package/lib/js/entity/EntityCollection.js +48 -45
- package/lib/js/entity/GeoObject.d.ts +135 -39
- package/lib/js/entity/GeoObject.js +150 -90
- package/lib/js/entity/GeoObjectHandler.d.ts +39 -63
- package/lib/js/entity/GeoObjectHandler.js +198 -295
- package/lib/js/entity/InstanceData.d.ts +76 -0
- package/lib/js/entity/InstanceData.js +347 -0
- package/lib/js/entity/Polyline.d.ts +19 -6
- package/lib/js/entity/Polyline.js +76 -36
- package/lib/js/entity/PolylineHandler.d.ts +7 -0
- package/lib/js/entity/PolylineHandler.js +26 -1
- package/lib/js/index.d.ts +2 -1
- package/lib/js/index.js +2 -1
- package/lib/js/input/MouseHandler.d.ts +1 -0
- package/lib/js/input/MouseHandler.js +12 -1
- package/lib/js/layer/Bing.js +2 -2
- package/lib/js/layer/Vector.d.ts +4 -0
- package/lib/js/layer/Vector.js +16 -0
- package/lib/js/light/LightSource.d.ts +1 -139
- package/lib/js/light/LightSource.js +21 -227
- package/lib/js/math/Mat3.d.ts +1 -1
- package/lib/js/math/Mat3.js +1 -1
- package/lib/js/math/Mat4.d.ts +10 -1
- package/lib/js/math/Mat4.js +17 -1
- package/lib/js/math/Plane.d.ts +3 -1
- package/lib/js/math/Plane.js +11 -1
- package/lib/js/math/Quat.d.ts +47 -33
- package/lib/js/math/Quat.js +92 -90
- package/lib/js/math/Ray.d.ts +10 -14
- package/lib/js/math/Ray.js +56 -33
- package/lib/js/math/Vec2.d.ts +22 -0
- package/lib/js/math/Vec2.js +32 -0
- package/lib/js/math/Vec3.d.ts +15 -0
- package/lib/js/math/Vec3.js +30 -1
- package/lib/js/math.d.ts +2 -2
- package/lib/js/math.js +3 -3
- package/lib/js/quadTree/EntityCollectionNode.d.ts +2 -2
- package/lib/js/quadTree/EntityCollectionNode.js +8 -8
- package/lib/js/quadTree/Node.d.ts +1 -1
- package/lib/js/quadTree/Node.js +2 -2
- package/lib/js/quadTree/QuadTreeStrategy.js +1 -1
- package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +1 -1
- package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.js +2 -2
- package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.d.ts +1 -1
- package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.js +2 -2
- package/lib/js/renderer/Renderer.d.ts +63 -44
- package/lib/js/renderer/Renderer.js +267 -266
- package/lib/js/renderer/RendererEvents.d.ts +2 -0
- package/lib/js/renderer/RendererEvents.js +5 -2
- package/lib/js/scene/Planet.d.ts +15 -7
- package/lib/js/scene/Planet.js +133 -90
- package/lib/js/scene/RenderNode.d.ts +10 -25
- package/lib/js/scene/RenderNode.js +70 -58
- package/lib/js/segment/Segment.js +4 -4
- package/lib/js/shaders/depth.js +2 -5
- package/lib/js/shaders/drawnode.d.ts +1 -0
- package/lib/js/shaders/drawnode.js +51 -52
- package/lib/js/shaders/geoObject.d.ts +1 -0
- package/lib/js/shaders/geoObject.js +154 -91
- package/lib/js/shaders/polyline.js +68 -51
- package/lib/js/shaders/utils.d.ts +1 -1
- package/lib/js/shaders/utils.js +11 -0
- package/lib/js/terrain/GlobusTerrain.js +2 -2
- package/lib/js/ui/Checkbox.d.ts +31 -0
- package/lib/js/ui/Checkbox.js +110 -0
- package/lib/js/ui/Color.js +2 -1
- package/lib/js/ui/Dialog.d.ts +3 -0
- package/lib/js/ui/Dialog.js +20 -0
- package/lib/js/ui/Input.d.ts +32 -0
- package/lib/js/ui/Input.js +107 -0
- package/lib/js/ui/View.d.ts +3 -1
- package/lib/js/ui/View.js +6 -0
- package/lib/js/utils/objParser.d.ts +44 -12
- package/lib/js/utils/objParser.js +241 -149
- package/lib/js/utils/shared.d.ts +22 -0
- package/lib/js/utils/shared.js +34 -0
- package/lib/js/webgl/BaseFramebuffer.d.ts +0 -1
- package/lib/js/webgl/Framebuffer.d.ts +35 -8
- package/lib/js/webgl/Framebuffer.js +136 -29
- package/lib/js/webgl/Handler.d.ts +22 -12
- package/lib/js/webgl/Handler.js +53 -34
- package/lib/js/webgl/Program.js +0 -8
- package/package.json +5 -3
- package/lib/@openglobus/js/control/EarthNavigation.d.ts +0 -50
- package/lib/@openglobus/js/control/MouseWheelZoomControl.d.ts +0 -44
- package/lib/js/control/EarthNavigation.d.ts +0 -50
- package/lib/js/control/EarthNavigation.js +0 -202
|
@@ -13,6 +13,33 @@ import { IRayParams, Ray } from "./Ray";
|
|
|
13
13
|
import { Strip, IStripParams } from "./Strip";
|
|
14
14
|
import { Vector, VectorEventsType } from "../layer/Vector";
|
|
15
15
|
import { EntityCollectionNode } from "../quadTree/EntityCollectionNode";
|
|
16
|
+
import { Quat } from "../math/Quat";
|
|
17
|
+
/**
|
|
18
|
+
* Interface for Entity parameters.
|
|
19
|
+
* @typedef {Object} IEntityParams
|
|
20
|
+
* @property {string} [name] - Name of the entity.
|
|
21
|
+
* @property {any} [properties] - Additional properties of the entity.
|
|
22
|
+
* @property {Vec3 | NumberArray3} [cartesian] - Cartesian position.
|
|
23
|
+
* @property {LonLat | NumberArray3 | NumberArray2} [lonlat] - Geographic coordinates.
|
|
24
|
+
* @property {number} [altitude] - Altitude.
|
|
25
|
+
* @property {boolean} [visibility] - Visibility flag.
|
|
26
|
+
* @property {Billboard | IBillboardParams} [billboard] - Billboard object or parameters.
|
|
27
|
+
* @property {Label | ILabelParams} [label] - Label object or parameters.
|
|
28
|
+
* @property {Polyline | IPolylineParams} [polyline] - Polyline object or parameters.
|
|
29
|
+
* @property {Ray | IRayParams} [ray] - Ray object or parameters.
|
|
30
|
+
* @property {PointCloud | IPointCloudParams} [pointCloud] - Point cloud object or parameters.
|
|
31
|
+
* @property {Geometry | IGeometryParams} [geometry] - Geometry object or parameters.
|
|
32
|
+
* @property {GeoObject | IGeoObjectParams} [geoObject] - Geo object or parameters.
|
|
33
|
+
* @property {Strip | IStripParams} [strip] - Strip object or parameters.
|
|
34
|
+
* @property {boolean} [independentPicking] - Independent picking flag.
|
|
35
|
+
* @property {boolean} [relativePosition] - Parent relative position flag, otherwise position is absolute.
|
|
36
|
+
* @property {number} [pitch] - Rotation around local X-axis.
|
|
37
|
+
* @property {number} [yaw] - Rotation around local Y-axis.
|
|
38
|
+
* @property {number} [roll] - Rotation around local Z-axis.
|
|
39
|
+
* @property {number | Vec3 | NumberArray3} [scale] - Scaling factor.
|
|
40
|
+
* @property {boolean} [forceGlobalPosition] - Forces global position for entity make the same position as its parent.
|
|
41
|
+
* @property {boolean} [forceGlobalRotation] - Forces global rotation for the entity make the same rotation as its parent.
|
|
42
|
+
*/
|
|
16
43
|
export interface IEntityParams {
|
|
17
44
|
name?: string;
|
|
18
45
|
properties?: any;
|
|
@@ -29,25 +56,45 @@ export interface IEntityParams {
|
|
|
29
56
|
geoObject?: GeoObject | IGeoObjectParams;
|
|
30
57
|
strip?: Strip | IStripParams;
|
|
31
58
|
independentPicking?: boolean;
|
|
59
|
+
relativePosition?: boolean;
|
|
60
|
+
pitch?: number;
|
|
61
|
+
yaw?: number;
|
|
62
|
+
roll?: number;
|
|
63
|
+
scale?: number | Vec3 | NumberArray3;
|
|
64
|
+
forceGlobalPosition?: boolean;
|
|
65
|
+
forceGlobalRotation?: boolean;
|
|
66
|
+
forceGlobalScale?: boolean;
|
|
67
|
+
localPosition?: Vec3 | NumberArray3;
|
|
32
68
|
}
|
|
33
69
|
/**
|
|
34
70
|
* Entity instances aggregate multiple forms of visualization into a single high-level object.
|
|
35
71
|
* They can be created manually and added to entity collection.
|
|
36
72
|
*
|
|
37
73
|
* @class
|
|
38
|
-
* @param {
|
|
39
|
-
* @param {string} [options.name] -
|
|
40
|
-
* @param {
|
|
41
|
-
* @param {
|
|
42
|
-
* @param {
|
|
43
|
-
* @param {
|
|
44
|
-
* @param {
|
|
45
|
-
* @param {
|
|
46
|
-
* @param {
|
|
47
|
-
* @param {
|
|
48
|
-
* @param {
|
|
49
|
-
* @param {
|
|
50
|
-
* @param {
|
|
74
|
+
* @param {IEntityParams} [options] - Entity options:
|
|
75
|
+
* @param {string} [options.name] - Name of the entity.
|
|
76
|
+
* @param {any} [options.properties] - Additional properties of the entity.
|
|
77
|
+
* @param {Vec3 | NumberArray3} [options.cartesian] - Cartesian position.
|
|
78
|
+
* @param {LonLat | NumberArray3 | NumberArray2} [options.lonlat] - Geographic coordinates.
|
|
79
|
+
* @param {number} [options.altitude] - Altitude.
|
|
80
|
+
* @param {boolean} [options.visibility] - Visibility flag.
|
|
81
|
+
* @param {Billboard | IBillboardParams} [options.billboard] - Billboard object or parameters.
|
|
82
|
+
* @param {Label | ILabelParams} [options.label] - Label object or parameters.
|
|
83
|
+
* @param {Polyline | IPolylineParams} [options.polyline] - Polyline object or parameters.
|
|
84
|
+
* @param {Ray | IRayParams} [options.ray] - Ray object or parameters.
|
|
85
|
+
* @param {PointCloud | IPointCloudParams} [options.pointCloud] - Point cloud object or parameters.
|
|
86
|
+
* @param {Geometry | IGeometryParams} [options.geometry] - Geometry object or parameters.
|
|
87
|
+
* @param {GeoObject | IGeoObjectParams} [options.geoObject] - Geo object or parameters.
|
|
88
|
+
* @param {Strip | IStripParams} [options.strip] - Strip object or parameters.
|
|
89
|
+
* @param {boolean} [options.independentPicking] - Independent picking flag.
|
|
90
|
+
* @param {boolean} [options.relativePosition] - Parent relative position flag, otherwise position is absolute.
|
|
91
|
+
* @param {number} [options.pitch] - Rotation around local X-axis in radians.
|
|
92
|
+
* @param {number} [options.yaw] - Rotation around local Y-axis in radians.
|
|
93
|
+
* @param {number} [options.roll] - Rotation around local Z-axis in radians.
|
|
94
|
+
* @param {number | Vec3 | NumberArray3} [options.scale] - Scaling factor.
|
|
95
|
+
* @param {boolean} [options.forceGlobalPosition] - Forces global position for the entity make the same position as its parent.
|
|
96
|
+
* @param {boolean} [options.forceGlobalRotation] - Forces global rotation for the entity make the same rotation as its parent.
|
|
97
|
+
* @param {boolean} [options.forceGlobalScale] - Forces global scale for the entity make the same scale as its parent.
|
|
51
98
|
*/
|
|
52
99
|
declare class Entity {
|
|
53
100
|
static __counter__: number;
|
|
@@ -68,7 +115,10 @@ declare class Entity {
|
|
|
68
115
|
* @public
|
|
69
116
|
* @type {Array.<Entity>}
|
|
70
117
|
*/
|
|
71
|
-
|
|
118
|
+
childEntities: Entity[];
|
|
119
|
+
forceGlobalPosition: boolean;
|
|
120
|
+
forceGlobalRotation: boolean;
|
|
121
|
+
forceGlobalScale: boolean;
|
|
72
122
|
/**
|
|
73
123
|
* Parent entity.
|
|
74
124
|
* @public
|
|
@@ -81,6 +131,14 @@ declare class Entity {
|
|
|
81
131
|
* @type {Vec3}
|
|
82
132
|
*/
|
|
83
133
|
_cartesian: Vec3;
|
|
134
|
+
/**
|
|
135
|
+
* Entity cartesian is equal root entity absolute cartesian.
|
|
136
|
+
* @protected
|
|
137
|
+
* @type {Vec3}
|
|
138
|
+
*/
|
|
139
|
+
protected _rootCartesian: Vec3;
|
|
140
|
+
protected _localPosition: Vec3;
|
|
141
|
+
protected _absoluteLocalPosition: Vec3;
|
|
84
142
|
/**
|
|
85
143
|
* Geodetic entity coordinates.
|
|
86
144
|
* @public
|
|
@@ -186,23 +244,76 @@ declare class Entity {
|
|
|
186
244
|
*/
|
|
187
245
|
strip: Strip | null;
|
|
188
246
|
_nodePtr?: EntityCollectionNode;
|
|
247
|
+
protected _relativePosition: boolean;
|
|
248
|
+
protected _pitchRad: number;
|
|
249
|
+
protected _yawRad: number;
|
|
250
|
+
protected _rollRad: number;
|
|
251
|
+
protected _scale: Vec3;
|
|
252
|
+
protected _qFrame: Quat;
|
|
253
|
+
protected _qRot: Quat;
|
|
254
|
+
_absoluteQRot: Quat;
|
|
189
255
|
constructor(options?: IEntityParams);
|
|
256
|
+
/**
|
|
257
|
+
* Returns root entity object.
|
|
258
|
+
* @public
|
|
259
|
+
* @return {Entity}
|
|
260
|
+
*/
|
|
261
|
+
get rootEntity(): Entity;
|
|
262
|
+
/**
|
|
263
|
+
* Sets relative position property
|
|
264
|
+
* @param isRelative
|
|
265
|
+
*/
|
|
266
|
+
set relativePosition(isRelative: boolean);
|
|
267
|
+
/**
|
|
268
|
+
* Gets relative position property
|
|
269
|
+
* @public
|
|
270
|
+
* @returns{boolean}
|
|
271
|
+
*/
|
|
272
|
+
get relativePosition(): boolean;
|
|
273
|
+
/**
|
|
274
|
+
* Gets current entity collection container.
|
|
275
|
+
* @public
|
|
276
|
+
* @returns {EntityCollection | null}
|
|
277
|
+
*/
|
|
278
|
+
get entityCollection(): EntityCollection | null;
|
|
279
|
+
/**
|
|
280
|
+
* Gets entity uniq id
|
|
281
|
+
* @public
|
|
282
|
+
* @returns {number}
|
|
283
|
+
*/
|
|
190
284
|
get id(): number;
|
|
285
|
+
/**
|
|
286
|
+
* Checks if the given entity is equal to the current entity.
|
|
287
|
+
* @param {Entity} entity - The entity to compare.
|
|
288
|
+
* @returns {boolean} True if entities are equal, otherwise false.
|
|
289
|
+
*/
|
|
191
290
|
isEqual(entity: Entity): boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Gets the layer index of the entity.
|
|
293
|
+
* @returns {number} The layer index.
|
|
294
|
+
*/
|
|
192
295
|
get layerIndex(): number;
|
|
296
|
+
/**
|
|
297
|
+
* Gets the instance class name of the entity.
|
|
298
|
+
* @returns {string} The instance name "Entity".
|
|
299
|
+
*/
|
|
193
300
|
get instanceName(): string;
|
|
194
301
|
protected _createOptionFeature<T, K>(featureName: string, options?: T | K): T | null;
|
|
302
|
+
/**
|
|
303
|
+
* Gets the collection index of the entity.
|
|
304
|
+
* @returns {number} The entity collection index.
|
|
305
|
+
*/
|
|
195
306
|
getCollectionIndex(): number;
|
|
196
307
|
/**
|
|
197
308
|
* Adds current entity into the specified entity collection.
|
|
198
309
|
* @public
|
|
199
310
|
* @param {EntityCollection | Vector} collection - Specified entity collection or vector layer.
|
|
200
|
-
* @param {
|
|
311
|
+
* @param {boolean} [rightNow=false] - Entity insertion option for vector layer.
|
|
201
312
|
* @returns {Entity} - This object.
|
|
202
313
|
*/
|
|
203
|
-
addTo(collection: EntityCollection | Vector, rightNow?: boolean):
|
|
314
|
+
addTo(collection: EntityCollection | Vector, rightNow?: boolean): Entity;
|
|
204
315
|
/**
|
|
205
|
-
* Removes current entity from collection
|
|
316
|
+
* Removes current entity from its collection or layer.
|
|
206
317
|
* @public
|
|
207
318
|
*/
|
|
208
319
|
remove(): void;
|
|
@@ -224,6 +335,150 @@ declare class Entity {
|
|
|
224
335
|
* @param {Vec3} cartesian - Cartesian position in 3d space.
|
|
225
336
|
*/
|
|
226
337
|
setCartesian3v(cartesian: Vec3): void;
|
|
338
|
+
/**
|
|
339
|
+
* Gets scale factor
|
|
340
|
+
* @public
|
|
341
|
+
* @returns {Vec3}
|
|
342
|
+
*/
|
|
343
|
+
getScale(): Vec3;
|
|
344
|
+
/**
|
|
345
|
+
* Sets XYZ axis scale for the inner object such as GeoObject
|
|
346
|
+
* @public
|
|
347
|
+
* @param {Vec3} scale - Scale factor
|
|
348
|
+
*/
|
|
349
|
+
setScale3v(scale: Vec3): void;
|
|
350
|
+
/**
|
|
351
|
+
* Sets scale for the inner object such as GeoObject
|
|
352
|
+
* @public
|
|
353
|
+
* @param {number} val - Scale factor
|
|
354
|
+
*/
|
|
355
|
+
setScale(val: number): void;
|
|
356
|
+
/**
|
|
357
|
+
* Gets the absolute rotation direction of the entity.
|
|
358
|
+
* @public
|
|
359
|
+
* @returns {Quat} The absolute rotation quaternion.
|
|
360
|
+
*/
|
|
361
|
+
getAbsoluteRotation(): Quat;
|
|
362
|
+
/**
|
|
363
|
+
* Gets the local rotation of the entity. For the root entity it is equal to the absolute rotation.
|
|
364
|
+
* @public
|
|
365
|
+
* @returns {Quat} The rotation quaternion.
|
|
366
|
+
*/
|
|
367
|
+
getRotation(): Quat;
|
|
368
|
+
/**
|
|
369
|
+
* Rotates the entity to look at a given point in world coordinates.
|
|
370
|
+
* @public
|
|
371
|
+
* @param {Vec3} cart - The target position to look at.
|
|
372
|
+
*/
|
|
373
|
+
setLook3v(cart: Vec3): void;
|
|
374
|
+
/**
|
|
375
|
+
* Rotates the entity to look at a given geographic coordinate.
|
|
376
|
+
* @public
|
|
377
|
+
* @param {LonLat} lonLat - The longitude and latitude to look at.
|
|
378
|
+
*/
|
|
379
|
+
setLookLonLat(lonLat: LonLat): void;
|
|
380
|
+
/**
|
|
381
|
+
* Sets the absolute rotation of the entity.
|
|
382
|
+
* @public
|
|
383
|
+
* @param {Quat} rot - The new absolute rotation quaternion.
|
|
384
|
+
*/
|
|
385
|
+
setAbsoluteRotation(rot: Quat): void;
|
|
386
|
+
/**
|
|
387
|
+
* Sets the local rotation of the entity.
|
|
388
|
+
* @param {Quat} rot - The new rotation quaternion.
|
|
389
|
+
*/
|
|
390
|
+
setRotation(rot: Quat): void;
|
|
391
|
+
/**
|
|
392
|
+
* Sets the pitch rotation of the entity.
|
|
393
|
+
* @param {number} val - The new pitch angle in radians.
|
|
394
|
+
*/
|
|
395
|
+
setPitch(val: number): void;
|
|
396
|
+
/**
|
|
397
|
+
* Sets the yaw rotation of the entity.
|
|
398
|
+
* @param {number} val - The new yaw angle in radians.
|
|
399
|
+
*/
|
|
400
|
+
setYaw(val: number): void;
|
|
401
|
+
/**
|
|
402
|
+
* Sets the roll rotation of the entity.
|
|
403
|
+
* @public
|
|
404
|
+
* @param {number} val - The new roll angle in radians.
|
|
405
|
+
*/
|
|
406
|
+
setRoll(val: number): void;
|
|
407
|
+
/**
|
|
408
|
+
* Gets the pitch angle of the entity.
|
|
409
|
+
* @public
|
|
410
|
+
* @returns {number} The pitch angle in radians.
|
|
411
|
+
*/
|
|
412
|
+
getPitch(): number;
|
|
413
|
+
/**
|
|
414
|
+
* Gets the yaw angle of the entity.
|
|
415
|
+
* @public
|
|
416
|
+
* @returns {number} The yaw angle in radians.
|
|
417
|
+
*/
|
|
418
|
+
getYaw(): number;
|
|
419
|
+
/**
|
|
420
|
+
* Gets the roll angle of the entity.
|
|
421
|
+
* @public
|
|
422
|
+
* @returns {number} The roll angle in radians.
|
|
423
|
+
*/
|
|
424
|
+
getRoll(): number;
|
|
425
|
+
/**
|
|
426
|
+
* Sets the absolute pitch of the entity.
|
|
427
|
+
* @public
|
|
428
|
+
* @param {number} val - The absolute pitch angle in radians.
|
|
429
|
+
*/
|
|
430
|
+
setAbsolutePitch(val: number): void;
|
|
431
|
+
/**
|
|
432
|
+
* Sets the absolute yaw of the entity.
|
|
433
|
+
* @public
|
|
434
|
+
* @param {number} val - The absolute yaw angle in radians.
|
|
435
|
+
*/
|
|
436
|
+
setAbsoluteYaw(val: number): void;
|
|
437
|
+
/**
|
|
438
|
+
* Sets the absolute roll of the entity.
|
|
439
|
+
* @public
|
|
440
|
+
* @param {number} val - The absolute roll angle in radians.
|
|
441
|
+
*/
|
|
442
|
+
setAbsoluteRoll(val: number): void;
|
|
443
|
+
/**
|
|
444
|
+
* Gets the absolute pitch angle of the entity.
|
|
445
|
+
* @public
|
|
446
|
+
* @returns {number} The absolute pitch angle in radians.
|
|
447
|
+
*/
|
|
448
|
+
getAbsolutePitch(): number;
|
|
449
|
+
/**
|
|
450
|
+
* Gets the absolute yaw angle of the entity.
|
|
451
|
+
* @public
|
|
452
|
+
* @returns {number} The absolute yaw angle in radians.
|
|
453
|
+
*/
|
|
454
|
+
getAbsoluteYaw(): number;
|
|
455
|
+
/**
|
|
456
|
+
* Gets the absolute roll angle of the entity.
|
|
457
|
+
* @public
|
|
458
|
+
* @returns {number} The absolute roll angle in radians.
|
|
459
|
+
*/
|
|
460
|
+
getAbsoluteRoll(): number;
|
|
461
|
+
protected _getScaleByDistance(): number;
|
|
462
|
+
/**
|
|
463
|
+
* Sets the absolute cartesian position of the entity.
|
|
464
|
+
* @public
|
|
465
|
+
* @param {number} x - X coordinate.
|
|
466
|
+
* @param {number} y - Y coordinate.
|
|
467
|
+
* @param {number} z - Z coordinate.
|
|
468
|
+
*/
|
|
469
|
+
setAbsoluteCartesian(x: number, y: number, z: number): void;
|
|
470
|
+
/**
|
|
471
|
+
* Sets the absolute cartesian position of the entity using a Vec3.
|
|
472
|
+
* @public
|
|
473
|
+
* @param {Vec3} absolutCartesian - The absolute cartesian position.
|
|
474
|
+
*/
|
|
475
|
+
setAbsoluteCartesian3v(absolutCartesian: Vec3): void;
|
|
476
|
+
/**
|
|
477
|
+
* Returns absolute cartesian position.
|
|
478
|
+
* @public
|
|
479
|
+
* @returns {Vec3} -
|
|
480
|
+
*/
|
|
481
|
+
getAbsoluteCartesian(): Vec3;
|
|
227
482
|
/**
|
|
228
483
|
* Sets entity cartesian position.
|
|
229
484
|
* @public
|
|
@@ -231,7 +486,9 @@ declare class Entity {
|
|
|
231
486
|
* @param {number} y - 3d space Y - position.
|
|
232
487
|
* @param {number} z - 3d space Z - position.
|
|
233
488
|
*/
|
|
234
|
-
setCartesian(x
|
|
489
|
+
setCartesian(x: number, y: number, z: number): void;
|
|
490
|
+
protected _updatePitchYawRoll(): void;
|
|
491
|
+
_updateAbsolutePosition(): void;
|
|
235
492
|
/**
|
|
236
493
|
* Sets entity cartesian position without event dispatching.
|
|
237
494
|
* @public
|
|
@@ -239,6 +496,7 @@ declare class Entity {
|
|
|
239
496
|
* @param {boolean} skipLonLat - skip geodetic calculation.
|
|
240
497
|
*/
|
|
241
498
|
_setCartesian3vSilent(cartesian: Vec3, skipLonLat?: boolean): void;
|
|
499
|
+
protected _updateLonLat(): void;
|
|
242
500
|
/**
|
|
243
501
|
* Gets entity geodetic coordinates.
|
|
244
502
|
* @public
|
|
@@ -248,7 +506,7 @@ declare class Entity {
|
|
|
248
506
|
/**
|
|
249
507
|
* Sets geodetic coordinates of the entity point object.
|
|
250
508
|
* @public
|
|
251
|
-
* @param {LonLat} lonlat -
|
|
509
|
+
* @param {LonLat} lonlat - coordinates.
|
|
252
510
|
*/
|
|
253
511
|
setLonLat(lonlat: LonLat): void;
|
|
254
512
|
/**
|
|
@@ -333,6 +591,11 @@ declare class Entity {
|
|
|
333
591
|
* @returns {Strip} -
|
|
334
592
|
*/
|
|
335
593
|
setStrip(strip: Strip): Strip;
|
|
594
|
+
/**
|
|
595
|
+
* Gets layer container
|
|
596
|
+
* @public
|
|
597
|
+
* @returns {Vector | null}
|
|
598
|
+
*/
|
|
336
599
|
get layer(): Vector | null;
|
|
337
600
|
get rendererEvents(): VectorEventsType | EntityCollectionEvents | null;
|
|
338
601
|
/**
|
|
@@ -5,7 +5,7 @@ import { Ellipsoid } from "../ellipsoid/Ellipsoid";
|
|
|
5
5
|
import { EntityCollectionNode } from "../quadTree/EntityCollectionNode";
|
|
6
6
|
import { GeoObjectHandler } from "./GeoObjectHandler";
|
|
7
7
|
import { LabelHandler } from "./LabelHandler";
|
|
8
|
-
import { NumberArray3 } from "../math/Vec3";
|
|
8
|
+
import { Vec3, NumberArray3 } from "../math/Vec3";
|
|
9
9
|
import { PointCloudHandler } from "./PointCloudHandler";
|
|
10
10
|
import { PolylineHandler } from "./PolylineHandler";
|
|
11
11
|
import { RayHandler } from "./RayHandler";
|
|
@@ -23,6 +23,7 @@ interface IEntityCollectionParams {
|
|
|
23
23
|
opacity?: number;
|
|
24
24
|
useLighting?: boolean;
|
|
25
25
|
entities?: Entity[];
|
|
26
|
+
depthOrder?: number;
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* An observable collection of og.Entity instances where each entity has a unique id.
|
|
@@ -80,12 +81,6 @@ declare class EntityCollection {
|
|
|
80
81
|
* @readonly
|
|
81
82
|
*/
|
|
82
83
|
protected __id: number;
|
|
83
|
-
/**
|
|
84
|
-
* Render node collections array index.
|
|
85
|
-
* @protected
|
|
86
|
-
* @type {number}
|
|
87
|
-
*/
|
|
88
|
-
protected _renderNodeIndex: number;
|
|
89
84
|
/**
|
|
90
85
|
* Render node context.
|
|
91
86
|
* @public
|
|
@@ -186,12 +181,15 @@ declare class EntityCollection {
|
|
|
186
181
|
_layer?: Vector;
|
|
187
182
|
_quadNode?: EntityCollectionNode;
|
|
188
183
|
_useLighting: number;
|
|
184
|
+
protected _depthOrder: number;
|
|
189
185
|
constructor(options?: IEntityCollectionParams);
|
|
186
|
+
get depthOrder(): number;
|
|
187
|
+
set depthOrder(depghOrder: number);
|
|
190
188
|
isEmpty(): boolean;
|
|
191
189
|
get id(): number;
|
|
192
190
|
get useLighting(): boolean;
|
|
193
191
|
set useLighting(f: boolean);
|
|
194
|
-
isEqual(ec: EntityCollection): boolean;
|
|
192
|
+
isEqual(ec: EntityCollection | null): boolean;
|
|
195
193
|
/**
|
|
196
194
|
* Sets collection visibility.
|
|
197
195
|
* @public
|
|
@@ -252,7 +250,7 @@ declare class EntityCollection {
|
|
|
252
250
|
* @param {Entity} entity - Entity.
|
|
253
251
|
* @returns {boolean} -
|
|
254
252
|
*/
|
|
255
|
-
belongs(entity: Entity): boolean
|
|
253
|
+
belongs(entity: Entity): boolean;
|
|
256
254
|
protected _removeRecursively(entity: Entity): void;
|
|
257
255
|
/**
|
|
258
256
|
* Removes entity from this collection.
|
|
@@ -286,6 +284,7 @@ declare class EntityCollection {
|
|
|
286
284
|
* @param {RenderNode} renderNode
|
|
287
285
|
*/
|
|
288
286
|
bindRenderNode(renderNode: RenderNode): void;
|
|
287
|
+
protected _onChangeRelativeCenter: (c: Vec3) => void;
|
|
289
288
|
/**
|
|
290
289
|
* Updates coordinates all lonLat entities in collection after collection attached to the planet node.
|
|
291
290
|
* @protected
|