CARLA
ActorAttacher.h
Go to the documentation of this file.
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 "Kismet/BlueprintFunctionLibrary.h"
14 
15 #include "ActorAttacher.generated.h"
16 
17 #define CARLA_ENUM_FROM_RPC(e) static_cast<uint8>(carla::rpc::AttachmentType:: e)
18 
19 UENUM(BlueprintType)
20 enum class EAttachmentType : uint8
21 {
22  Null = 0, // Workarround for UE4.24 issue with enums
23  Rigid = CARLA_ENUM_FROM_RPC(Rigid) UMETA(DisplayName = "Rigid"),
24  SpringArm = CARLA_ENUM_FROM_RPC(SpringArm) UMETA(DisplayName = "SpringArm"),
25 
26  SIZE UMETA(Hidden),
27  INVALID UMETA(Hidden)
28 };
29 
30 static_assert(
31  static_cast<uint8>(EAttachmentType::SIZE) == static_cast<uint8>(carla::rpc::AttachmentType::SIZE),
32  "Please keep these two enums in sync.");
33 
34 #undef CARLA_ENUM_FROM_RPC
35 
36 UCLASS()
37 class CARLA_API UActorAttacher : public UBlueprintFunctionLibrary
38 {
39  GENERATED_BODY()
40 
41 public:
42 
43  UFUNCTION(BlueprintCallable, Category="CARLA|Actor Attacher")
44  static void AttachActors(AActor *Child, AActor *Parent, EAttachmentType AttachmentType);
45 };
static const FString SIZE
EAttachmentType
Definition: ActorAttacher.h:20
#define CARLA_ENUM_FROM_RPC(e)
Definition: ActorAttacher.h:17