cesium-native 0.51.0
Loading...
Searching...
No Matches
VectorStyle.h
1#pragma once
2
3#include <CesiumUtility/Color.h>
4
5#include <optional>
6
7namespace CesiumVectorData {
8
12enum class ColorMode : uint8_t {
14 Normal = 0,
26};
27
31struct ColorStyle {
36
48 CesiumUtility::Color getColor(size_t randomColorSeed = 0) const;
49};
50
52enum class LineWidthMode : uint8_t {
57 Pixels = 0,
67};
68
82
89 std::optional<ColorStyle> fill;
94 std::optional<LineStyle> outline;
95};
96
109
113 VectorStyle() = default;
114
118 VectorStyle(const LineStyle& lineStyle, const PolygonStyle& polygonStyle);
119
124};
125} // namespace CesiumVectorData
Classes for loading vector data such as GeoJSON.
LineWidthMode
The mode to use when interpreting a given line width.
Definition VectorStyle.h:52
@ Meters
The line width will cover this number of meters of the ellipsoid it's rendered on....
Definition VectorStyle.h:66
@ Pixels
The line will always be this number of pixels in width, no matter how close the user gets to the line...
Definition VectorStyle.h:57
ColorMode
The mode used for coloring.
Definition VectorStyle.h:12
@ Random
The color will be chosen randomly.
Definition VectorStyle.h:25
@ Normal
The normal color mode. The color will be used directly.
Definition VectorStyle.h:14
Represents an RGBA color value.
Definition Color.h:9
Specifies the color of a style type.
Definition VectorStyle.h:31
ColorMode colorMode
The color mode to be used.
Definition VectorStyle.h:35
CesiumUtility::Color color
The color to be used.
Definition VectorStyle.h:33
CesiumUtility::Color getColor(size_t randomColorSeed=0) const
Obtains the color specified on this ColorStyle.
The style used to draw polylines and strokes.
Definition VectorStyle.h:70
double width
The width of this line. If widthMode is set to LineWidthMode::Pixels, this is in pixels....
Definition VectorStyle.h:76
LineWidthMode widthMode
The mode to use when interpreting width.
Definition VectorStyle.h:80
The style used to draw a Polygon.
Definition VectorStyle.h:84
std::optional< ColorStyle > fill
The color used to fill this polygon. If std::nullopt, the polygon will not be filled.
Definition VectorStyle.h:89
std::optional< LineStyle > outline
The style used to outline this polygon. If std::nullopt, the polygon will not be outlined.
Definition VectorStyle.h:94
LineStyle line
The style to use when drawing polylines.
VectorStyle()=default
Default constructor for VectorStyle.
VectorStyle(const LineStyle &lineStyle, const PolygonStyle &polygonStyle)
Initializes style information for all types.
PolygonStyle polygon
The style to use when drawing polygons.
VectorStyle(const CesiumUtility::Color &color)
Initializes all styles to the given color.