CARLA
 
载入中...
搜索中...
未找到
CarlaActorFactory.h
浏览该文件的文档.
1// Copyright (c) 2017 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
7#pragma once
8
12
13#include "Containers/Array.h"
14#include "GameFramework/Actor.h"
15
16#include "CarlaActorFactory.generated.h"
17
18/// Base class for Carla actor factories.
19UCLASS(Abstract)
20class CARLA_API ACarlaActorFactory : public AActor
21{
22 GENERATED_BODY()
23
24public:
25
26 ACarlaActorFactory(const FObjectInitializer& ObjectInitializer)
27 : Super(ObjectInitializer)
28 {
29 PrimaryActorTick.bCanEverTick = false;
30 }
31
32 /// Retrieve the list of actor definitions that this class is able to spawn.
33 virtual TArray<FActorDefinition> GetDefinitions() {
34 unimplemented();
35 return {};
36 }
37
38 /// Spawn an actor based on @a ActorDescription and @a Transform.
39 ///
40 /// @pre ActorDescription is expected to be derived from one of the
41 /// definitions retrieved with GetDefinitions.
43 const FTransform &SpawnAtTransform,
44 const FActorDescription &ActorDescription) {
45 unimplemented();
46 return {};
47 }
48};
Base class for Carla actor factories.
ACarlaActorFactory(const FObjectInitializer &ObjectInitializer)
virtual TArray< FActorDefinition > GetDefinitions()
Retrieve the list of actor definitions that this class is able to spawn.
virtual FActorSpawnResult SpawnActor(const FTransform &SpawnAtTransform, const FActorDescription &ActorDescription)
Spawn an actor based on ActorDescription and Transform.
A description of a Carla Actor with all its variation.
Result of an actor spawn function.