CARLA
Loading...
Searching...
No Matches
SoilTypeManager.h
Go to the documentation of this file.
1// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma de Barcelona (UAB). This work is licensed under the terms of the MIT license. For a copy, see <https://opensource.org/licenses/MIT>.
2
3#pragma once
4
6
7#include <util/ue-header-guard-begin.h>
8#include "CoreMinimal.h"
9#include "GameFramework/Actor.h"
10#include <util/ue-header-guard-end.h>
11
12#include "SoilTypeManager.generated.h"
13
14UENUM(BlueprintType)
21
22USTRUCT(BlueprintType)
24{
25 GENERATED_BODY()
26
27 UPROPERTY(EditAnywhere, BlueprintReadWrite)
29
30 const FString ToString() const
31 {
32 switch(TerrainType)
33 {
35 return "None";
37 return "Desert";
39 return "Forest";
40 }
41 return "";
42 };
43};
44
45UCLASS()
46class CARLA_API ASoilTypeManager : public AActor
47{
48 GENERATED_BODY()
49
50private:
51 UPROPERTY(EditAnywhere)
53
54 UPROPERTY(EditAnywhere)
56
57 UPROPERTY(EditAnywhere)
59
60public:
61 // Sets default values for this actor's properties
63
64 UPROPERTY(EditAnywhere, BlueprintReadWrite)
65 TSubclassOf<AActor> CarClass;
66
67protected:
68 // Called when the game starts or when spawned
69 virtual void BeginPlay() override;
70
71public:
72 UFUNCTION(Category="MapGen|Soil Manager")
74
75 UFUNCTION(Category="MapGen|Soil Manager")
77
78 UFUNCTION(Category="MapGen|Soil Manager")
80
81 UFUNCTION(Category="MapGen|Soil Manager")
83
84 UFUNCTION(Category="MapGen|Soil Manager")
85 void AddTerrainPropertiesToTile(int TileX, int TileY, FSoilTerramechanicsProperties TerrainProperties);
86
87 UFUNCTION(Category="MapGen|Soil Manager")
89
90 virtual void Tick(float DeltaSeconds) override;
91
92};
ESoilTerramechanicsType
@ DESERT
@ FOREST
@ NONE_SOIL
TMap< FIntVector, FSoilTerramechanicsProperties > TilesTerrainProperties
FSoilTerramechanicsProperties GeneralTerrainProperties
TSubclassOf< AActor > CarClass
FSoilTerramechanicsProperties GetTerrainPropertiesAtGlobalLocation(FVector VehicleLocation)
virtual void BeginPlay() override
ALargeMapManager * LargeMapManager
FSoilTerramechanicsProperties GetTerrainPropertiesAtLocalLocation(FVector VehicleLocation)
void AddTerrainPropertiesToTile(int TileX, int TileY, FSoilTerramechanicsProperties TerrainProperties)
FSoilTerramechanicsProperties GetGeneralTerrainProperties()
virtual void Tick(float DeltaSeconds) override
void SetGeneralTerrainProperties(FSoilTerramechanicsProperties TerrainProperties)
TEnumAsByte< ESoilTerramechanicsType > TerrainType
const FString ToString() const