CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
Unreal
CarlaUnreal
Plugins
Carla
Source
Carla
Util
ActorAttacher.h
Go to the documentation of this file.
1
// Copyright (c) 2026 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
9
#include <util/ue-header-guard-begin.h>
10
#include "Kismet/BlueprintFunctionLibrary.h"
11
#include <util/ue-header-guard-end.h>
12
13
#include <
util/disable-ue4-macros.h
>
14
#include <
carla/rpc/AttachmentType.h
>
15
#include <
util/enable-ue4-macros.h
>
16
17
#include "ActorAttacher.generated.h"
18
19
#define CARLA_ENUM_FROM_RPC(e) static_cast<uint8>(carla::rpc::AttachmentType:: e)
20
21
UENUM(BlueprintType)
22
enum class
EAttachmentType
: uint8
23
{
24
Null
= 0,
// Workarround for UE4.24 issue with enums
25
Rigid
=
CARLA_ENUM_FROM_RPC
(Rigid)
UMETA
(DisplayName =
"Rigid"
),
26
SpringArm
=
CARLA_ENUM_FROM_RPC
(SpringArm)
UMETA
(DisplayName =
"SpringArm"
),
27
SpringArmGhost
=
CARLA_ENUM_FROM_RPC
(SpringArmGhost)
UMETA
(DisplayName =
"SpringArmGhost"
),
28
29
SIZE
UMETA
(Hidden),
30
INVALID
UMETA
(Hidden)
31
};
32
33
static_assert
(
34
static_cast<
uint8
>
(EAttachmentType::SIZE) ==
static_cast<
uint8
>
(
carla::rpc::AttachmentType::SIZE
),
35
"Please keep these two enums in sync."
);
36
37
#undef CARLA_ENUM_FROM_RPC
38
39
UCLASS()
40
class CARLA_API
UActorAttacher
: public
UBlueprintFunctionLibrary
41
{
42
GENERATED_BODY()
43
44
public
:
45
46
UFUNCTION(BlueprintCallable, Category=
"CARLA|Actor Attacher"
)
47
static
void
AttachActors
(
AActor
*Child,
AActor
*Parent,
EAttachmentType
AttachmentType);
48
};
EAttachmentType
EAttachmentType
Definition
ActorAttacher.h:23
EAttachmentType::SpringArm
@ SpringArm
Definition
ActorAttacher.h:26
EAttachmentType::SpringArmGhost
@ SpringArmGhost
Definition
ActorAttacher.h:27
EAttachmentType::Rigid
@ Rigid
Definition
ActorAttacher.h:25
AttachmentType.h
EActorAttributeType::UMETA
@ UMETA
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Actor/ActorAttribute.h:29
EActorAttributeType::Null
@ Null
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Actor/ActorAttribute.h:21
CARLA_ENUM_FROM_RPC
#define CARLA_ENUM_FROM_RPC(e)
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Actor/ActorAttribute.h:15
EVehicleInputPriority::INVALID
@ INVALID
Definition
VehicleInputPriority.h:17
AActor
UActorAttacher
Definition
ActorAttacher.h:41
UActorAttacher::AttachActors
static void AttachActors(AActor *Child, AActor *Parent, EAttachmentType AttachmentType)
Definition
ActorAttacher.cpp:95
UBlueprintFunctionLibrary
disable-ue4-macros.h
enable-ue4-macros.h
carla::rpc::AttachmentType::SIZE
@ SIZE
Definition
AttachmentType.h:21
Generated by
1.18.0