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