-
Notifications
You must be signed in to change notification settings - Fork 3
/
polyline_materials.go
50 lines (44 loc) · 2.29 KB
/
polyline_materials.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package czml
// PolylineMaterial is a definition of how a polyline is colored or shaded
// https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/PolylineMaterial
type PolylineMaterial struct {
SolidColor *SolidColorMaterial `json:"solidColor,omitempty"`
PolylineOutline *PolylineOutlineMaterial `json:"polylineOutline,omitempty"`
PolylineArrow *PolylineArrowMaterial `json:"polylineArrow,omitempty"`
PolylineDash *PolylineDashMaterial `json:"polylineDash,omitempty"`
PolylineGlow *PolylineGlowMaterial `json:"polylineGlow,omitempty"`
Image *ImageMaterial `json:"image,omitempty"`
Grid *GridMaterial `json:"grid,omitempty"`
Stripe *StripeMaterial `json:"stripe,omitempty"`
Checkerboard *CheckerboardMaterial `json:"checkerboard,omitempty"`
}
func (m *PolylineMaterial) UpdateColor(c SolidColorMaterial) {
m.SolidColor = &c
}
// PolylineOutlineMaterial is a material that fills the surface of a line with an outlined color.
// https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/PolylineOutlineMaterial
type PolylineOutlineMaterial struct {
Color *Color `json:"color,omitempty"`
OutlineColor *Color `json:"outlineColor,omitempty"`
OutlineWidth *float64 `json:"outlineWidth,omitempty"`
}
// PolylineArrowMaterial is a material that fills the surface of a line with an arrow.
// https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/PolylineArrowMaterial
type PolylineArrowMaterial struct {
Color *Color `json:"color,omitempty"`
}
// PolylineDashMaterial is a material that fills the surface of a line with a pattern of dashes.
// https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/PolylineDashMaterial
type PolylineDashMaterial struct {
Color *Color `json:"color,omitempty"`
GapColor *Color `json:"gapColor,omitempty"`
DashLength *float64 `json:"dashLength,omitempty"`
DashPattern *int `json:"dashPattern,omitempty"`
}
// PolylineGlowMaterial is a material that fills the surface of a line with a glowing color.
// https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/PolylineGlowMaterial
type PolylineGlowMaterial struct {
Color *Color `json:"color,omitempty"`
GlowPower *float64 `json:"glowPower,omitempty"`
TaperPower *float64 `json:"taperPower,omitempty"`
}