Files
UnrealEngineUWP/Engine/Plugins/Editor/MeshEditor/Source/PolygonModeling/SplitEdge.h
Mike Fricker 41fb27cfab Mesh Editor: Minor refactor to improve extensibility of mesh commands
- Removed type-specific base classes for mesh editor commands
- We now have a different base class for 'instant' commands vs 'edit' commands instead
- Removed 'F1' shortcut for move mode.  Will be dealing with that soon.

#rb none

[CL 3428090 by Mike Fricker in Dev-Geometry branch]
2017-05-08 10:55:06 -04:00

44 lines
1.3 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MeshEditorCommands.h"
#include "SplitEdge.generated.h"
/** Inserts a vertex along an edge and allows the user to move it around */
UCLASS()
class USplitEdgeCommand : public UMeshEditorEditCommand
{
GENERATED_BODY()
protected:
USplitEdgeCommand()
: SplitEdgeMeshesAndEdgesToSplit(),
SplitEdgeSplitList()
{
UndoText = NSLOCTEXT( "MeshEditor", "UndoSplitEdge", "Split Edge" );
bNeedsHoverLocation = false;
bNeedsDraggingInitiated = true;
}
// Overrides
virtual EEditableMeshElementType GetElementType() const override
{
return EEditableMeshElementType::Edge;
}
virtual void RegisterUICommand( class FBindingContext* BindingContext ) override;
virtual bool TryStartingToDrag( IMeshEditorModeEditingContract& MeshEditorMode, class UViewportInteractor* ViewportInteractor ) override;
virtual void ApplyDuringDrag( IMeshEditorModeEditingContract& MeshEditorMode, class UViewportInteractor* ViewportInteractor ) override;
protected:
/** When splitting an edge and dragging a vertex, this is the list of edges that will be split */
TMap< class UEditableMesh*, TArray< FMeshElement > > SplitEdgeMeshesAndEdgesToSplit;
/** When splitting an edge and dragging a vertex, this is the list of split positions along those edges */
TArray<float> SplitEdgeSplitList;
};