CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
Unreal
CarlaUnreal
Plugins
Carla
Source
Carla
Util
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
8
DECLARE_LOG_CATEGORY_EXTERN
(LogGeometryImporter, Log, All);
9
10
UCLASS(Blueprintable, BlueprintType)
11
class CARLA_API
UGeometryImporter
: public
UBlueprintFunctionLibrary
12
{
13
GENERATED_BODY()
14
15
public
:
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
DECLARE_LOG_CATEGORY_EXTERN(LogCarlaMapGenFunctionLibrary, Log, All)
UBlueprintFunctionLibrary
UGeometryImporter
Definition
GeometryImporter.h:12
UGeometryImporter::CreateSplinesFromJson
static TArray< USplineComponent * > CreateSplinesFromJson(UWorld *World, const FString &JsonFilePath, FVector2D Center, FVector2D Extent, FIntPoint RTExtent)
Definition
GeometryImporter.cpp:195
UGeometryImporter::CreateSpline
static USplineComponent * CreateSpline(UWorld *World, const TArray< FVector > &Points, const FString SplineName)
Definition
GeometryImporter.cpp:53
UGeometryImporter::ImportGeoJsonPolygonsToSplines
static TArray< USplineComponent * > ImportGeoJsonPolygonsToSplines(UWorld *World, const FString &GeoJsonFilePath, const FVector2D OriginGeoCoordinates)
Definition
GeometryImporter.cpp:120
UGeometryImporter::ImportObj
static void ImportObj(const FString &ObjFilePath, UWorld *World, UMaterialInterface *Material)
Definition
GeometryImporter.cpp:260
UGeometryImporter::ReadCSVCoordinates
TArray< FVector2D > ReadCSVCoordinates(FString Path, FVector2D OriginGeoCoordinates)
Definition
GeometryImporter.cpp:17
Generated by
1.18.0