You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
ModelingTools: Add UMultiSelectionMeshEditingTool to hold common interface requirements and functions that pertain to modeling mode MultiSelectionTools. #rb semion.piskarev #rnx #jira none #preflight 619c66d5c3287aab27e12c73 #ROBOMERGE-AUTHOR: lonnie.li #ROBOMERGE-SOURCE: CL 18269697 in //UE5/Release-5.0/... via CL 18269713 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469) [CL 18269717 by lonnie li in ue5-release-engine-test branch]
57 lines
1.2 KiB
C++
57 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "InteractiveTool.h"
|
|
#include "ComponentSourceInterfaces.h"
|
|
#include "ToolTargets/ToolTarget.h"
|
|
#include "InteractiveToolQueryInterfaces.h"
|
|
|
|
#include "MultiSelectionTool.generated.h"
|
|
|
|
UCLASS(Transient)
|
|
class INTERACTIVETOOLSFRAMEWORK_API UMultiSelectionTool : public UInteractiveTool, public IInteractiveToolCameraFocusAPI
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
void SetTargets(TArray<TObjectPtr<UToolTarget>> TargetsIn)
|
|
{
|
|
Targets = MoveTemp(TargetsIn);
|
|
}
|
|
|
|
/**
|
|
* @return true if all ComponentTargets of this tool are still valid
|
|
*/
|
|
virtual bool AreAllTargetsValid() const
|
|
{
|
|
for (const TObjectPtr<UToolTarget>& Target : Targets)
|
|
{
|
|
if (Target->IsValid() == false)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
public:
|
|
virtual bool CanAccept() const override
|
|
{
|
|
return AreAllTargetsValid();
|
|
}
|
|
|
|
protected:
|
|
UPROPERTY()
|
|
TArray<TObjectPtr<UToolTarget>> Targets{};
|
|
|
|
public:
|
|
// IInteractiveToolCameraFocusAPI implementation
|
|
virtual bool SupportsWorldSpaceFocusBox() override;
|
|
virtual FBox GetWorldSpaceFocusBox() override;
|
|
virtual bool SupportsWorldSpaceFocusPoint() override;
|
|
virtual bool GetWorldSpaceFocusPoint(const FRay& WorldRay, FVector& PointOut) override;
|
|
};
|
|
|
|
|