2022-11-01 15:11:25 -04:00
|
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "SmartObjectTypes.h"
|
|
|
|
|
|
#include "SmartObjectAnnotation.generated.h"
|
|
|
|
|
|
|
|
|
|
|
|
struct FSmartObjectVisualizationContext;
|
2023-03-02 05:58:30 -05:00
|
|
|
|
class FGameplayDebuggerCategory;
|
|
|
|
|
|
struct FSmartObjectSlotView;
|
2022-11-01 15:11:25 -04:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Base class for Smart Object Slot annotations. Annotation is a specific type of slot definition data that has methods to visualize it.
|
|
|
|
|
|
*/
|
|
|
|
|
|
USTRUCT(meta=(Hidden))
|
|
|
|
|
|
struct SMARTOBJECTSMODULE_API FSmartObjectSlotAnnotation : public FSmartObjectSlotDefinitionData
|
|
|
|
|
|
{
|
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
virtual ~FSmartObjectSlotAnnotation() override {}
|
|
|
|
|
|
|
2023-03-02 05:58:30 -05:00
|
|
|
|
#if WITH_EDITOR
|
2022-11-01 15:11:25 -04:00
|
|
|
|
// @todo: Try to find a way to add visualization without requiring virtual functions.
|
2023-01-18 06:27:31 -05:00
|
|
|
|
|
2022-11-01 15:11:25 -04:00
|
|
|
|
/** Methods to override to draw 3D visualization of the annotation. */
|
|
|
|
|
|
virtual void DrawVisualization(FSmartObjectVisualizationContext& VisContext) const {}
|
2023-01-18 06:27:31 -05:00
|
|
|
|
|
2022-11-01 15:11:25 -04:00
|
|
|
|
/** Methods to override to draw canvas visualization of the annotation. */
|
|
|
|
|
|
virtual void DrawVisualizationHUD(FSmartObjectVisualizationContext& VisContext) const {}
|
2023-03-02 05:58:30 -05:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Called in editor to adjust the transform of the annotation.
|
|
|
|
|
|
* @param SlotTransform World space transform of the slot.
|
|
|
|
|
|
* @param DeltaTranslation World space delta translation to apply.
|
|
|
|
|
|
* @param DeltaRotation World space delta rotation to apply.
|
|
|
|
|
|
**/
|
|
|
|
|
|
virtual void AdjustWorldTransform(const FTransform& SlotTransform, const FVector& DeltaTranslation, const FRotator& DeltaRotation) {}
|
|
|
|
|
|
#endif // WITH_EDITOR
|
2023-01-18 06:27:31 -05:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Returns the world space transform of the annotation.
|
|
|
|
|
|
* @param SlotTransform World space transform of the slot.
|
|
|
|
|
|
* @return world transform of the annotation, or empty if annotation does not have transform.
|
|
|
|
|
|
*/
|
|
|
|
|
|
virtual TOptional<FTransform> GetWorldTransform(const FTransform& SlotTransform) const { return TOptional<FTransform>(); }
|
|
|
|
|
|
|
2023-03-02 05:58:30 -05:00
|
|
|
|
#if WITH_GAMEPLAY_DEBUGGER
|
|
|
|
|
|
virtual void CollectDataForGameplayDebugger(FGameplayDebuggerCategory& Category, const FTransform& SlotTransform, const FVector ViewLocation, const FVector ViewDirection, AActor* DebugActor) const {}
|
|
|
|
|
|
#endif // WITH_GAMEPLAY_DEBUGGER
|
|
|
|
|
|
|
2022-11-01 15:11:25 -04:00
|
|
|
|
};
|