CARLA
 
载入中...
搜索中...
未找到
OpenDriveGenerator.h
浏览该文件的文档.
1// Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6#pragma once
7
8#include "CoreMinimal.h"
9#include "GameFramework/Actor.h"
10#include "ProceduralMeshComponent.h"
11
13#include <boost/optional.hpp>
14#include "carla/road/Map.h"
16
18
19#include "OpenDriveGenerator.generated.h"
20
21UCLASS()
22class CARLA_API AProceduralMeshActor : public AActor
23{
24 GENERATED_BODY()
25public:
27
28 UPROPERTY(Category = "Procedural Mesh Actor", VisibleDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
29 UProceduralMeshComponent* MeshComponent;
30};
31
32UCLASS()
33class CARLA_API AOpenDriveGenerator : public AActor
34{
35 GENERATED_BODY()
36
37public:
38
39 AOpenDriveGenerator(const FObjectInitializer &ObjectInitializer);
40
41 /// OpenDRIVEϢΪַɿɲѯӳṹ
42 bool LoadOpenDrive(const FString &OpenDrive);
43
44 /// ַʽȡOpenDRIVEϢ
45 const FString &GetOpenDrive() const;
46
47 /// ǷѼOpenDriveЧԡ
48 bool IsOpenDriveValid() const;
49
50 /// OpenDRIVEϢɵ·е
51 void GenerateRoadMesh();
52
53 /// OpenDRIVEϢɸ
54 void GeneratePoles();
55
56 /// ص·ɵ㡣
57 void GenerateSpawnPoints();
58
59 void GenerateAll();
60
61protected:
62
63 virtual void BeginPlay() override;
64
65 /// ȷÿRoutePlannerķø߶
66 UPROPERTY(Category = "Spawners", EditAnywhere)
67 float SpawnersHeight = 300.f;
68
69 UPROPERTY(Category = "Spawners", EditAnywhere)
70 TArray<AVehicleSpawnPoint *> VehicleSpawners;
71
72 UPROPERTY(EditAnywhere)
73 FString OpenDriveData;
74
75 UPROPERTY(EditAnywhere)
76 TArray<AActor *> ActorMeshList;
77
78};
Base class for spawner locations for walkers.