Cesium for Unity 1.26.0
Loading...
Searching...
No Matches
CesiumVectorStyle.cs
Go to the documentation of this file.
1using System;
2using UnityEngine;
3
4namespace CesiumForUnity
5{
10 {
14 Normal = 0,
15
27 }
28
33 {
38 Pixels = 0,
39
44 }
45
49 [Serializable]
51 {
55 [Tooltip("The color to be used.")]
56 public Color32 color;
57
61 [Tooltip("The color mode to be used.")]
63
67 [Tooltip("The width of the line or stroke, with the unit specified by widthMode.")]
68 [Min(0)]
69 public double width;
70
74 [Tooltip("The mode to use when interpreting width.")]
76
81 {
82 color = new Color32(255, 255, 255, 255),
84 width = 1.0,
86 };
87 }
88
92 [Serializable]
94 {
98 [Tooltip("The color to be used.")]
99 public Color32 color;
100
104 [Tooltip("The color mode to be used.")]
106
111 {
112 color = new Color32(255, 255, 255, 255),
114 };
115 }
116
120 [Serializable]
122 {
126 [Tooltip("Whether the polygon should be filled.")]
127 public bool fill;
128
132 [Tooltip("If fill is true, this style will be used when filling the polygon.")]
134
138 [Tooltip("Whether the polygon should be outlined.")]
139 public bool outline;
140
144 [Tooltip("If outline is true, this style will be used when outlining the polygon.")]
146
157 }
158
162 [Serializable]
164 {
168 [Tooltip("The radius of the point in pixels.")]
169 [Min(0)]
170 public double radius;
171
175 [Tooltip("Whether the point should be filled.")]
176 public bool fill;
177
181 [Tooltip("If fill is true, this style will be used when filling the point.")]
183
187 [Tooltip("Whether the point should be outlined.")]
188 public bool outline;
189
193 [Tooltip("If outline is true, this style will be used when outlining the point.")]
195
212 }
213
217 [Serializable]
218 public struct CesiumVectorStyle
219 {
223 [Tooltip("Styles to use when drawing polylines and stroking shapes.")]
225
229 [Tooltip("Styles to use when drawing polygons.")]
231
235 [Tooltip("Styles to use when drawing points.")]
237
247 }
248}
CesiumVectorLineWidthMode
The mode used to render polylines and strokes.
@ Meters
The line width represents the physical size of the line in meters.
@ Pixels
The line width represents the number of pixels the line will take up, regardless of LOD.
CesiumVectorColorMode
The mode used to interpret the color value provided in a style.
@ Random
The color will be chosen randomly.
The style used to draw polylines and strokes.
CesiumVectorLineWidthMode widthMode
The mode to use when interpreting width.
Color32 color
The color to be used.
CesiumVectorColorMode colorMode
The color mode to be used.
static CesiumVectorLineStyle Default
Creates a default line style with white color and 1 pixel width.
double width
The width of the line or stroke, with the unit specified by widthMode.
The style used to draw points.
CesiumVectorPolygonFillStyle fillStyle
If fill is true, this style will be used when filling the point.
static CesiumVectorPointStyle Default
Creates a default point style with a 5 pixel radius, fill enabled, and outline disabled.
CesiumVectorLineStyle outlineStyle
If outline is true, this style will be used when outlining the point.
double radius
The radius of the point in pixels.
bool outline
Whether the point should be outlined.
bool fill
Whether the point should be filled.
CesiumVectorColorMode colorMode
The color mode to be used.
static CesiumVectorPolygonFillStyle Default
Creates a default polygon fill style with white color.
The style used to draw polygons.
CesiumVectorLineStyle outlineStyle
If outline is true, this style will be used when outlining the polygon.
CesiumVectorPolygonFillStyle fillStyle
If fill is true, this style will be used when filling the polygon.
static CesiumVectorPolygonStyle Default
Creates a default polygon style with fill enabled and outline disabled.
bool outline
Whether the polygon should be outlined.
bool fill
Whether the polygon should be filled.
Style information to use when drawing vector data.
CesiumVectorLineStyle lineStyle
Styles to use when drawing polylines and stroking shapes.
static CesiumVectorStyle Default
Creates a default vector style.
CesiumVectorPolygonStyle polygonStyle
Styles to use when drawing polygons.
CesiumVectorPointStyle pointStyle
Styles to use when drawing points.