@@ -94,11 +94,40 @@ struct FCesiumGeoJsonFeature {
9494 friend class UCesiumGeoJsonFeatureBlueprintLibrary ;
9595};
9696
97+ /* *
98+ * @brief The type of a feature's ID field.
99+ */
100+ UENUM (BlueprintType)
101+ enum class ECesiumGeoJsonFeatureIdType {
102+ /* *
103+ * @brief The feature has no ID.
104+ */
105+ None,
106+ /* *
107+ * @brief The feature's ID is an integer.
108+ */
109+ Integer,
110+ /* *
111+ * @brief The feature's ID is a string.
112+ */
113+ String
114+ };
115+
97116UCLASS ()
98117class UCesiumGeoJsonFeatureBlueprintLibrary : public UBlueprintFunctionLibrary {
99118 GENERATED_BODY ()
100119
101120public:
121+ /* *
122+ * @brief Returns true if this feature's
123+ */
124+ UFUNCTION (
125+ BlueprintCallable,
126+ BlueprintPure,
127+ Category = " Cesium|Vector|Feature" )
128+ static ECesiumGeoJsonFeatureIdType
129+ GetIdType (const FCesiumGeoJsonFeature& InFeature);
130+
102131 /* *
103132 * @brief Returns the ID of the provided feature, or -1 if no ID was
104133 * present or if the ID is not an integer.
@@ -221,6 +250,10 @@ class UCesiumGeoJsonPolygonBlueprintFunctionLibrary
221250 GetPolygonRings (const FCesiumGeoJsonPolygon& InPolygon);
222251};
223252
253+ /* *
254+ * @brief Enum used for branching when a UFUNCTION could return a value or could
255+ * return no value.
256+ */
224257UENUM ()
225258enum class EHasValue : uint8 { HasValue, NoValue };
226259
@@ -233,55 +266,119 @@ class UCesiumGeoJsonObjectBlueprintLibrary : public UBlueprintFunctionLibrary {
233266 GENERATED_BODY ()
234267
235268public:
269+ /* *
270+ * @brief Checks if the provided GeoJSON object is valid.
271+ *
272+ * Any operations performed with an invalid object will likely give incorrect
273+ * results.
274+ */
236275 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
237276 static bool IsValid (const FCesiumGeoJsonObject& InObject);
238277
278+ /* *
279+ * @brief Returns the `ECesiumGeoJsonObjectType` of the GeoJSON value this
280+ * object represents.
281+ */
239282 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
240283 static ECesiumGeoJsonObjectType
241284 GetObjectType (const FCesiumGeoJsonObject& InObject);
242285
286+ /* *
287+ * @brief Attempts to obtain this GeoJSON object's bounding box. If the `No
288+ * Value` branch is called, the object has no bounding box.
289+ */
243290 UFUNCTION (
244291 BlueprintCallable,
245292 Category = " Cesium|Vector|Object" ,
246293 Meta = (ExpandEnumAsExecs = " Branches" ))
247294 static FBox
248295 GetBoundingBox (const FCesiumGeoJsonObject& InObject, EHasValue& Branches);
249296
297+ /* *
298+ * @brief Obtains any foreign members on this GeoJSON object.
299+ *
300+ * Foreign members are members found in the loaded GeoJSON document that
301+ * are not part of the specification for this GeoJSON object type.
302+ */
250303 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
251304 static FJsonObjectWrapper
252305 GetForeignMembers (const FCesiumGeoJsonObject& InObject);
253306
307+ /* *
308+ * @brief If this object is a GeoJSON Point type, this returns the
309+ * `coordinates` of that Point. Otherwise, a zero vector is returned.
310+ */
254311 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
255312 static FVector GetObjectAsPoint (const FCesiumGeoJsonObject& InObject);
256313
314+ /* *
315+ * @brief If this object is a GeoJSON MultiPoint type, this returns the array
316+ * of `coordinates` on that MultiPoint object. Otherwise, an empty array is
317+ * returned.
318+ */
257319 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
258320 static TArray<FVector>
259321 GetObjectAsMultiPoint (const FCesiumGeoJsonObject& InObject);
260322
323+ /* *
324+ * @brief If this object is a GeoJSON LineString type, this returns a
325+ * `FCesiumGeoJsonLineString` representing that line. Otherwise, a
326+ * `FCesiumGeoJsonLineString` without any points is returned.
327+ */
261328 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
262329 static FCesiumGeoJsonLineString
263330 GetObjectAsLineString (const FCesiumGeoJsonObject& InObject);
264331
332+ /* *
333+ * @brief If this object is a GeoJSON MultiLineString type, this returns an
334+ * array of `FCesiumGeoJsonLineString` objects representing the lines.
335+ * Otherwise, an empty array is returned.
336+ */
265337 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
266338 static TArray<FCesiumGeoJsonLineString>
267339 GetObjectAsMultiLineString (const FCesiumGeoJsonObject& InObject);
268340
341+ /* *
342+ * @brief If this object is a GeoJSON Polygon type, this returns a
343+ * `FCesiumGeoJsonPolygon` representing that line. Otherwise, a
344+ * `FCesiumGeoJsonPolygon` without any points is returned.
345+ */
269346 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
270347 static FCesiumGeoJsonPolygon
271348 GetObjectAsPolygon (const FCesiumGeoJsonObject& InObject);
272349
350+ /* *
351+ * @brief If this object is a GeoJSON MultiPolygon type, this returns an
352+ * array of `FCesiumGeoJsonPolygon` objects representing the polygons.
353+ * Otherwise, an empty array is returned.
354+ */
273355 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
274356 static TArray<FCesiumGeoJsonPolygon>
275357 GetObjectAsMultiPolygon (const FCesiumGeoJsonObject& InObject);
276358
359+ /* *
360+ * @brief If this object is a GeoJSON GeometryCollection type, this returns an
361+ * array of `FCesiumGeoJsonObject` objects representing the objects.
362+ * Otherwise, an empty array is returned.
363+ */
277364 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
278365 static TArray<FCesiumGeoJsonObject>
279366 GetObjectAsGeometryCollection (const FCesiumGeoJsonObject& InObject);
280367
368+ /* *
369+ * @brief If this object is a GeoJSON Feature type, this returns a
370+ * `FCesiumGeoJsonFeature` representing that feature. Otherwise, an invalid
371+ * `FCesiumGeoJsonFeature` is returned.
372+ */
281373 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
282374 static FCesiumGeoJsonFeature
283375 GetObjectAsFeature (const FCesiumGeoJsonObject& InObject);
284376
377+ /* *
378+ * @brief If this object is a GeoJSON FeatureCollection type, this returns an
379+ * array of `FCesiumGeoJsonFeature` objects representing the features.
380+ * Otherwise, an empty array is returned.
381+ */
285382 UFUNCTION (BlueprintCallable, BlueprintPure, Category = " Cesium|Vector|Object" )
286383 static TArray<FCesiumGeoJsonFeature>
287384 GetObjectAsFeatureCollection (const FCesiumGeoJsonObject& InObject);
0 commit comments