CARLA
 
载入中...
搜索中...
未找到
ActorAttacher.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 "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
19UENUM(BlueprintType)
20enum 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
31static_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
37UCLASS()
39{
40 GENERATED_BODY()
41
42public:
43
44 UFUNCTION(BlueprintCallable, Category="CARLA|Actor Attacher")
45 static void AttachActors(AActor *Child, AActor *Parent, EAttachmentType AttachmentType, const FString& SocketName = "");
46};
EAttachmentType
#define CARLA_ENUM_FROM_RPC(e)