|
1 | 1 | #pragma once |
2 | 2 |
|
| 3 | +#include "CesiumVectorData/VectorStyle.h" |
3 | 4 | #include "CoreMinimal.h" |
4 | 5 | #include "UObject/ObjectMacros.h" |
5 | | -#include "CesiumVectorData/VectorStyle.h" |
6 | 6 |
|
7 | 7 | #include "CesiumVectorStyle.generated.h" |
8 | 8 |
|
9 | 9 | /** |
10 | 10 | * The mode used to render polylines and strokes. |
11 | 11 | */ |
12 | | - UENUM(BlueprintType) |
13 | | - enum class ECesiumVectorLineWidthMode : uint8 { |
14 | | - /** |
15 | | - * The line width represents the number of pixels the line will take up, |
16 | | - * regardless of LOD. |
17 | | - */ |
18 | | - Pixels = 0, |
19 | | - /** |
20 | | - * The line width represents the physical size of the line in meters. |
21 | | - */ |
22 | | - Meters = 1 |
23 | | - }; |
24 | | - |
25 | | - /** |
26 | | - * The mode used to interpret the color value provided in a style. |
27 | | - */ |
28 | | - UENUM(BlueprintType) |
29 | | - enum class ECesiumVectorColorMode : uint8 { |
30 | | - /** |
31 | | - * The normal color mode. The color will be used directly. |
32 | | - */ |
33 | | - Normal = 0, |
34 | | - /** |
35 | | - * The color will be chosen randomly. |
36 | | - * |
37 | | - * The color randomization will be applied to each component, with the |
38 | | - * resulting value between 0 and the specified color component value. Alpha is |
39 | | - * always ignored. For example, if the color was 0xff000077 (only 0x77 in the |
40 | | - * green component), the resulting randomized value could be 0xff000041, or |
41 | | - * 0xff000076, but never 0xff0000aa. |
42 | | - */ |
43 | | - Random = 1 |
44 | | - }; |
45 | | - |
46 | | - /** |
47 | | - * The style used to draw polylines and strokes. |
48 | | - */ |
49 | | - USTRUCT(BlueprintType) |
50 | | - struct FCesiumVectorLineStyle { |
51 | | - GENERATED_BODY() |
52 | | - |
53 | | - /** |
54 | | - * The color to be used. |
55 | | - */ |
56 | | - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
57 | | - FColor Color = FColor(1.0f, 1.0f, 1.0f, 1.0f); |
58 | | - /** |
59 | | - * The color mode to be used. |
60 | | - */ |
61 | | - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
62 | | - ECesiumVectorColorMode ColorMode = |
63 | | - ECesiumVectorColorMode::Normal; |
64 | | - /** |
65 | | - * The width of the line or stroke, with the unit specified by `WidthMode`. |
66 | | - */ |
67 | | - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium", meta = (ClampMin = "0")) |
68 | | - double Width = 1.0; |
69 | | - /** |
70 | | - * The mode to use when interpreting `Width`. |
71 | | - */ |
72 | | - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
73 | | - ECesiumVectorLineWidthMode WidthMode = |
74 | | - ECesiumVectorLineWidthMode::Pixels; |
75 | | - }; |
76 | | - |
77 | | - /** |
78 | | - * The style used to draw polygons. |
79 | | - */ |
80 | | - USTRUCT(BlueprintType) |
81 | | - struct FCesiumVectorPolygonStyle { |
82 | | - GENERATED_BODY() |
83 | | - |
84 | | - /** |
85 | | - * The color to be used. |
86 | | - */ |
87 | | - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
88 | | - FColor Color = FColor(1.0f, 1.0f, 1.0f, 1.0f); |
89 | | - /** |
90 | | - * The color mode to be used. |
91 | | - */ |
92 | | - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
93 | | - ECesiumVectorColorMode ColorMode = |
94 | | - ECesiumVectorColorMode::Normal; |
95 | | - /** |
96 | | - * Whether the polygon should be filled. The `ColorStyle` specified |
97 | | - * here will be used for the fill color. |
98 | | - */ |
99 | | - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
100 | | - bool Fill = true; |
101 | | - /** |
102 | | - * Whether the polygon should be outlined. The `LineStyle` specified on |
103 | | - * the same `FCesiumVectorDocumentRasterOverlayStyle` as this will be used for |
104 | | - * the stroke color. |
105 | | - */ |
106 | | - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
107 | | - bool Outline = false; |
108 | | - }; |
109 | | - |
110 | | - /** |
111 | | - * Style information to use when drawing vector data. |
112 | | - */ |
113 | | - USTRUCT(BlueprintType) |
114 | | - struct FCesiumVectorStyle { |
115 | | - GENERATED_BODY() |
116 | | - |
117 | | - /** |
118 | | - * Styles to use when drawing polylines and stroking shapes. |
119 | | - */ |
120 | | - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
121 | | - FCesiumVectorLineStyle LineStyle; |
122 | | - |
123 | | - /** |
124 | | - * Styles to use when drawing polygons. |
125 | | - */ |
126 | | - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
127 | | - FCesiumVectorPolygonStyle PolygonStyle; |
| 12 | +UENUM(BlueprintType) |
| 13 | +enum class ECesiumVectorLineWidthMode : uint8 { |
| 14 | + /** |
| 15 | + * The line width represents the number of pixels the line will take up, |
| 16 | + * regardless of LOD. |
| 17 | + */ |
| 18 | + Pixels = 0, |
| 19 | + /** |
| 20 | + * The line width represents the physical size of the line in meters. |
| 21 | + */ |
| 22 | + Meters = 1 |
| 23 | +}; |
| 24 | + |
| 25 | +/** |
| 26 | + * The mode used to interpret the color value provided in a style. |
| 27 | + */ |
| 28 | +UENUM(BlueprintType) |
| 29 | +enum class ECesiumVectorColorMode : uint8 { |
| 30 | + /** |
| 31 | + * The normal color mode. The color will be used directly. |
| 32 | + */ |
| 33 | + Normal = 0, |
| 34 | + /** |
| 35 | + * The color will be chosen randomly. |
| 36 | + * |
| 37 | + * The color randomization will be applied to each component, with the |
| 38 | + * resulting value between 0 and the specified color component value. Alpha is |
| 39 | + * always ignored. For example, if the color was 0xff000077 (only 0x77 in the |
| 40 | + * green component), the resulting randomized value could be 0xff000041, or |
| 41 | + * 0xff000076, but never 0xff0000aa. |
| 42 | + */ |
| 43 | + Random = 1 |
| 44 | +}; |
| 45 | + |
| 46 | +/** |
| 47 | + * The style used to draw polylines and strokes. |
| 48 | + */ |
| 49 | +USTRUCT(BlueprintType) |
| 50 | +struct FCesiumVectorLineStyle { |
| 51 | + GENERATED_BODY() |
| 52 | + |
| 53 | + /** |
| 54 | + * The color to be used. |
| 55 | + */ |
| 56 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 57 | + FColor Color = FColor(1.0f, 1.0f, 1.0f, 1.0f); |
| 58 | + /** |
| 59 | + * The color mode to be used. |
| 60 | + */ |
| 61 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 62 | + ECesiumVectorColorMode ColorMode = ECesiumVectorColorMode::Normal; |
| 63 | + /** |
| 64 | + * The width of the line or stroke, with the unit specified by `WidthMode`. |
| 65 | + */ |
| 66 | + UPROPERTY( |
| 67 | + EditAnywhere, |
| 68 | + BlueprintReadWrite, |
| 69 | + Category = "Cesium", |
| 70 | + meta = (ClampMin = "0")) |
| 71 | + double Width = 1.0; |
| 72 | + /** |
| 73 | + * The mode to use when interpreting `Width`. |
| 74 | + */ |
| 75 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 76 | + ECesiumVectorLineWidthMode WidthMode = ECesiumVectorLineWidthMode::Pixels; |
| 77 | +}; |
| 78 | + |
| 79 | +/** |
| 80 | + * The style used to draw polygons. |
| 81 | + */ |
| 82 | +USTRUCT(BlueprintType) |
| 83 | +struct FCesiumVectorPolygonStyle { |
| 84 | + GENERATED_BODY() |
| 85 | + |
| 86 | + /** |
| 87 | + * The color to be used. |
| 88 | + */ |
| 89 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 90 | + FColor Color = FColor(1.0f, 1.0f, 1.0f, 1.0f); |
| 91 | + /** |
| 92 | + * The color mode to be used. |
| 93 | + */ |
| 94 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 95 | + ECesiumVectorColorMode ColorMode = ECesiumVectorColorMode::Normal; |
| 96 | + /** |
| 97 | + * Whether the polygon should be filled. The `ColorStyle` specified |
| 98 | + * here will be used for the fill color. |
| 99 | + */ |
| 100 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 101 | + bool Fill = true; |
| 102 | + /** |
| 103 | + * Whether the polygon should be outlined. The `LineStyle` specified on |
| 104 | + * the same `FCesiumVectorDocumentRasterOverlayStyle` as this will be used for |
| 105 | + * the stroke color. |
| 106 | + */ |
| 107 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 108 | + bool Outline = false; |
| 109 | +}; |
| 110 | + |
| 111 | +/** |
| 112 | + * Style information to use when drawing vector data. |
| 113 | + */ |
| 114 | +USTRUCT(BlueprintType) |
| 115 | +struct FCesiumVectorStyle { |
| 116 | + GENERATED_BODY() |
| 117 | + |
| 118 | + /** |
| 119 | + * Styles to use when drawing polylines and stroking shapes. |
| 120 | + */ |
| 121 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 122 | + FCesiumVectorLineStyle LineStyle; |
| 123 | + |
| 124 | + /** |
| 125 | + * Styles to use when drawing polygons. |
| 126 | + */ |
| 127 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 128 | + FCesiumVectorPolygonStyle PolygonStyle; |
128 | 129 |
|
129 | | - /** |
130 | | - * Converts this Unreal representation into the Cesium Native equivalent. |
131 | | - */ |
132 | | - CesiumVectorData::VectorStyle toNative() const; |
| 130 | + /** |
| 131 | + * Converts this Unreal representation into the Cesium Native equivalent. |
| 132 | + */ |
| 133 | + CesiumVectorData::VectorStyle toNative() const; |
133 | 134 |
|
134 | | - /** |
135 | | - * Creates this Unreal representation from the Cesium Native equivalent. |
136 | | - */ |
137 | | - static FCesiumVectorStyle fromNative(const CesiumVectorData::VectorStyle& style); |
138 | | - }; |
| 135 | + /** |
| 136 | + * Creates this Unreal representation from the Cesium Native equivalent. |
| 137 | + */ |
| 138 | + static FCesiumVectorStyle |
| 139 | + fromNative(const CesiumVectorData::VectorStyle& style); |
| 140 | +}; |
0 commit comments