CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
Unreal
CarlaUnreal
Plugins
Carla
Source
Carla
Traffic
SpeedLimitComponent.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 "
SignComponent.h
"
10
11
#include <util/ue-header-guard-begin.h>
12
#include "CoreMinimal.h"
13
#include <util/ue-header-guard-end.h>
14
15
#include "SpeedLimitComponent.generated.h"
16
17
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
18
class
CARLA_API USpeedLimitComponent :
public
USignComponent
19
{
20
GENERATED_BODY()
21
22
public:
23
24
virtual
void
InitializeSign(const carla::road::Map &Map) override;
25
26
void
SetSpeedLimit(
float
Limit);
27
28
private:
29
30
void
GenerateSpeedBox(const FTransform BoxTransform,
float
BoxSize);
31
32
UFUNCTION(BlueprintCallable)
33
void
OnOverlapBeginSpeedLimitBox(UPrimitiveComponent *OverlappedComp,
34
AActor *OtherActor,
35
UPrimitiveComponent *OtherComp,
36
int32 OtherBodyIndex,
37
bool
bFromSweep,
38
const FHitResult &SweepResult);
39
40
UPROPERTY(Category =
"Speed Limit"
, EditAnywhere)
41
float
SpeedLimit = 30;
42
43
};
SignComponent.h
Generated by
1.18.0