2020-12-03 09:48:56 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "UObject/Interface.h"
|
|
|
|
|
|
|
|
|
|
#include "PrimitiveComponentBackedTarget.generated.h"
|
|
|
|
|
|
|
|
|
|
class UPrimitiveComponent;
|
|
|
|
|
class AActor;
|
|
|
|
|
|
2022-04-02 01:04:02 -04:00
|
|
|
struct FHitResult;
|
|
|
|
|
|
2023-06-17 18:13:06 -04:00
|
|
|
UINTERFACE(MinimalAPI)
|
|
|
|
|
class UPrimitiveComponentBackedTarget : public UInterface
|
2020-12-03 09:48:56 -04:00
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
};
|
|
|
|
|
|
2023-06-17 18:13:06 -04:00
|
|
|
class IPrimitiveComponentBackedTarget
|
2020-12-03 09:48:56 -04:00
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
/** @return the Component this is a Source for */
|
|
|
|
|
virtual UPrimitiveComponent* GetOwnerComponent() const = 0;
|
|
|
|
|
|
|
|
|
|
/** @return the Actor that owns this Component */
|
|
|
|
|
virtual AActor* GetOwnerActor() const = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the visibility of the Component associated with this Source (ie to hide during Tool usage)
|
|
|
|
|
* @param bVisible desired visibility
|
|
|
|
|
*/
|
|
|
|
|
virtual void SetOwnerVisibility(bool bVisible) const = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return the transform on this component
|
|
|
|
|
* @todo Do we need to return a list of transforms here?
|
|
|
|
|
*/
|
|
|
|
|
virtual FTransform GetWorldTransform() const = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Compute ray intersection with the MeshDescription this Source is providing
|
|
|
|
|
* @param WorldRay ray in world space
|
|
|
|
|
* @param OutHit hit test data
|
|
|
|
|
* @return true if ray intersected Component
|
|
|
|
|
*/
|
|
|
|
|
virtual bool HitTestComponent(const FRay& WorldRay, FHitResult& OutHit) const = 0;
|
2023-06-17 18:13:06 -04:00
|
|
|
};
|