Cesium for Unreal 2.18.0
Loading...
Searching...
No Matches
CesiumVectorStyle.h
Go to the documentation of this file.
1#pragma once
2
3#include "CesiumVectorData/VectorStyle.h"
4#include "CoreMinimal.h"
5#include "UObject/ObjectMacros.h"
6
7#include "CesiumVectorStyle.generated.h"
8
9/**
10 * The mode used to render polylines and strokes.
11 */
12UENUM(BlueprintType)
13enum 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 */
23};
24
25/**
26 * The mode used to interpret the color value provided in a style.
27 */
28UENUM(BlueprintType)
29enum 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 */
44};
45
46/**
47 * The style used to draw polylines and strokes.
48 */
49USTRUCT(BlueprintType)
51 GENERATED_BODY()
52
53 /**
54 * The color to be used.
55 */
56 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
57 FColor Color = FColor(0xff, 0xff, 0xff);
58 /**
59 * The color mode to be used.
60 */
61 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
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")
77};
78
79/**
80 * The style used to fill polygons.
81 */
82USTRUCT(BlueprintType)
84 GENERATED_BODY()
85
86 /**
87 * The color to be used.
88 */
89 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
90 FColor Color = FColor(0xff, 0xff, 0xff);
91 /**
92 * The color mode to be used.
93 */
94 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
96};
97
98/**
99 * The style used to draw polygons.
100 */
101USTRUCT(BlueprintType)
103 GENERATED_BODY()
104
105 /**
106 * Whether the polygon should be filled.
107 */
108 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
109 bool Fill = true;
110
111 /**
112 * If `Fill` is true, this style will be used when filling the polygon.
113 */
114 UPROPERTY(
115 EditAnywhere,
116 BlueprintReadWrite,
117 Category = "Cesium",
118 meta = (EditCondition = "Fill"))
120
121 /**
122 * Whether the polygon should be outlined.
123 */
124 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
125 bool Outline = false;
126
127 /**
128 * If `Outline` is true, this style will be used when outlining the polygon.
129 */
130 UPROPERTY(
131 EditAnywhere,
132 BlueprintReadWrite,
133 Category = "Cesium",
134 meta = (EditCondition = "Outline"))
136};
137
138/**
139 * Style information to use when drawing vector data.
140 */
141USTRUCT(BlueprintType)
143 GENERATED_BODY()
144
145 /**
146 * Styles to use when drawing polylines and stroking shapes.
147 */
148 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
150
151 /**
152 * Styles to use when drawing polygons.
153 */
154 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
156
157 /**
158 * Converts this Unreal representation into the Cesium Native equivalent.
159 */
160 CesiumVectorData::VectorStyle toNative() const;
161
162 /**
163 * Creates this Unreal representation from the Cesium Native equivalent.
164 */
165 static FCesiumVectorStyle
166 fromNative(const CesiumVectorData::VectorStyle& style);
167};
ECesiumVectorLineWidthMode
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.
ECesiumVectorColorMode
The mode used to interpret the color value provided in a style.
@ Random
The color will be chosen randomly.
@ Normal
The normal color mode.
The style used to draw polylines and strokes.
double Width
The width of the line or stroke, with the unit specified by WidthMode.
ECesiumVectorColorMode ColorMode
The color mode to be used.
FColor Color
The color to be used.
ECesiumVectorLineWidthMode WidthMode
The mode to use when interpreting Width.
The style used to fill polygons.
ECesiumVectorColorMode ColorMode
The color mode to be used.
FColor Color
The color to be used.
The style used to draw polygons.
FCesiumVectorPolygonFillStyle FillStyle
If Fill is true, this style will be used when filling the polygon.
FCesiumVectorLineStyle OutlineStyle
If Outline is true, this style will be used when outlining the polygon.
bool Fill
Whether the polygon should be filled.
bool Outline
Whether the polygon should be outlined.
Style information to use when drawing vector data.
static FCesiumVectorStyle fromNative(const CesiumVectorData::VectorStyle &style)
Creates this Unreal representation from the Cesium Native equivalent.
FCesiumVectorPolygonStyle PolygonStyle
Styles to use when drawing polygons.
FCesiumVectorLineStyle LineStyle
Styles to use when drawing polylines and stroking shapes.
CesiumVectorData::VectorStyle toNative() const
Converts this Unreal representation into the Cesium Native equivalent.