Cesium for Unity 1.15.2
Loading...
Searching...
No Matches
CesiumPolygonRasterOverlay.cs
Go to the documentation of this file.
1using Reinterop;
2using System.Collections.Generic;
3using UnityEngine;
4
5namespace CesiumForUnity
6{
15 [ReinteropNativeImplementation(
16 "CesiumForUnityNative::CesiumPolygonRasterOverlayImpl", "CesiumPolygonRasterOverlayImpl.h")]
17#if UNITY_2022_2_OR_NEWER
18 [AddComponentMenu("Cesium/Cesium Polygon Raster Overlay")]
19#else
20 [AddComponentMenu("")]
21#endif
22 [IconAttribute("Packages/com.cesium.unity/Editor/Resources/Cesium-24x24.png")]
24 {
25 [SerializeField]
26 private List<CesiumCartographicPolygon> _polygons;
27
31 public List<CesiumCartographicPolygon> polygons
32 {
33 get => this._polygons;
34 set
35 {
36 this._polygons = value;
37 this.Refresh();
38 }
39 }
40
41 [SerializeField]
42 private bool _invertSelection = false;
43
58 public bool invertSelection
59 {
60 get => this._invertSelection;
61 set
62 {
63 this._invertSelection = value;
64 this.Refresh();
65 }
66 }
67
68 [SerializeField]
69 private bool _excludeSelectedTiles = true;
70
88 {
89 get => this._excludeSelectedTiles;
90 set
91 {
92 this._excludeSelectedTiles = value;
93 this.Refresh();
94 }
95 }
96
97#if UNITY_EDITOR
98 private void Reset()
99 {
100 this.materialKey = "Clipping";
101 }
102#endif
103
105 protected override partial void AddToTileset(Cesium3DTileset tileset);
107 protected override partial void RemoveFromTileset(Cesium3DTileset tileset);
108 }
109}
A tileset in the 3D Tiles format.
A raster overlay that rasterizes polygons and drapes them over the tileset.
bool excludeSelectedTiles
Whether tiles that fall entirely within the rasterized selection should be excluded from loading and ...
bool invertSelection
Whether to invert the selection specified by the polygons.
override partial void RemoveFromTileset(Cesium3DTileset tileset)
List< CesiumCartographicPolygon > polygons
The polygons to rasterize for this overlay.
override partial void AddToTileset(Cesium3DTileset tileset)
A pyramid of 2D images - sometimes terabytes or more in size - that can be draped over a Cesium3DTile...
void Refresh()
Refreshes this overlay by calling RemoveFromTileset followed by AddToTileset.