Cesium for Unity 1.23.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]
163 public struct CesiumVectorStyle
164 {
168 [Tooltip("Styles to use when drawing polylines and stroking shapes.")]
170
174 [Tooltip("Styles to use when drawing polygons.")]
176
185 }
186}
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.
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.