-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathGISDataComponent.h
62 lines (43 loc) · 1.38 KB
/
GISDataComponent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#pragma once
#include "CoreMinimal.h"
#include "Components/SceneComponent.h"
#include "GDALHelpers.h"
#include "GISDataComponent.generated.h"
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class LANDSCAPEGENRUNTIME_API UGISDataComponent : public USceneComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UGISDataComponent();
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
int NumComponentsX;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
int NumComponentsY;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
int ComponentSizeQuads;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
int NumPixelsX;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
int NumPixelsY;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
FVector2D UpperLeft;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
FVector2D LowerRight;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
FString WKT;
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
void SetGeoTransforms(GDALDatasetRef& GPSCoordinate);
UFUNCTION(BlueprintCallable, CallInEditor)
FVector GetWorldSpaceLocation(FVector2D GPSCoordinate);
UFUNCTION(BlueprintCallable, CallInEditor)
FVector2D GetGPSLocation(const FVector& WorldSpaceCoordinate);
private:
UPROPERTY()
TArray<double> GeoTransform;
UPROPERTY()
TArray<double> InvGeoTransform;
};