You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb none Should be just copyright updates [CL 4680440 by Marcus Wassmer in Dev-Rendering branch]
37 lines
1.5 KiB
C++
37 lines
1.5 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "ConnectionDrawingPolicy.h"
|
|
|
|
class FSlateWindowElementList;
|
|
class UEdGraph;
|
|
class UMaterialGraph;
|
|
class UMaterialGraphSchema;
|
|
|
|
/////////////////////////////////////////////////////
|
|
// FMaterialGraphConnectionDrawingPolicy
|
|
|
|
// This class draws the connections for an UEdGraph using a MaterialGraph schema
|
|
class FMaterialGraphConnectionDrawingPolicy : public FConnectionDrawingPolicy
|
|
{
|
|
protected:
|
|
UMaterialGraph* MaterialGraph;
|
|
const UMaterialGraphSchema* MaterialGraphSchema;
|
|
|
|
// Each time a knot is encountered, input geometry is compared to output geometry to see if the pins on the knot need to be reversed
|
|
TMap<class UMaterialGraphNode_Knot*, bool> KnotToReversedDirectionMap;
|
|
|
|
bool ShouldChangeTangentForKnot(class UMaterialGraphNode_Knot* Knot);
|
|
bool GetAverageConnectedPosition(class UMaterialGraphNode_Knot* Knot, EEdGraphPinDirection Direction, FVector2D& OutPos) const;
|
|
bool FindPinCenter(UEdGraphPin* Pin, FVector2D& OutCenter) const;
|
|
|
|
public:
|
|
FMaterialGraphConnectionDrawingPolicy(int32 InBackLayerID, int32 InFrontLayerID, float ZoomFactor, const FSlateRect& InClippingRect, FSlateWindowElementList& InDrawElements, UEdGraph* InGraphObj);
|
|
|
|
// FConnectionDrawingPolicy interface
|
|
virtual void DetermineWiringStyle(UEdGraphPin* OutputPin, UEdGraphPin* InputPin, /*inout*/ FConnectionParams& Params) override;
|
|
// End of FConnectionDrawingPolicy interface
|
|
};
|