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  SpringArmGhost = CARLA_ENUM_FROM_RPC(SpringArmGhost) UMETA(DisplayName = "SpringArmGhost"),
26 
27  SIZE UMETA(Hidden),
28  INVALID UMETA(Hidden)
29 };
30 
31 static_assert(
32  static_cast<uint8>(EAttachmentType::SIZE) == static_cast<uint8>(carla::rpc::AttachmentType::SIZE),
33  "Please keep these two enums in sync.");
34 
35 #undef CARLA_ENUM_FROM_RPC
36 
37 UCLASS()
38 class CARLA_API UActorAttacher : public UBlueprintFunctionLibrary
39 {
40  GENERATED_BODY()
41 
42 public:
43 
44  UFUNCTION(BlueprintCallable, Category="CARLA|Actor Attacher")
45  static void AttachActors(AActor *Child, AActor *Parent, EAttachmentType AttachmentType);
46 };
static const FString SIZE
EAttachmentType
Definition: ActorAttacher.h:20
#define CARLA_ENUM_FROM_RPC(e)
Definition: ActorAttacher.h:17