CARLA
 
载入中...
搜索中...
未找到
SpeedLimitComponent.h
浏览该文件的文档.
1// Copyright (c) 2021 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 "CoreMinimal.h"
10#include "SignComponent.h"
11#include "SpeedLimitComponent.generated.h"
12
13UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
14class CARLA_API USpeedLimitComponent : public USignComponent
15{
16 GENERATED_BODY()
17
18public:
19
20 virtual void InitializeSign(const carla::road::Map &Map) override;
21
22 void SetSpeedLimit(float Limit);
23
24private:
25
26 void GenerateSpeedBox(const FTransform BoxTransform, float BoxSize);
27
28 UFUNCTION(BlueprintCallable)
29 void OnOverlapBeginSpeedLimitBox(UPrimitiveComponent *OverlappedComp,
30 AActor *OtherActor,
31 UPrimitiveComponent *OtherComp,
32 int32 OtherBodyIndex,
33 bool bFromSweep,
34 const FHitResult &SweepResult);
35
36 UPROPERTY(Category = "Speed Limit", EditAnywhere)
37 float SpeedLimit = 30;
38
39};
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133