8#include "CoreMinimal.h"
9#include "Engine/EngineTypes.h"
10#include "Components/PrimitiveComponent.h"
11#include "Components/SphereComponent.h"
12#include "Components/BoxComponent.h"
18#include "ROSIntegration/Public/std_msgs/String.h"
20#include "OverlapSensor.generated.h"
38 UFUNCTION(BlueprintCallable)
53 UFUNCTION(BlueprintCallable)
54 void SetOverlapBounds(
const FVector& NewSize);
59 UFUNCTION(BlueprintCallable)
60 void SetVisualizeOverlapArea(
bool Visualize);
65 UFUNCTION(BlueprintCallable)
66 void SetOverlapRelativePosition(
const FVector& Vector);
75 UFUNCTION(BlueprintCallable)
76 void SetOverlapResponseToAllChannels(
const ECollisionResponse Response);
78 UFUNCTION(BlueprintCallable)
79 bool IsVisualizingOverlapArea()
const
86 return StructToString(Parameters);
92 void OnOverlapBegin(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp,
93 int32 OtherBodyIndex,
bool bFromSweep, const FHitResult& SweepResult);
96 void OnOverlapEnd(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp,
97 int32 OtherBodyIndex);
99 UPROPERTY(VisibleAnywhere)
100 UBoxComponent* BoxComponent =
nullptr;
102 UPROPERTY(VisibleAnywhere)
103 USphereComponent* SphereComponent =
nullptr;
105 UPROPERTY(VisibleAnywhere)
106 UBoundsVisualizerComponent* VisualizerComponent =
nullptr;
112 virtual
void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
114 void BuildAndSendMessage(const FString& Prefix, AActor* Actor);
116 FString TryGetID(AActor* Actor);
118 TSharedPtr<ROSMessages::std_msgs::String> ROSMessage;
131 bool IsVisible = false;
virtual FString GetParametersAsString() const override
virtual ESensorTypes GetSensorType() const override
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override
virtual void BeginPlay() override