bruce-cesium 4.3.7 → 4.3.8
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/bruce-cesium.es5.js +45 -225
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +43 -223
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/utils/entity-utils.js +42 -222
- package/dist/lib/utils/entity-utils.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/utils/entity-utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -2412,13 +2412,12 @@
|
|
|
2412
2412
|
});
|
|
2413
2413
|
}); };
|
|
2414
2414
|
getEntityPositions = function (sample) { return __awaiter(_this, void 0, void 0, function () {
|
|
2415
|
-
var entityId, entity,
|
|
2415
|
+
var entityId, entity, disallowRendered, evaluateRendered, evaluateRecord, renderedPosses, e_1, recordPosses, e_2, pos3d, eLocation, geometryRadius, sphere;
|
|
2416
2416
|
var _this = this;
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
switch (_e.label) {
|
|
2417
|
+
return __generator(this, function (_a) {
|
|
2418
|
+
switch (_a.label) {
|
|
2420
2419
|
case 0:
|
|
2421
|
-
entityId = sample.entityId, entity = sample.entity,
|
|
2420
|
+
entityId = sample.entityId, entity = sample.entity, disallowRendered = sample.disallowRendered;
|
|
2422
2421
|
evaluateRendered = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2423
2422
|
var rego, posses, parts, i, part, visualHeightRef, hierarchy, hPosses, hPossesSample, step, i_1, pPosses, pPossesSample, step, i_2, pPosses, pPossesSample, step, i_3, pos3d_1, toAdjust, modelExt, sphere, semiMajorAxis, semiMinorAxis, height, radius, sphere, data_1, pos3d_2, toAdjust, sphere;
|
|
2424
2423
|
return __generator(this, function (_a) {
|
|
@@ -2654,18 +2653,18 @@
|
|
|
2654
2653
|
if (!(disallowRendered != true)) return [3 /*break*/, 2];
|
|
2655
2654
|
return [4 /*yield*/, evaluateRendered()];
|
|
2656
2655
|
case 1:
|
|
2657
|
-
renderedPosses =
|
|
2656
|
+
renderedPosses = _a.sent();
|
|
2658
2657
|
if (renderedPosses === null || renderedPosses === void 0 ? void 0 : renderedPosses.length) {
|
|
2659
2658
|
return [2 /*return*/, renderedPosses];
|
|
2660
2659
|
}
|
|
2661
|
-
|
|
2660
|
+
_a.label = 2;
|
|
2662
2661
|
case 2:
|
|
2663
2662
|
if (!!entity) return [3 /*break*/, 6];
|
|
2664
2663
|
if (!(apiCalls < MAX_API_CALLS)) return [3 /*break*/, 6];
|
|
2665
2664
|
apiCalls += 1;
|
|
2666
|
-
|
|
2665
|
+
_a.label = 3;
|
|
2667
2666
|
case 3:
|
|
2668
|
-
|
|
2667
|
+
_a.trys.push([3, 5, , 6]);
|
|
2669
2668
|
return [4 /*yield*/, BModels.Entity.Get({
|
|
2670
2669
|
api: api,
|
|
2671
2670
|
entityId: entityId,
|
|
@@ -2674,10 +2673,10 @@
|
|
|
2674
2673
|
migrated: true
|
|
2675
2674
|
})];
|
|
2676
2675
|
case 4:
|
|
2677
|
-
entity = (
|
|
2676
|
+
entity = (_a.sent()).entity;
|
|
2678
2677
|
return [3 /*break*/, 6];
|
|
2679
2678
|
case 5:
|
|
2680
|
-
e_1 =
|
|
2679
|
+
e_1 = _a.sent();
|
|
2681
2680
|
console.error(e_1);
|
|
2682
2681
|
return [3 /*break*/, 6];
|
|
2683
2682
|
case 6:
|
|
@@ -2686,132 +2685,43 @@
|
|
|
2686
2685
|
}
|
|
2687
2686
|
return [4 /*yield*/, evaluateRecord()];
|
|
2688
2687
|
case 7:
|
|
2689
|
-
recordPosses =
|
|
2688
|
+
recordPosses = _a.sent();
|
|
2690
2689
|
if (recordPosses === null || recordPosses === void 0 ? void 0 : recordPosses.length) {
|
|
2691
2690
|
return [2 /*return*/, recordPosses];
|
|
2692
2691
|
}
|
|
2693
2692
|
if (!(apiCalls < MAX_API_CALLS)) return [3 /*break*/, 11];
|
|
2694
|
-
|
|
2693
|
+
_a.label = 8;
|
|
2695
2694
|
case 8:
|
|
2696
|
-
|
|
2695
|
+
_a.trys.push([8, 10, , 11]);
|
|
2697
2696
|
apiCalls += 1;
|
|
2698
2697
|
return [4 /*yield*/, BModels.Entity.Get({
|
|
2699
2698
|
api: api,
|
|
2700
2699
|
entityId: entityId,
|
|
2701
|
-
// We'll be expanding relative positioning and related
|
|
2700
|
+
// We'll be expanding relative positioning and related assemblies now.
|
|
2702
2701
|
expandLocation: true,
|
|
2703
2702
|
migrated: true
|
|
2704
2703
|
})];
|
|
2705
2704
|
case 9:
|
|
2706
|
-
entity = (
|
|
2705
|
+
entity = (_a.sent()).entity;
|
|
2707
2706
|
return [3 /*break*/, 11];
|
|
2708
2707
|
case 10:
|
|
2709
|
-
e_2 =
|
|
2708
|
+
e_2 = _a.sent();
|
|
2710
2709
|
console.warn(e_2);
|
|
2711
2710
|
return [3 /*break*/, 11];
|
|
2712
2711
|
case 11:
|
|
2713
|
-
if (!tilesetId) {
|
|
2714
|
-
tilesetIds = BModels.Entity.GetValue({
|
|
2715
|
-
entity: entity,
|
|
2716
|
-
path: ["Bruce", "TilesetIDs"]
|
|
2717
|
-
});
|
|
2718
|
-
tilesetId = (tilesetIds === null || tilesetIds === void 0 ? void 0 : tilesetIds.length) ? tilesetIds[0] : tilesetId;
|
|
2719
|
-
}
|
|
2720
|
-
if (!!tileset) return [3 /*break*/, 13];
|
|
2721
|
-
if (!(tilesetId && apiCalls < MAX_API_CALLS)) return [3 /*break*/, 13];
|
|
2722
|
-
apiCalls += 1;
|
|
2723
|
-
return [4 /*yield*/, BModels.Tileset.Get({
|
|
2724
|
-
api: api,
|
|
2725
|
-
tilesetId: tilesetId
|
|
2726
|
-
})];
|
|
2727
|
-
case 12:
|
|
2728
|
-
tileset = (_e.sent()).tileset;
|
|
2729
|
-
_e.label = 13;
|
|
2730
|
-
case 13:
|
|
2731
|
-
tSettings = tileset === null || tileset === void 0 ? void 0 : tileset.settings;
|
|
2732
2712
|
pos3d = null;
|
|
2733
2713
|
eLocation = BModels.Entity.GetValue({
|
|
2734
2714
|
entity: entity,
|
|
2735
2715
|
path: ["Bruce", "Location"]
|
|
2736
2716
|
});
|
|
2737
|
-
if (!(
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
if (isNaN(alt)) {
|
|
2741
|
-
alt = 0;
|
|
2742
|
-
}
|
|
2743
|
-
pos3d = Cesium.Cartesian3.fromDegrees(+eLocation.longitude, +eLocation.latitude, alt);
|
|
2744
|
-
}
|
|
2745
|
-
else {
|
|
2746
|
-
alt = +tSettings.location.altitude;
|
|
2747
|
-
if (isNaN(alt)) {
|
|
2748
|
-
alt = 0;
|
|
2749
|
-
}
|
|
2750
|
-
pos3d = Cesium.Cartesian3.fromDegrees(+tSettings.location.longitude, +tSettings.location.latitude, alt);
|
|
2751
|
-
}
|
|
2752
|
-
worldPosition = BModels.Entity.GetValue({
|
|
2753
|
-
entity: entity,
|
|
2754
|
-
path: ["Bruce", "AssemblyWorldPosition"]
|
|
2755
|
-
});
|
|
2756
|
-
if (!worldPosition) return [3 /*break*/, 16];
|
|
2757
|
-
eTransform = BModels.Entity.GetValue({
|
|
2758
|
-
entity: entity,
|
|
2759
|
-
path: ["Bruce", "Transform"]
|
|
2760
|
-
});
|
|
2761
|
-
heading = 0;
|
|
2762
|
-
pitch = 0;
|
|
2763
|
-
roll = 0;
|
|
2764
|
-
if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.heading) {
|
|
2765
|
-
heading = eTransform.heading;
|
|
2766
|
-
}
|
|
2767
|
-
else if ((_b = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _b === void 0 ? void 0 : _b.heading) {
|
|
2768
|
-
heading = tSettings.transform.heading;
|
|
2769
|
-
}
|
|
2770
|
-
if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.pitch) {
|
|
2771
|
-
pitch = eTransform.pitch;
|
|
2772
|
-
}
|
|
2773
|
-
else if ((_c = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _c === void 0 ? void 0 : _c.pitch) {
|
|
2774
|
-
pitch = tSettings.transform.pitch;
|
|
2775
|
-
}
|
|
2776
|
-
if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.roll) {
|
|
2777
|
-
roll = eTransform.roll;
|
|
2778
|
-
}
|
|
2779
|
-
else if ((_d = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _d === void 0 ? void 0 : _d.roll) {
|
|
2780
|
-
roll = tSettings.transform.roll;
|
|
2781
|
-
}
|
|
2782
|
-
heading = +heading;
|
|
2783
|
-
if (isNaN(heading)) {
|
|
2784
|
-
heading = 0;
|
|
2785
|
-
}
|
|
2786
|
-
pitch = +pitch;
|
|
2787
|
-
if (isNaN(pitch)) {
|
|
2788
|
-
pitch = 0;
|
|
2789
|
-
}
|
|
2790
|
-
roll = +roll;
|
|
2791
|
-
if (isNaN(roll)) {
|
|
2792
|
-
roll = 0;
|
|
2793
|
-
}
|
|
2794
|
-
matrix4 = worldPosition;
|
|
2795
|
-
offset = new Cesium.Cartesian3(+matrix4[0][3], +matrix4[1][3], +matrix4[2][3]);
|
|
2796
|
-
worldPivot = BModels.Entity.GetValue({
|
|
2797
|
-
entity: entity,
|
|
2798
|
-
path: ["Bruce", "GeometryWorldPivot"]
|
|
2799
|
-
});
|
|
2800
|
-
if (worldPivot) //the position from worldMatrix + center of geometry offset
|
|
2801
|
-
{
|
|
2802
|
-
offset = new Cesium.Cartesian3(worldPivot[0], worldPivot[1], worldPivot[2]);
|
|
2803
|
-
}
|
|
2804
|
-
m1 = Cesium.Transforms.eastNorthUpToFixedFrame(pos3d);
|
|
2805
|
-
hpr = Cesium.HeadingPitchRoll.fromDegrees(heading, pitch, roll, new Cesium.HeadingPitchRoll());
|
|
2806
|
-
transform = Cesium.Matrix3.fromHeadingPitchRoll(hpr);
|
|
2807
|
-
transformedOffset = Cesium.Matrix3.multiplyByVector(transform, offset, new Cesium.Cartesian3());
|
|
2808
|
-
pos3d = Cesium.Matrix4.multiplyByPoint(m1, transformedOffset, new Cesium.Cartesian3());
|
|
2809
|
-
if (!(pos3d === null || pos3d === void 0 ? void 0 : pos3d.x)) return [3 /*break*/, 15];
|
|
2717
|
+
if (!(eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude)) return [3 /*break*/, 14];
|
|
2718
|
+
pos3d = Cesium.Cartesian3.fromDegrees(EnsureNumber(eLocation.longitude), EnsureNumber(eLocation.latitude), EnsureNumber(eLocation.altitude));
|
|
2719
|
+
if (!(pos3d === null || pos3d === void 0 ? void 0 : pos3d.x)) return [3 /*break*/, 13];
|
|
2810
2720
|
return [4 /*yield*/, processPosHeight(pos3d, Cesium.HeightReference.NONE)];
|
|
2811
|
-
case
|
|
2812
|
-
pos3d =
|
|
2813
|
-
|
|
2814
|
-
case
|
|
2721
|
+
case 12:
|
|
2722
|
+
pos3d = _a.sent();
|
|
2723
|
+
_a.label = 13;
|
|
2724
|
+
case 13:
|
|
2815
2725
|
geometryRadius = BModels.Entity.GetValue({
|
|
2816
2726
|
entity: entity,
|
|
2817
2727
|
path: ["Bruce", "GeometryRadius"]
|
|
@@ -2824,8 +2734,8 @@
|
|
|
2824
2734
|
spheres.push(sphere);
|
|
2825
2735
|
}
|
|
2826
2736
|
}
|
|
2827
|
-
|
|
2828
|
-
case
|
|
2737
|
+
_a.label = 14;
|
|
2738
|
+
case 14:
|
|
2829
2739
|
if (pos3d) {
|
|
2830
2740
|
return [2 /*return*/, [pos3d]];
|
|
2831
2741
|
}
|
|
@@ -3078,25 +2988,24 @@
|
|
|
3078
2988
|
EntityUtils.GetPos = GetPos;
|
|
3079
2989
|
/**
|
|
3080
2990
|
* Returns the position of the entity.
|
|
3081
|
-
* This is an async variant that checks for related
|
|
2991
|
+
* This is an async variant that checks for related assemblies.
|
|
3082
2992
|
* @param params
|
|
3083
2993
|
* @deprecated use GetLocation instead.
|
|
3084
2994
|
* @returns
|
|
3085
2995
|
*/
|
|
3086
2996
|
function GetPosAsync(params) {
|
|
3087
|
-
var _a, _b, _c, _d;
|
|
3088
2997
|
return __awaiter(this, void 0, void 0, function () {
|
|
3089
|
-
var viewer, entityId, entity,
|
|
3090
|
-
return __generator(this, function (
|
|
3091
|
-
switch (
|
|
2998
|
+
var viewer, entityId, entity, visualRegister, returnHeightRef, recordHeightRef, api, lat, lon, location_1, e_3, e_4, pos3d, eLocation;
|
|
2999
|
+
return __generator(this, function (_a) {
|
|
3000
|
+
switch (_a.label) {
|
|
3092
3001
|
case 0:
|
|
3093
|
-
viewer = params.viewer, entityId = params.entityId, entity = params.entity,
|
|
3002
|
+
viewer = params.viewer, entityId = params.entityId, entity = params.entity, visualRegister = params.visualRegister, returnHeightRef = params.returnHeightRef, recordHeightRef = params.recordHeightRef, api = params.api;
|
|
3094
3003
|
if (!!entity) return [3 /*break*/, 9];
|
|
3095
3004
|
lat = 0;
|
|
3096
3005
|
lon = 0;
|
|
3097
|
-
|
|
3006
|
+
_a.label = 1;
|
|
3098
3007
|
case 1:
|
|
3099
|
-
|
|
3008
|
+
_a.trys.push([1, 3, , 4]);
|
|
3100
3009
|
return [4 /*yield*/, BModels.Entity.Get({
|
|
3101
3010
|
api: api,
|
|
3102
3011
|
entityId: entityId,
|
|
@@ -3104,7 +3013,7 @@
|
|
|
3104
3013
|
migrated: true
|
|
3105
3014
|
})];
|
|
3106
3015
|
case 2:
|
|
3107
|
-
entity = (
|
|
3016
|
+
entity = (_a.sent()).entity;
|
|
3108
3017
|
if (entity) {
|
|
3109
3018
|
location_1 = BModels.Entity.GetValue({
|
|
3110
3019
|
entity: entity,
|
|
@@ -3115,14 +3024,14 @@
|
|
|
3115
3024
|
}
|
|
3116
3025
|
return [3 /*break*/, 4];
|
|
3117
3026
|
case 3:
|
|
3118
|
-
e_3 =
|
|
3027
|
+
e_3 = _a.sent();
|
|
3119
3028
|
console.error(e_3);
|
|
3120
3029
|
return [3 /*break*/, 4];
|
|
3121
3030
|
case 4:
|
|
3122
3031
|
if (!(entity && (isNaN(lat) || isNaN(lon) || (lat == 0 && lon == 0)))) return [3 /*break*/, 9];
|
|
3123
|
-
|
|
3032
|
+
_a.label = 5;
|
|
3124
3033
|
case 5:
|
|
3125
|
-
|
|
3034
|
+
_a.trys.push([5, 7, , 9]);
|
|
3126
3035
|
return [4 /*yield*/, BModels.Entity.Get({
|
|
3127
3036
|
api: api,
|
|
3128
3037
|
entityId: entityId,
|
|
@@ -3130,10 +3039,10 @@
|
|
|
3130
3039
|
migrated: true
|
|
3131
3040
|
})];
|
|
3132
3041
|
case 6:
|
|
3133
|
-
entity = (
|
|
3042
|
+
entity = (_a.sent()).entity;
|
|
3134
3043
|
return [3 /*break*/, 9];
|
|
3135
3044
|
case 7:
|
|
3136
|
-
e_4 =
|
|
3045
|
+
e_4 = _a.sent();
|
|
3137
3046
|
console.warn(e_4);
|
|
3138
3047
|
return [4 /*yield*/, BModels.Entity.Get({
|
|
3139
3048
|
api: api,
|
|
@@ -3142,20 +3051,13 @@
|
|
|
3142
3051
|
migrated: true
|
|
3143
3052
|
})];
|
|
3144
3053
|
case 8:
|
|
3145
|
-
entity = (
|
|
3054
|
+
entity = (_a.sent()).entity;
|
|
3146
3055
|
return [3 /*break*/, 9];
|
|
3147
3056
|
case 9:
|
|
3148
3057
|
if (!entity) {
|
|
3149
3058
|
return [2 /*return*/, null];
|
|
3150
3059
|
}
|
|
3151
|
-
|
|
3152
|
-
tilesetIds = BModels.Entity.GetValue({
|
|
3153
|
-
entity: entity,
|
|
3154
|
-
path: ["Bruce", "TilesetIDs"]
|
|
3155
|
-
});
|
|
3156
|
-
tilesetId = (tilesetIds === null || tilesetIds === void 0 ? void 0 : tilesetIds.length) ? tilesetIds[0] : tilesetId;
|
|
3157
|
-
}
|
|
3158
|
-
pos3d = tilesetId ? null : GetPos({
|
|
3060
|
+
pos3d = GetPos({
|
|
3159
3061
|
viewer: viewer,
|
|
3160
3062
|
entity: entity,
|
|
3161
3063
|
visualRegister: visualRegister,
|
|
@@ -3165,94 +3067,12 @@
|
|
|
3165
3067
|
if (BModels.Cartes.ValidateCartes3(pos3d)) {
|
|
3166
3068
|
return [2 /*return*/, pos3d];
|
|
3167
3069
|
}
|
|
3168
|
-
if (!!tileset) return [3 /*break*/, 11];
|
|
3169
|
-
if (!tilesetId) return [3 /*break*/, 11];
|
|
3170
|
-
return [4 /*yield*/, BModels.Tileset.Get({
|
|
3171
|
-
api: api,
|
|
3172
|
-
tilesetId: tilesetId
|
|
3173
|
-
})];
|
|
3174
|
-
case 10:
|
|
3175
|
-
tileset = (_e.sent()).tileset;
|
|
3176
|
-
_e.label = 11;
|
|
3177
|
-
case 11:
|
|
3178
|
-
tSettings = tileset === null || tileset === void 0 ? void 0 : tileset.settings;
|
|
3179
3070
|
eLocation = BModels.Entity.GetValue({
|
|
3180
3071
|
entity: entity,
|
|
3181
3072
|
path: ["Bruce", "Location"]
|
|
3182
3073
|
});
|
|
3183
|
-
if ((eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude)
|
|
3184
|
-
|
|
3185
|
-
alt = +eLocation.altitude;
|
|
3186
|
-
if (isNaN(alt)) {
|
|
3187
|
-
alt = 0;
|
|
3188
|
-
}
|
|
3189
|
-
pos3d = Cesium.Cartesian3.fromDegrees(+eLocation.longitude, +eLocation.latitude, alt);
|
|
3190
|
-
}
|
|
3191
|
-
else {
|
|
3192
|
-
alt = +tSettings.location.altitude;
|
|
3193
|
-
if (isNaN(alt)) {
|
|
3194
|
-
alt = 0;
|
|
3195
|
-
}
|
|
3196
|
-
pos3d = Cesium.Cartesian3.fromDegrees(+tSettings.location.longitude, +tSettings.location.latitude, alt);
|
|
3197
|
-
}
|
|
3198
|
-
worldPosition = BModels.Entity.GetValue({
|
|
3199
|
-
entity: entity,
|
|
3200
|
-
path: ["Bruce", "AssemblyWorldPosition"]
|
|
3201
|
-
});
|
|
3202
|
-
if (worldPosition) {
|
|
3203
|
-
heading = 0;
|
|
3204
|
-
pitch = 0;
|
|
3205
|
-
roll = 0;
|
|
3206
|
-
eTransform = BModels.Entity.GetValue({
|
|
3207
|
-
entity: entity,
|
|
3208
|
-
path: ["Bruce", "Transform"]
|
|
3209
|
-
});
|
|
3210
|
-
if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.heading) {
|
|
3211
|
-
heading = eTransform.heading;
|
|
3212
|
-
}
|
|
3213
|
-
else if ((_b = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _b === void 0 ? void 0 : _b.heading) {
|
|
3214
|
-
heading = tSettings.transform.heading;
|
|
3215
|
-
}
|
|
3216
|
-
if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.pitch) {
|
|
3217
|
-
pitch = eTransform.pitch;
|
|
3218
|
-
}
|
|
3219
|
-
else if ((_c = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _c === void 0 ? void 0 : _c.pitch) {
|
|
3220
|
-
pitch = tSettings.transform.pitch;
|
|
3221
|
-
}
|
|
3222
|
-
if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.roll) {
|
|
3223
|
-
roll = eTransform.roll;
|
|
3224
|
-
}
|
|
3225
|
-
else if ((_d = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _d === void 0 ? void 0 : _d.roll) {
|
|
3226
|
-
roll = tSettings.transform.roll;
|
|
3227
|
-
}
|
|
3228
|
-
heading = +heading;
|
|
3229
|
-
if (isNaN(heading)) {
|
|
3230
|
-
heading = 0;
|
|
3231
|
-
}
|
|
3232
|
-
pitch = +pitch;
|
|
3233
|
-
if (isNaN(pitch)) {
|
|
3234
|
-
pitch = 0;
|
|
3235
|
-
}
|
|
3236
|
-
roll = +roll;
|
|
3237
|
-
if (isNaN(roll)) {
|
|
3238
|
-
roll = 0;
|
|
3239
|
-
}
|
|
3240
|
-
matrix4 = worldPosition;
|
|
3241
|
-
offset = new Cesium.Cartesian3(+matrix4[0][3], +matrix4[1][3], +matrix4[2][3]);
|
|
3242
|
-
worldPivot = BModels.Entity.GetValue({
|
|
3243
|
-
entity: entity,
|
|
3244
|
-
path: ["Bruce", "GeometryWorldPivot"]
|
|
3245
|
-
});
|
|
3246
|
-
if (worldPivot) //the position from worldMatrix + center of geometry offset
|
|
3247
|
-
{
|
|
3248
|
-
offset = new Cesium.Cartesian3(worldPivot[0], worldPivot[1], worldPivot[2]);
|
|
3249
|
-
}
|
|
3250
|
-
m1 = Cesium.Transforms.eastNorthUpToFixedFrame(pos3d);
|
|
3251
|
-
hpr = Cesium.HeadingPitchRoll.fromDegrees(heading, pitch, roll, new Cesium.HeadingPitchRoll());
|
|
3252
|
-
transform = Cesium.Matrix3.fromHeadingPitchRoll(hpr);
|
|
3253
|
-
transformedOffset = Cesium.Matrix3.multiplyByVector(transform, offset, new Cesium.Cartesian3());
|
|
3254
|
-
pos3d = Cesium.Matrix4.multiplyByPoint(m1, transformedOffset, new Cesium.Cartesian3());
|
|
3255
|
-
}
|
|
3074
|
+
if (+(eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude)) {
|
|
3075
|
+
pos3d = Cesium.Cartesian3.fromDegrees(EnsureNumber(eLocation.longitude), EnsureNumber(eLocation.latitude), EnsureNumber(eLocation.altitude));
|
|
3256
3076
|
}
|
|
3257
3077
|
return [2 /*return*/, exports.DrawingUtils.EnsurePosHeight({
|
|
3258
3078
|
desiredHeightRef: params.returnHeightRef,
|
|
@@ -26440,7 +26260,7 @@
|
|
|
26440
26260
|
ViewerUtils.AssertIonToken = AssertIonToken;
|
|
26441
26261
|
})(exports.ViewerUtils || (exports.ViewerUtils = {}));
|
|
26442
26262
|
|
|
26443
|
-
var VERSION = "4.3.
|
|
26263
|
+
var VERSION = "4.3.8";
|
|
26444
26264
|
|
|
26445
26265
|
exports.VERSION = VERSION;
|
|
26446
26266
|
exports.CesiumParabola = CesiumParabola;
|