org.outernet.cesium-unity 1.15.3-linux.1
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/CHANGES.md +420 -0
- package/CHANGES.md.meta +7 -0
- package/Editor/BuildCesiumForUnity.cs +186 -0
- package/Editor/BuildCesiumForUnity.cs.meta +11 -0
- package/Editor/Cesium3DTilesetEditor.cs +542 -0
- package/Editor/Cesium3DTilesetEditor.cs.meta +11 -0
- package/Editor/CesiumBingMapsRasterOverlayEditor.cs +66 -0
- package/Editor/CesiumBingMapsRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumCameraControllerEditor.cs +174 -0
- package/Editor/CesiumCameraControllerEditor.cs.meta +11 -0
- package/Editor/CesiumCameraManagerEditor.cs +65 -0
- package/Editor/CesiumCameraManagerEditor.cs.meta +11 -0
- package/Editor/CesiumCartographicPolygonEditor.cs +23 -0
- package/Editor/CesiumCartographicPolygonEditor.cs.meta +11 -0
- package/Editor/CesiumDebugColorizeTilesRasterOverlayEditor.cs +41 -0
- package/Editor/CesiumDebugColorizeTilesRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumEditor.asmdef +26 -0
- package/Editor/CesiumEditor.asmdef.meta +7 -0
- package/Editor/CesiumEditorStyle.cs +188 -0
- package/Editor/CesiumEditorStyle.cs.meta +11 -0
- package/Editor/CesiumEditorUtility.cs +394 -0
- package/Editor/CesiumEditorUtility.cs.meta +11 -0
- package/Editor/CesiumEditorWindow.cs +447 -0
- package/Editor/CesiumEditorWindow.cs.meta +11 -0
- package/Editor/CesiumFlyToControllerEditor.cs +76 -0
- package/Editor/CesiumFlyToControllerEditor.cs.meta +11 -0
- package/Editor/CesiumGeoreferenceEditor.cs +277 -0
- package/Editor/CesiumGeoreferenceEditor.cs.meta +11 -0
- package/Editor/CesiumGlobeAnchorEditor.cs +202 -0
- package/Editor/CesiumGlobeAnchorEditor.cs.meta +11 -0
- package/Editor/CesiumInspectorGUI.cs +187 -0
- package/Editor/CesiumInspectorGUI.cs.meta +11 -0
- package/Editor/CesiumIonAsset.cs +192 -0
- package/Editor/CesiumIonAsset.cs.meta +11 -0
- package/Editor/CesiumIonAssetsWindow.cs +257 -0
- package/Editor/CesiumIonAssetsWindow.cs.meta +11 -0
- package/Editor/CesiumIonRasterOverlayEditor.cs +87 -0
- package/Editor/CesiumIonRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumIonServerManager.cs +153 -0
- package/Editor/CesiumIonServerManager.cs.meta +11 -0
- package/Editor/CesiumIonServerSelector.cs +127 -0
- package/Editor/CesiumIonServerSelector.cs.meta +11 -0
- package/Editor/CesiumIonSession.cs +102 -0
- package/Editor/CesiumIonSession.cs.meta +11 -0
- package/Editor/CesiumPolygonRasterOverlayEditor.cs +102 -0
- package/Editor/CesiumPolygonRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumRasterOverlayEditor.cs +230 -0
- package/Editor/CesiumRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumSubSceneEditor.cs +201 -0
- package/Editor/CesiumSubSceneEditor.cs.meta +11 -0
- package/Editor/CesiumTileMapServiceRasterOverlayEditor.cs +88 -0
- package/Editor/CesiumTileMapServiceRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumWebMapServiceRasterOverlayEditor.cs +111 -0
- package/Editor/CesiumWebMapServiceRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumWebMapTileServiceRasterOverlayEditor.cs +277 -0
- package/Editor/CesiumWebMapTileServiceRasterOverlayEditor.cs.meta +3 -0
- package/Editor/CompileCesiumForUnityNative.cs +581 -0
- package/Editor/CompileCesiumForUnityNative.cs.meta +11 -0
- package/Editor/ConfigureReinterop.cs +255 -0
- package/Editor/ConfigureReinterop.cs.meta +11 -0
- package/Editor/Helpers.cs +102 -0
- package/Editor/Helpers.cs.meta +11 -0
- package/Editor/IonAssetsMultiColumnHeader.cs +45 -0
- package/Editor/IonAssetsMultiColumnHeader.cs.meta +11 -0
- package/Editor/IonAssetsTreeView.cs +214 -0
- package/Editor/IonAssetsTreeView.cs.meta +11 -0
- package/Editor/IonMissingAssetWindow.cs +65 -0
- package/Editor/IonMissingAssetWindow.cs.meta +11 -0
- package/Editor/IonTokenTroubleshootingWindow.cs +615 -0
- package/Editor/IonTokenTroubleshootingWindow.cs.meta +11 -0
- package/Editor/NativeDownloadHandler.cs +35 -0
- package/Editor/NativeDownloadHandler.cs.meta +11 -0
- package/Editor/QuickAddItem.cs +43 -0
- package/Editor/QuickAddItem.cs.meta +11 -0
- package/Editor/Resources/Cesium-128x128.png +0 -0
- package/Editor/Resources/Cesium-128x128.png.meta +98 -0
- package/Editor/Resources/Cesium-24x24.png +0 -0
- package/Editor/Resources/Cesium-24x24.png.meta +123 -0
- package/Editor/Resources/Cesium-64x64.png +0 -0
- package/Editor/Resources/Cesium-64x64.png.meta +98 -0
- package/Editor/Resources/Cesium-for-Unity-dark.png +0 -0
- package/Editor/Resources/Cesium-for-Unity-dark.png.meta +123 -0
- package/Editor/Resources/Cesium-for-Unity-light.png +0 -0
- package/Editor/Resources/Cesium-for-Unity-light.png.meta +123 -0
- package/Editor/Resources/Cesium-icon-16x16.png +0 -0
- package/Editor/Resources/Cesium-icon-16x16.png.meta +98 -0
- package/Editor/Resources/FontAwesome/attribution.txt +9 -0
- package/Editor/Resources/FontAwesome/attribution.txt.meta +7 -0
- package/Editor/Resources/FontAwesome/book-reader-solid.png +0 -0
- package/Editor/Resources/FontAwesome/book-reader-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/book-reader-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/book-reader-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/check-solid.png +0 -0
- package/Editor/Resources/FontAwesome/check-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/check-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/check-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.png +0 -0
- package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/folder.png +0 -0
- package/Editor/Resources/FontAwesome/folder.png.meta +147 -0
- package/Editor/Resources/FontAwesome/folder.svg +5 -0
- package/Editor/Resources/FontAwesome/folder.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/hands-helping-solid.png +0 -0
- package/Editor/Resources/FontAwesome/hands-helping-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/hands-helping-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/hands-helping-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/key-solid.png +0 -0
- package/Editor/Resources/FontAwesome/key-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/key-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/key-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/plus-solid.png +0 -0
- package/Editor/Resources/FontAwesome/plus-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/plus-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/plus-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/sign-out-alt-solid.png +0 -0
- package/Editor/Resources/FontAwesome/sign-out-alt-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/sign-out-alt-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/sign-out-alt-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/sync-alt-solid.png +0 -0
- package/Editor/Resources/FontAwesome/sync-alt-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/sync-alt-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/sync-alt-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/times-solid.png +0 -0
- package/Editor/Resources/FontAwesome/times-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/times-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/times-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome.meta +8 -0
- package/Editor/Resources.meta +8 -0
- package/Editor/SelectIonTokenWindow.cs +249 -0
- package/Editor/SelectIonTokenWindow.cs.meta +11 -0
- package/Editor/arm64.meta +8 -0
- package/Editor/csc.rsp +1 -0
- package/Editor/csc.rsp.meta +7 -0
- package/Editor/libCesiumForUnityNative-Editor.so +0 -0
- package/Editor/libCesiumForUnityNative-Editor.so.meta +2 -0
- package/Editor/libCesiumForUnityNative-Runtime.so +0 -0
- package/Editor/libCesiumForUnityNative-Runtime.so.meta +2 -0
- package/Editor/x86_64.meta +8 -0
- package/Editor.meta +8 -0
- package/LICENSE +201 -0
- package/LICENSE.meta +7 -0
- package/Plugins/Standalone/libCesiumForUnityNative-Runtime.so +0 -0
- package/Plugins/Standalone/libCesiumForUnityNative-Runtime.so.meta +2 -0
- package/Plugins/Standalone.meta +8 -0
- package/Plugins.meta +8 -0
- package/README.md +39 -0
- package/README.md.meta +7 -0
- package/Reinterop.deps.json +172 -0
- package/Reinterop.deps.json.meta +7 -0
- package/Reinterop.dll +0 -0
- package/Reinterop.dll.meta +79 -0
- package/Runtime/Cesium3DTile.cs +37 -0
- package/Runtime/Cesium3DTile.cs.meta +11 -0
- package/Runtime/Cesium3DTileset.cs +788 -0
- package/Runtime/Cesium3DTileset.cs.meta +11 -0
- package/Runtime/Cesium3DTilesetLoadFailureDetails.cs +65 -0
- package/Runtime/Cesium3DTilesetLoadFailureDetails.cs.meta +11 -0
- package/Runtime/CesiumBackwardCompatibility.cs +163 -0
- package/Runtime/CesiumBackwardCompatibility.cs.meta +11 -0
- package/Runtime/CesiumBingMapsRasterOverlay.cs +72 -0
- package/Runtime/CesiumBingMapsRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumCameraController.cs +827 -0
- package/Runtime/CesiumCameraController.cs.meta +11 -0
- package/Runtime/CesiumCameraManager.cs +105 -0
- package/Runtime/CesiumCameraManager.cs.meta +11 -0
- package/Runtime/CesiumCartographicPolygon.cs +152 -0
- package/Runtime/CesiumCartographicPolygon.cs.meta +11 -0
- package/Runtime/CesiumCreditSystem.cs +343 -0
- package/Runtime/CesiumCreditSystem.cs.meta +11 -0
- package/Runtime/CesiumCreditSystemUI.cs +402 -0
- package/Runtime/CesiumCreditSystemUI.cs.meta +11 -0
- package/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs +21 -0
- package/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumEllipsoid.cs +107 -0
- package/Runtime/CesiumEllipsoid.cs.meta +11 -0
- package/Runtime/CesiumFeature.cs +279 -0
- package/Runtime/CesiumFeature.cs.meta +11 -0
- package/Runtime/CesiumFeatureIdAttribute.cs +61 -0
- package/Runtime/CesiumFeatureIdAttribute.cs.meta +11 -0
- package/Runtime/CesiumFeatureIdSet.cs +165 -0
- package/Runtime/CesiumFeatureIdSet.cs.meta +11 -0
- package/Runtime/CesiumFeatureIdTexture.cs +68 -0
- package/Runtime/CesiumFeatureIdTexture.cs.meta +11 -0
- package/Runtime/CesiumFlyToController.cs +539 -0
- package/Runtime/CesiumFlyToController.cs.meta +11 -0
- package/Runtime/CesiumGeoreference.cs +628 -0
- package/Runtime/CesiumGeoreference.cs.meta +11 -0
- package/Runtime/CesiumGlobeAnchor.cs +664 -0
- package/Runtime/CesiumGlobeAnchor.cs.meta +11 -0
- package/Runtime/CesiumGlobeAnchorBackwardCompatibility0dot2dot0.cs +105 -0
- package/Runtime/CesiumGlobeAnchorBackwardCompatibility0dot2dot0.cs.meta +11 -0
- package/Runtime/CesiumIntMatN.cs +398 -0
- package/Runtime/CesiumIntMatN.cs.meta +11 -0
- package/Runtime/CesiumIntVecN.cs +525 -0
- package/Runtime/CesiumIntVecN.cs.meta +11 -0
- package/Runtime/CesiumIonRasterOverlay.cs +110 -0
- package/Runtime/CesiumIonRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumIonServer.cs +137 -0
- package/Runtime/CesiumIonServer.cs.meta +11 -0
- package/Runtime/CesiumMetadata.cs +33 -0
- package/Runtime/CesiumMetadata.cs.meta +11 -0
- package/Runtime/CesiumMetadataValue.cs +1764 -0
- package/Runtime/CesiumMetadataValue.cs.meta +11 -0
- package/Runtime/CesiumMetadataValueType.cs +203 -0
- package/Runtime/CesiumMetadataValueType.cs.meta +11 -0
- package/Runtime/CesiumModelMetadata.cs +26 -0
- package/Runtime/CesiumModelMetadata.cs.meta +11 -0
- package/Runtime/CesiumObjectPool.cs +74 -0
- package/Runtime/CesiumObjectPool.cs.meta +11 -0
- package/Runtime/CesiumObjectPools.cs +39 -0
- package/Runtime/CesiumObjectPools.cs.meta +11 -0
- package/Runtime/CesiumOriginShift.cs +146 -0
- package/Runtime/CesiumOriginShift.cs.meta +11 -0
- package/Runtime/CesiumPointCloudRenderer.cs +246 -0
- package/Runtime/CesiumPointCloudRenderer.cs.meta +11 -0
- package/Runtime/CesiumPointCloudShading.cs +76 -0
- package/Runtime/CesiumPointCloudShading.cs.meta +11 -0
- package/Runtime/CesiumPolygonRasterOverlay.cs +109 -0
- package/Runtime/CesiumPolygonRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumPrimitiveFeatures.cs +130 -0
- package/Runtime/CesiumPrimitiveFeatures.cs.meta +11 -0
- package/Runtime/CesiumPropertyArray.cs +64 -0
- package/Runtime/CesiumPropertyArray.cs.meta +11 -0
- package/Runtime/CesiumPropertyTable.cs +126 -0
- package/Runtime/CesiumPropertyTable.cs.meta +11 -0
- package/Runtime/CesiumPropertyTableProperty.cs +1734 -0
- package/Runtime/CesiumPropertyTableProperty.cs.meta +11 -0
- package/Runtime/CesiumRasterOverlay.cs +239 -0
- package/Runtime/CesiumRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumRasterOverlayLoadFailureDetails.cs +65 -0
- package/Runtime/CesiumRasterOverlayLoadFailureDetails.cs.meta +11 -0
- package/Runtime/CesiumRuntime.asmdef +32 -0
- package/Runtime/CesiumRuntime.asmdef.meta +7 -0
- package/Runtime/CesiumRuntime.cs +3 -0
- package/Runtime/CesiumRuntime.cs.meta +11 -0
- package/Runtime/CesiumRuntimeSettings.cs +188 -0
- package/Runtime/CesiumRuntimeSettings.cs.meta +11 -0
- package/Runtime/CesiumSampleHeightResult.cs +47 -0
- package/Runtime/CesiumSampleHeightResult.cs.meta +11 -0
- package/Runtime/CesiumSimplePlanarEllipsoidCurve.cs +93 -0
- package/Runtime/CesiumSimplePlanarEllipsoidCurve.cs.meta +11 -0
- package/Runtime/CesiumSubScene.cs +473 -0
- package/Runtime/CesiumSubScene.cs.meta +11 -0
- package/Runtime/CesiumTileExcluder.cs +47 -0
- package/Runtime/CesiumTileExcluder.cs.meta +11 -0
- package/Runtime/CesiumTileMapServiceRasterOverlay.cs +93 -0
- package/Runtime/CesiumTileMapServiceRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumWebMapServiceRasterOverlay.cs +129 -0
- package/Runtime/CesiumWebMapServiceRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumWebMapTileServiceRasterOverlay.cs +414 -0
- package/Runtime/CesiumWebMapTileServiceRasterOverlay.cs.meta +3 -0
- package/Runtime/CesiumWgs84Ellipsoid.cs +75 -0
- package/Runtime/CesiumWgs84Ellipsoid.cs.meta +11 -0
- package/Runtime/ConfigureReinterop.cs +926 -0
- package/Runtime/ConfigureReinterop.cs.meta +11 -0
- package/Runtime/Helpers.cs +122 -0
- package/Runtime/Helpers.cs.meta +11 -0
- package/Runtime/ICesiumRestartable.cs +17 -0
- package/Runtime/ICesiumRestartable.cs.meta +11 -0
- package/Runtime/NativeCoroutine.cs +28 -0
- package/Runtime/NativeCoroutine.cs.meta +11 -0
- package/Runtime/NativeDownloadHandler.cs +29 -0
- package/Runtime/NativeDownloadHandler.cs.meta +11 -0
- package/Runtime/Resources/CesiumCreditSystem.prefab +78 -0
- package/Runtime/Resources/CesiumCreditSystem.prefab.meta +7 -0
- package/Runtime/Resources/CesiumCreditSystemRuntimeTheme.tss +2 -0
- package/Runtime/Resources/CesiumCreditSystemRuntimeTheme.tss.meta +11 -0
- package/Runtime/Resources/CesiumCreditSystemUI.uxml +4 -0
- package/Runtime/Resources/CesiumCreditSystemUI.uxml.meta +10 -0
- package/Runtime/Resources/CesiumCreditSystemUIPanelSettings.asset +38 -0
- package/Runtime/Resources/CesiumCreditSystemUIPanelSettings.asset.meta +8 -0
- package/Runtime/Resources/CesiumDefaultTilesetMaterial.mat +232 -0
- package/Runtime/Resources/CesiumDefaultTilesetMaterial.mat.meta +8 -0
- package/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph +14271 -0
- package/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph.meta +10 -0
- package/Runtime/Resources/CesiumPointCloudShading.hlsl +156 -0
- package/Runtime/Resources/CesiumPointCloudShading.hlsl.meta +7 -0
- package/Runtime/Resources/CesiumPointCloudShadingMaterial.mat +125 -0
- package/Runtime/Resources/CesiumPointCloudShadingMaterial.mat.meta +8 -0
- package/Runtime/Resources/CesiumPointCloudShadingShader.shader +73 -0
- package/Runtime/Resources/CesiumPointCloudShadingShader.shader.meta +10 -0
- package/Runtime/Resources/CesiumRasterOverlay.shadersubgraph +2207 -0
- package/Runtime/Resources/CesiumRasterOverlay.shadersubgraph.meta +10 -0
- package/Runtime/Resources/CesiumSelectTexCoords.shadersubgraph +722 -0
- package/Runtime/Resources/CesiumSelectTexCoords.shadersubgraph.meta +10 -0
- package/Runtime/Resources/CesiumUnlitTilesetMaterial.mat +261 -0
- package/Runtime/Resources/CesiumUnlitTilesetMaterial.mat.meta +8 -0
- package/Runtime/Resources/CesiumUnlitTilesetShader.shadergraph +5873 -0
- package/Runtime/Resources/CesiumUnlitTilesetShader.shadergraph.meta +10 -0
- package/Runtime/Resources/DynamicCamera.prefab +253 -0
- package/Runtime/Resources/DynamicCamera.prefab.meta +7 -0
- package/Runtime/Resources/TransformTextureCoordinates.shadersubgraph +2171 -0
- package/Runtime/Resources/TransformTextureCoordinates.shadersubgraph.meta +10 -0
- package/Runtime/Resources/green1x1.png +0 -0
- package/Runtime/Resources/green1x1.png.meta +123 -0
- package/Runtime/Resources.meta +8 -0
- package/Runtime/TestGltfModel.cs +56 -0
- package/Runtime/TestGltfModel.cs.meta +11 -0
- package/Runtime/TestReinterop.cs +21 -0
- package/Runtime/TestReinterop.cs.meta +11 -0
- package/Runtime/UnityLifetime.cs +27 -0
- package/Runtime/UnityLifetime.cs.meta +11 -0
- package/Runtime/WaitForTask.cs +25 -0
- package/Runtime/WaitForTask.cs.meta +11 -0
- package/Runtime/csc.rsp +1 -0
- package/Runtime/csc.rsp.meta +7 -0
- package/Runtime.meta +8 -0
- package/ThirdParty.json +27 -0
- package/ThirdParty.json.meta +7 -0
- package/WGS84.asset +18 -0
- package/WGS84.asset.meta +8 -0
- package/package.json +29 -0
- package/package.json.meta +7 -0
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using Unity.Mathematics;
|
|
3
|
+
|
|
4
|
+
namespace CesiumForUnity
|
|
5
|
+
{
|
|
6
|
+
|
|
7
|
+
/// <summary>
|
|
8
|
+
/// Represents a vec2 with signed integer components. This preserves the exact type
|
|
9
|
+
/// of the integer components so they can be properly converted (or not converted)
|
|
10
|
+
/// to other types.
|
|
11
|
+
/// </summary>
|
|
12
|
+
/// <remarks>
|
|
13
|
+
/// Internally, this is used to store all signed integer vec2 types, including i8vec2,
|
|
14
|
+
/// i16vec2, i32vec2, and i64vec2. The intended type is conveyed through CesiumMetadataComponentType.
|
|
15
|
+
/// </remarks>
|
|
16
|
+
internal struct CesiumIntVec2
|
|
17
|
+
{
|
|
18
|
+
public CesiumMetadataComponentType componentType
|
|
19
|
+
{
|
|
20
|
+
get; private set;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public Int64 x
|
|
24
|
+
{
|
|
25
|
+
get; private set;
|
|
26
|
+
}
|
|
27
|
+
public Int64 y
|
|
28
|
+
{
|
|
29
|
+
get; private set;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public CesiumIntVec2(SByte x, SByte y)
|
|
33
|
+
{
|
|
34
|
+
this.componentType = CesiumMetadataComponentType.Int8;
|
|
35
|
+
this.x = x;
|
|
36
|
+
this.y = y;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public CesiumIntVec2(Int16 x, Int16 y)
|
|
40
|
+
{
|
|
41
|
+
this.componentType = CesiumMetadataComponentType.Int16;
|
|
42
|
+
this.x = x;
|
|
43
|
+
this.y = y;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public CesiumIntVec2(Int32 x, Int32 y)
|
|
47
|
+
{
|
|
48
|
+
this.componentType = CesiumMetadataComponentType.Int32;
|
|
49
|
+
this.x = x;
|
|
50
|
+
this.y = y;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public CesiumIntVec2(Int64 x, Int64 y)
|
|
54
|
+
{
|
|
55
|
+
this.componentType = CesiumMetadataComponentType.Int64;
|
|
56
|
+
this.x = x;
|
|
57
|
+
this.y = y;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public CesiumIntVec2(int2 unityInt2)
|
|
61
|
+
{
|
|
62
|
+
this.componentType = CesiumMetadataComponentType.Int32;
|
|
63
|
+
this.x = unityInt2.x;
|
|
64
|
+
this.y = unityInt2.y;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public Int64 this[int index]
|
|
68
|
+
{
|
|
69
|
+
get
|
|
70
|
+
{
|
|
71
|
+
switch (index)
|
|
72
|
+
{
|
|
73
|
+
case 0:
|
|
74
|
+
return x;
|
|
75
|
+
case 1:
|
|
76
|
+
return y;
|
|
77
|
+
default:
|
|
78
|
+
throw new System.IndexOutOfRangeException();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/// <summary>
|
|
85
|
+
/// Represents a vec3 with signed integer components. This preserves the exact type
|
|
86
|
+
/// of the integer components so they can be properly converted (or not converted)
|
|
87
|
+
/// to other types.
|
|
88
|
+
/// </summary>
|
|
89
|
+
/// <remarks>
|
|
90
|
+
/// Internally, this is used to store all signed integer vec3 types, including i8vec3,
|
|
91
|
+
/// i16vec3, i32vec3, and i64vec3. The intended type is conveyed through CesiumMetadataComponentType.
|
|
92
|
+
/// </remarks>
|
|
93
|
+
internal struct CesiumIntVec3
|
|
94
|
+
{
|
|
95
|
+
public CesiumMetadataComponentType componentType
|
|
96
|
+
{
|
|
97
|
+
get; private set;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public Int64 x
|
|
101
|
+
{
|
|
102
|
+
get; private set;
|
|
103
|
+
}
|
|
104
|
+
public Int64 y
|
|
105
|
+
{
|
|
106
|
+
get; private set;
|
|
107
|
+
}
|
|
108
|
+
public Int64 z
|
|
109
|
+
{
|
|
110
|
+
get; private set;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
public CesiumIntVec3(SByte x, SByte y, SByte z)
|
|
114
|
+
{
|
|
115
|
+
this.componentType = CesiumMetadataComponentType.Int8;
|
|
116
|
+
this.x = x;
|
|
117
|
+
this.y = y;
|
|
118
|
+
this.z = z;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
public CesiumIntVec3(Int16 x, Int16 y, Int16 z)
|
|
122
|
+
{
|
|
123
|
+
this.componentType = CesiumMetadataComponentType.Int16;
|
|
124
|
+
this.x = x;
|
|
125
|
+
this.y = y;
|
|
126
|
+
this.z = z;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
public CesiumIntVec3(Int32 x, Int32 y, Int32 z)
|
|
130
|
+
{
|
|
131
|
+
this.componentType = CesiumMetadataComponentType.Int32;
|
|
132
|
+
this.x = x;
|
|
133
|
+
this.y = y;
|
|
134
|
+
this.z = z;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
public CesiumIntVec3(Int64 x, Int64 y, Int64 z)
|
|
138
|
+
{
|
|
139
|
+
this.componentType = CesiumMetadataComponentType.Int64;
|
|
140
|
+
this.x = x;
|
|
141
|
+
this.y = y;
|
|
142
|
+
this.z = z;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
public CesiumIntVec3(int3 unityInt3)
|
|
146
|
+
{
|
|
147
|
+
this.componentType = CesiumMetadataComponentType.Int32;
|
|
148
|
+
this.x = unityInt3.x;
|
|
149
|
+
this.y = unityInt3.y;
|
|
150
|
+
this.z = unityInt3.z;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
public Int64 this[int index]
|
|
154
|
+
{
|
|
155
|
+
get
|
|
156
|
+
{
|
|
157
|
+
switch (index)
|
|
158
|
+
{
|
|
159
|
+
case 0:
|
|
160
|
+
return x;
|
|
161
|
+
case 1:
|
|
162
|
+
return y;
|
|
163
|
+
case 2:
|
|
164
|
+
return z;
|
|
165
|
+
default:
|
|
166
|
+
throw new System.IndexOutOfRangeException();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/// <summary>
|
|
173
|
+
/// Represents a vec4 with signed integer components. This preserves the exact type
|
|
174
|
+
/// of the integer components so they can be properly converted (or not converted)
|
|
175
|
+
/// to other types.
|
|
176
|
+
/// </summary>
|
|
177
|
+
/// <remarks>
|
|
178
|
+
/// Internally, this is used to store all signed integer vec4 types, including i8vec4,
|
|
179
|
+
/// i16vec4, i32vec4, and i64vec4. The intended type is conveyed through CesiumMetadataComponentType.
|
|
180
|
+
/// </remarks>
|
|
181
|
+
internal struct CesiumIntVec4
|
|
182
|
+
{
|
|
183
|
+
public CesiumMetadataComponentType componentType
|
|
184
|
+
{
|
|
185
|
+
get; private set;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
public Int64 x
|
|
189
|
+
{
|
|
190
|
+
get; private set;
|
|
191
|
+
}
|
|
192
|
+
public Int64 y
|
|
193
|
+
{
|
|
194
|
+
get; private set;
|
|
195
|
+
}
|
|
196
|
+
public Int64 z
|
|
197
|
+
{
|
|
198
|
+
get; private set;
|
|
199
|
+
}
|
|
200
|
+
public Int64 w
|
|
201
|
+
{
|
|
202
|
+
get; private set;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
public CesiumIntVec4(SByte x, SByte y, SByte z, SByte w)
|
|
206
|
+
{
|
|
207
|
+
this.componentType = CesiumMetadataComponentType.Int8;
|
|
208
|
+
this.x = x;
|
|
209
|
+
this.y = y;
|
|
210
|
+
this.z = z;
|
|
211
|
+
this.w = w;
|
|
212
|
+
}
|
|
213
|
+
public CesiumIntVec4(Int16 x, Int16 y, Int16 z, Int16 w)
|
|
214
|
+
{
|
|
215
|
+
this.componentType = CesiumMetadataComponentType.Int16;
|
|
216
|
+
this.x = x;
|
|
217
|
+
this.y = y;
|
|
218
|
+
this.z = z;
|
|
219
|
+
this.w = w;
|
|
220
|
+
}
|
|
221
|
+
public CesiumIntVec4(Int32 x, Int32 y, Int32 z, Int32 w)
|
|
222
|
+
{
|
|
223
|
+
this.componentType = CesiumMetadataComponentType.Int32;
|
|
224
|
+
this.x = x;
|
|
225
|
+
this.y = y;
|
|
226
|
+
this.z = z;
|
|
227
|
+
this.w = w;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
public CesiumIntVec4(Int64 x, Int64 y, Int64 z, Int64 w)
|
|
231
|
+
{
|
|
232
|
+
this.componentType = CesiumMetadataComponentType.Int64;
|
|
233
|
+
this.x = x;
|
|
234
|
+
this.y = y;
|
|
235
|
+
this.z = z;
|
|
236
|
+
this.w = w;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
public CesiumIntVec4(int4 unityInt4)
|
|
240
|
+
{
|
|
241
|
+
this.componentType = CesiumMetadataComponentType.Int32;
|
|
242
|
+
this.x = unityInt4.x;
|
|
243
|
+
this.y = unityInt4.y;
|
|
244
|
+
this.z = unityInt4.z;
|
|
245
|
+
this.w = unityInt4.w;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
public Int64 this[int index]
|
|
249
|
+
{
|
|
250
|
+
get
|
|
251
|
+
{
|
|
252
|
+
switch (index)
|
|
253
|
+
{
|
|
254
|
+
case 0:
|
|
255
|
+
return x;
|
|
256
|
+
case 1:
|
|
257
|
+
return y;
|
|
258
|
+
case 2:
|
|
259
|
+
return z;
|
|
260
|
+
case 3:
|
|
261
|
+
return w;
|
|
262
|
+
default:
|
|
263
|
+
throw new System.IndexOutOfRangeException();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/// <summary>
|
|
270
|
+
/// Represents a vec2 with unsigned integer components. This preserves the accuracy of the integer
|
|
271
|
+
/// values, which could otherwise lose precision if represented as doubles.
|
|
272
|
+
/// </summary>
|
|
273
|
+
/// <remarks>
|
|
274
|
+
/// Internally, this is used to store all unsigned integer vec2 types, including u8vec2,
|
|
275
|
+
/// u16vec2, u32vec2, and u64vec2. The intended type is conveyed through CesiumMetadataComponentType.
|
|
276
|
+
/// </remarks>
|
|
277
|
+
internal struct CesiumUintVec2
|
|
278
|
+
{
|
|
279
|
+
public CesiumMetadataComponentType componentType
|
|
280
|
+
{
|
|
281
|
+
get; private set;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
public UInt64 x
|
|
285
|
+
{
|
|
286
|
+
get; private set;
|
|
287
|
+
}
|
|
288
|
+
public UInt64 y
|
|
289
|
+
{
|
|
290
|
+
get; private set;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
public CesiumUintVec2(Byte x, Byte y)
|
|
294
|
+
{
|
|
295
|
+
this.componentType = CesiumMetadataComponentType.Uint8;
|
|
296
|
+
this.x = x;
|
|
297
|
+
this.y = y;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
public CesiumUintVec2(UInt16 x, UInt16 y)
|
|
301
|
+
{
|
|
302
|
+
this.componentType = CesiumMetadataComponentType.Uint16;
|
|
303
|
+
this.x = x;
|
|
304
|
+
this.y = y;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
public CesiumUintVec2(UInt32 x, UInt32 y)
|
|
308
|
+
{
|
|
309
|
+
this.componentType = CesiumMetadataComponentType.Uint32;
|
|
310
|
+
this.x = x;
|
|
311
|
+
this.y = y;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
public CesiumUintVec2(UInt64 x, UInt64 y)
|
|
315
|
+
{
|
|
316
|
+
this.componentType = CesiumMetadataComponentType.Uint64;
|
|
317
|
+
this.x = x;
|
|
318
|
+
this.y = y;
|
|
319
|
+
}
|
|
320
|
+
public CesiumUintVec2(uint2 unityUint2)
|
|
321
|
+
{
|
|
322
|
+
this.componentType = CesiumMetadataComponentType.Uint32;
|
|
323
|
+
this.x = unityUint2.x;
|
|
324
|
+
this.y = unityUint2.y;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
public UInt64 this[int index]
|
|
328
|
+
{
|
|
329
|
+
get
|
|
330
|
+
{
|
|
331
|
+
switch (index)
|
|
332
|
+
{
|
|
333
|
+
case 0:
|
|
334
|
+
return x;
|
|
335
|
+
case 1:
|
|
336
|
+
return y;
|
|
337
|
+
default:
|
|
338
|
+
throw new System.IndexOutOfRangeException();
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/// <summary>
|
|
345
|
+
/// Represents a vec3 with unsigned integer components. This preserves the accuracy of the integer
|
|
346
|
+
/// values, which could otherwise lose precision if represented as doubles.
|
|
347
|
+
/// </summary>
|
|
348
|
+
/// <remarks>
|
|
349
|
+
/// Internally, this is used to store all unsigned integer vec3 types, including u8vec3,
|
|
350
|
+
/// u16vec3, u32vec3, and u64vec3. The intended type is conveyed through CesiumMetadataComponentType.
|
|
351
|
+
/// </remarks>
|
|
352
|
+
internal struct CesiumUintVec3
|
|
353
|
+
{
|
|
354
|
+
public CesiumMetadataComponentType componentType
|
|
355
|
+
{
|
|
356
|
+
get; private set;
|
|
357
|
+
}
|
|
358
|
+
public UInt64 x
|
|
359
|
+
{
|
|
360
|
+
get; private set;
|
|
361
|
+
}
|
|
362
|
+
public UInt64 y
|
|
363
|
+
{
|
|
364
|
+
get; private set;
|
|
365
|
+
}
|
|
366
|
+
public UInt64 z
|
|
367
|
+
{
|
|
368
|
+
get; private set;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
public CesiumUintVec3(Byte x, Byte y, Byte z)
|
|
372
|
+
{
|
|
373
|
+
this.componentType = CesiumMetadataComponentType.Uint8;
|
|
374
|
+
this.x = x;
|
|
375
|
+
this.y = y;
|
|
376
|
+
this.z = z;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
public CesiumUintVec3(UInt16 x, UInt16 y, UInt16 z)
|
|
380
|
+
{
|
|
381
|
+
this.componentType = CesiumMetadataComponentType.Uint16;
|
|
382
|
+
this.x = x;
|
|
383
|
+
this.y = y;
|
|
384
|
+
this.z = z;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
public CesiumUintVec3(UInt32 x, UInt32 y, UInt32 z)
|
|
388
|
+
{
|
|
389
|
+
this.componentType = CesiumMetadataComponentType.Uint32;
|
|
390
|
+
this.x = x;
|
|
391
|
+
this.y = y;
|
|
392
|
+
this.z = z;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
public CesiumUintVec3(UInt64 x, UInt64 y, UInt64 z)
|
|
396
|
+
{
|
|
397
|
+
this.componentType = CesiumMetadataComponentType.Uint64;
|
|
398
|
+
this.x = x;
|
|
399
|
+
this.y = y;
|
|
400
|
+
this.z = z;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
public CesiumUintVec3(uint3 unityUint3)
|
|
404
|
+
{
|
|
405
|
+
this.componentType = CesiumMetadataComponentType.Uint32;
|
|
406
|
+
this.x = unityUint3.x;
|
|
407
|
+
this.y = unityUint3.y;
|
|
408
|
+
this.z = unityUint3.z;
|
|
409
|
+
}
|
|
410
|
+
public UInt64 this[int index]
|
|
411
|
+
{
|
|
412
|
+
get
|
|
413
|
+
{
|
|
414
|
+
switch (index)
|
|
415
|
+
{
|
|
416
|
+
case 0:
|
|
417
|
+
return x;
|
|
418
|
+
case 1:
|
|
419
|
+
return y;
|
|
420
|
+
case 2:
|
|
421
|
+
return z;
|
|
422
|
+
default:
|
|
423
|
+
throw new System.IndexOutOfRangeException();
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/// <summary>
|
|
430
|
+
/// Represents a vec4 with unsigned integer components. This preserves the accuracy of the integer
|
|
431
|
+
/// values, which could otherwise lose precision if represented as doubles.
|
|
432
|
+
/// </summary>
|
|
433
|
+
/// <remarks>
|
|
434
|
+
/// Internally, this is used to store all unsigned integer vec4 types, including u8vec4,
|
|
435
|
+
/// u16vec4, u32vec4, and u64vec4. The intended type is conveyed through CesiumMetadataComponentType.
|
|
436
|
+
/// </remarks>
|
|
437
|
+
internal struct CesiumUintVec4
|
|
438
|
+
{
|
|
439
|
+
public CesiumMetadataComponentType componentType
|
|
440
|
+
{
|
|
441
|
+
get; private set;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
public UInt64 x
|
|
445
|
+
{
|
|
446
|
+
get; private set;
|
|
447
|
+
}
|
|
448
|
+
public UInt64 y
|
|
449
|
+
{
|
|
450
|
+
get; private set;
|
|
451
|
+
}
|
|
452
|
+
public UInt64 z
|
|
453
|
+
{
|
|
454
|
+
get; private set;
|
|
455
|
+
}
|
|
456
|
+
public UInt64 w
|
|
457
|
+
{
|
|
458
|
+
get; private set;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
public CesiumUintVec4(Byte x, Byte y, Byte z, Byte w)
|
|
462
|
+
{
|
|
463
|
+
this.componentType = CesiumMetadataComponentType.Uint8;
|
|
464
|
+
this.x = x;
|
|
465
|
+
this.y = y;
|
|
466
|
+
this.z = z;
|
|
467
|
+
this.w = w;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
public CesiumUintVec4(UInt16 x, UInt16 y, UInt16 z, UInt16 w)
|
|
471
|
+
{
|
|
472
|
+
this.componentType = CesiumMetadataComponentType.Uint16;
|
|
473
|
+
this.x = x;
|
|
474
|
+
this.y = y;
|
|
475
|
+
this.z = z;
|
|
476
|
+
this.w = w;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
public CesiumUintVec4(UInt32 x, UInt32 y, UInt32 z, UInt32 w)
|
|
480
|
+
{
|
|
481
|
+
this.componentType = CesiumMetadataComponentType.Uint32;
|
|
482
|
+
this.x = x;
|
|
483
|
+
this.y = y;
|
|
484
|
+
this.z = z;
|
|
485
|
+
this.w = w;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
public CesiumUintVec4(UInt64 x, UInt64 y, UInt64 z, UInt64 w)
|
|
489
|
+
{
|
|
490
|
+
this.componentType = CesiumMetadataComponentType.Uint64;
|
|
491
|
+
this.x = x;
|
|
492
|
+
this.y = y;
|
|
493
|
+
this.z = z;
|
|
494
|
+
this.w = w;
|
|
495
|
+
}
|
|
496
|
+
public CesiumUintVec4(uint4 unityUint4)
|
|
497
|
+
{
|
|
498
|
+
this.componentType = CesiumMetadataComponentType.Uint32;
|
|
499
|
+
this.x = unityUint4.x;
|
|
500
|
+
this.y = unityUint4.y;
|
|
501
|
+
this.z = unityUint4.z;
|
|
502
|
+
this.w = unityUint4.w;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
public UInt64 this[int index]
|
|
506
|
+
{
|
|
507
|
+
get
|
|
508
|
+
{
|
|
509
|
+
switch (index)
|
|
510
|
+
{
|
|
511
|
+
case 0:
|
|
512
|
+
return x;
|
|
513
|
+
case 1:
|
|
514
|
+
return y;
|
|
515
|
+
case 2:
|
|
516
|
+
return z;
|
|
517
|
+
case 3:
|
|
518
|
+
return w;
|
|
519
|
+
default:
|
|
520
|
+
throw new System.IndexOutOfRangeException();
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
using Reinterop;
|
|
2
|
+
using System.Collections;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace CesiumForUnity
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
/// A <see cref="CesiumRasterOverlay"/> that uses an IMAGERY asset from Cesium ion.
|
|
9
|
+
/// </summary>
|
|
10
|
+
[ReinteropNativeImplementation("CesiumForUnityNative::CesiumIonRasterOverlayImpl", "CesiumIonRasterOverlayImpl.h")]
|
|
11
|
+
[AddComponentMenu("Cesium/Cesium Ion Raster Overlay")]
|
|
12
|
+
[IconAttribute("Packages/com.cesium.unity/Editor/Resources/Cesium-24x24.png")]
|
|
13
|
+
public partial class CesiumIonRasterOverlay : CesiumRasterOverlay, ISerializationCallbackReceiver
|
|
14
|
+
{
|
|
15
|
+
[SerializeField]
|
|
16
|
+
private long _ionAssetID = 0;
|
|
17
|
+
|
|
18
|
+
/// <summary>
|
|
19
|
+
/// The ID of the Cesium ion asset to use.
|
|
20
|
+
/// </summary>
|
|
21
|
+
public long ionAssetID
|
|
22
|
+
{
|
|
23
|
+
get => this._ionAssetID;
|
|
24
|
+
set
|
|
25
|
+
{
|
|
26
|
+
this._ionAssetID = value;
|
|
27
|
+
this.Refresh();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[SerializeField]
|
|
32
|
+
private string _ionAccessToken = "";
|
|
33
|
+
|
|
34
|
+
/// <summary>
|
|
35
|
+
/// The access token to use to access the Cesium ion resource.
|
|
36
|
+
/// </summary>
|
|
37
|
+
public string ionAccessToken
|
|
38
|
+
{
|
|
39
|
+
get => this._ionAccessToken;
|
|
40
|
+
set
|
|
41
|
+
{
|
|
42
|
+
this._ionAccessToken = value;
|
|
43
|
+
this.Refresh();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
[SerializeField]
|
|
48
|
+
private CesiumIonServer _ionServer = null;
|
|
49
|
+
|
|
50
|
+
/// <summary>
|
|
51
|
+
/// The Cesium ion server from which this raster overlay is loaded.
|
|
52
|
+
/// </summary>
|
|
53
|
+
public CesiumIonServer ionServer
|
|
54
|
+
{
|
|
55
|
+
get
|
|
56
|
+
{
|
|
57
|
+
if (this._ionServer == null)
|
|
58
|
+
{
|
|
59
|
+
#if UNITY_EDITOR
|
|
60
|
+
// See OnAfterDeserialize.
|
|
61
|
+
if (this._useDefaultServer)
|
|
62
|
+
this._ionServer = CesiumIonServer.defaultServer;
|
|
63
|
+
else
|
|
64
|
+
this._ionServer = CesiumIonServer.serverForNewObjects;
|
|
65
|
+
|
|
66
|
+
this._useDefaultServer = false;
|
|
67
|
+
#else
|
|
68
|
+
this._ionServer = CesiumIonServer.serverForNewObjects;
|
|
69
|
+
#endif
|
|
70
|
+
}
|
|
71
|
+
return this._ionServer;
|
|
72
|
+
}
|
|
73
|
+
set
|
|
74
|
+
{
|
|
75
|
+
if (value == null) value = CesiumIonServer.serverForNewObjects;
|
|
76
|
+
this._ionServer = value;
|
|
77
|
+
this.Refresh();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/// <inheritdoc/>
|
|
82
|
+
protected override partial void AddToTileset(Cesium3DTileset tileset);
|
|
83
|
+
/// <inheritdoc/>
|
|
84
|
+
protected override partial void RemoveFromTileset(Cesium3DTileset tileset);
|
|
85
|
+
|
|
86
|
+
internal IEnumerator AddToTilesetLater(Cesium3DTileset tileset)
|
|
87
|
+
{
|
|
88
|
+
yield return new WaitForSecondsRealtime(0.1f);
|
|
89
|
+
this.AddToTileset(tileset);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
void ISerializationCallbackReceiver.OnBeforeSerialize()
|
|
93
|
+
{
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
void ISerializationCallbackReceiver.OnAfterDeserialize()
|
|
97
|
+
{
|
|
98
|
+
#if UNITY_EDITOR
|
|
99
|
+
// For backward compatibility, overlays loaded without a server should adopt
|
|
100
|
+
// the default one rather than the current one.
|
|
101
|
+
if (this._ionServer == null)
|
|
102
|
+
this._useDefaultServer = true;
|
|
103
|
+
#endif
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
#if UNITY_EDITOR
|
|
107
|
+
private bool _useDefaultServer = false;
|
|
108
|
+
#endif
|
|
109
|
+
}
|
|
110
|
+
}
|