You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UETOOL-3823 #preflight 6156558e47517300016750ee #rnx #ROBOMERGE-AUTHOR: michael.balzer #ROBOMERGE-SOURCE: CL 17691795 in //UE5/Release-5.0/... via CL 17691808 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v875-17642767) #ROBOMERGE[STARSHIP]: UE5-Main [CL 17691812 by michael balzer in ue5-release-engine-test branch]
86 lines
2.5 KiB
C++
86 lines
2.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
#include "BaseBehaviors/BehaviorTargetInterfaces.h"
|
|
#include "BoxTypes.h"
|
|
#include "InteractiveToolActivity.h"
|
|
#include "ToolActivities/PolyEditActivityUtil.h"
|
|
#include "ToolContextInterfaces.h" // FViewCameraState
|
|
|
|
#include "PolyEditPlanarProjectionUVActivity.generated.h"
|
|
|
|
class UPolyEditActivityContext;
|
|
class UPolyEditPreviewMesh;
|
|
class UCollectSurfacePathMechanic;
|
|
|
|
UCLASS()
|
|
class MESHMODELINGTOOLS_API UPolyEditSetUVProperties : public UInteractiveToolPropertySet
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, Category = PlanarProjectUV)
|
|
bool bShowMaterial = false;
|
|
};
|
|
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class MESHMODELINGTOOLS_API UPolyEditPlanarProjectionUVActivity : public UInteractiveToolActivity,
|
|
public IClickBehaviorTarget, public IHoverBehaviorTarget
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
// IInteractiveToolActivity
|
|
virtual void Setup(UInteractiveTool* ParentTool) override;
|
|
virtual void Shutdown(EToolShutdownType ShutdownType) override;
|
|
virtual bool CanStart() const override;
|
|
virtual EToolActivityStartResult Start() override;
|
|
virtual bool IsRunning() const override { return bIsRunning; }
|
|
virtual bool CanAccept() const override;
|
|
virtual EToolActivityEndResult End(EToolShutdownType) override;
|
|
virtual void Render(IToolsContextRenderAPI* RenderAPI) override;
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
// IClickBehaviorTarget API
|
|
virtual FInputRayHit IsHitByClick(const FInputDeviceRay& ClickPos) override;
|
|
virtual void OnClicked(const FInputDeviceRay& ClickPos) override;
|
|
|
|
// IHoverBehaviorTarget implementation
|
|
virtual FInputRayHit BeginHoverSequenceHitTest(const FInputDeviceRay& PressPos) override;
|
|
virtual void OnBeginHover(const FInputDeviceRay& DevicePos) override {}
|
|
virtual bool OnUpdateHover(const FInputDeviceRay& DevicePos) override;
|
|
virtual void OnEndHover() override {}
|
|
|
|
protected:
|
|
void Clear();
|
|
void BeginSetUVs();
|
|
void UpdateSetUVS();
|
|
void ApplySetUVs();
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UPolyEditSetUVProperties> SetUVProperties;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UPolyEditPreviewMesh> EditPreview;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UCollectSurfacePathMechanic> SurfacePathMechanic = nullptr;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UPolyEditActivityContext> ActivityContext;
|
|
|
|
bool bIsRunning = false;
|
|
|
|
bool bPreviewUpdatePending = false;
|
|
UE::Geometry::PolyEditActivityUtil::EPreviewMaterialType CurrentPreviewMaterial;
|
|
UE::Geometry::FAxisAlignedBox3d ActiveSelectionBounds;
|
|
FViewCameraState CameraState;
|
|
};
|