Files
UnrealEngine/Engine/Source/Editor/PhysicsAssetEditor/Private/PhysicsAssetGraph/PhysicsAssetConnectionDrawingPolicy.h
2025-05-18 13:04:45 +08:00

24 lines
786 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ConnectionDrawingPolicy.h"
class FPhysicsAssetConnectionDrawingPolicy : public FConnectionDrawingPolicy
{
public:
FPhysicsAssetConnectionDrawingPolicy(int32 InBackLayerID, int32 InFrontLayerID, float InZoomFactor, const FSlateRect& InClippingRect, FSlateWindowElementList& InDrawElements)
: FConnectionDrawingPolicy(InBackLayerID, InFrontLayerID, InZoomFactor, InClippingRect, InDrawElements)
{
// We don't draw arrows here
ArrowImage = nullptr;
ArrowRadius = FVector2f::ZeroVector;
}
virtual FVector2f ComputeSplineTangent(const FVector2f& Start, const FVector2f& End) const override
{
const int32 Tension = FMath::Abs<int32>(Start.X - End.X);
return Tension * FVector2f(1.0f, 0.0f);
}
};