CARLA
Loading...
Searching...
No Matches
GeometryImporter.h
Go to the documentation of this file.
1#pragma once
2
3#include "Components/SplineComponent.h"
4#include "JsonObjectConverter.h"
5#include "Kismet/BlueprintFunctionLibrary.h"
6#include "GeometryImporter.generated.h"
7
8DECLARE_LOG_CATEGORY_EXTERN(LogGeometryImporter, Log, All);
9
10UCLASS(Blueprintable, BlueprintType)
12{
13 GENERATED_BODY()
14
15public:
16 UFUNCTION(BlueprintCallable, Category = "GeometryImporter")
17 TArray<FVector2D> ReadCSVCoordinates(FString Path, FVector2D OriginGeoCoordinates);
18
19 UFUNCTION(BlueprintCallable, Category = "GeometryImporter")
20 static USplineComponent *CreateSpline(UWorld *World, const TArray<FVector> &Points, const FString SplineName);
21
22 UFUNCTION(BlueprintCallable, Category = "GeometryImporter")
23 static TArray<USplineComponent *> ImportGeoJsonPolygonsToSplines(UWorld *World, const FString &GeoJsonFilePath, const FVector2D OriginGeoCoordinates);
24
25 // carla-digitaltwins port: contour list (JSON array of arrays of [x, y] render
26 // target pixels) to world-space closed splines.
27 UFUNCTION(BlueprintCallable, Category = "GeometryImporter")
28 static TArray<USplineComponent *> CreateSplinesFromJson(
29 UWorld *World,
30 const FString &JsonFilePath,
31 FVector2D Center,
32 FVector2D Extent,
33 FIntPoint RTExtent);
34
35 // carla-digitaltwins port: import an OBJ/FBX mesh and spawn it (editor only;
36 // no-op in non-editor builds).
37 UFUNCTION(BlueprintCallable, Category = "GeometryImporter")
38 static void ImportObj(const FString &ObjFilePath, UWorld *World, UMaterialInterface *Material);
39};
DECLARE_LOG_CATEGORY_EXTERN(LogGeometryImporter, Log, All)