38 lines
1.1 KiB
C
38 lines
1.1 KiB
C
|
// Copyright 2020 Phyronnaz
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include "CoreMinimal.h"
|
||
|
#include "VoxelTools/Tools/VoxelToolBase.h"
|
||
|
#include "VoxelTrimTool.generated.h"
|
||
|
|
||
|
UCLASS()
|
||
|
class VOXEL_API UVoxelTrimTool : public UVoxelToolBase
|
||
|
{
|
||
|
GENERATED_BODY()
|
||
|
|
||
|
public:
|
||
|
UPROPERTY(Category = "Tool Preview Settings", EditAnywhere, BlueprintReadWrite, meta = (HideInPanel))
|
||
|
TObjectPtr<UMaterialInterface> ToolMaterial = nullptr;
|
||
|
|
||
|
public:
|
||
|
UPROPERTY(Category = "Tool Settings", EditAnywhere, BlueprintReadWrite, meta = (UIMin = "0", UIMax = "1"))
|
||
|
float Falloff = 0.5;
|
||
|
|
||
|
UPROPERTY(Category = "Tool Settings", EditAnywhere, BlueprintReadWrite, meta = (UIMin = "0", UIMax = "1"))
|
||
|
float Roughness = 0;
|
||
|
|
||
|
public:
|
||
|
UVoxelTrimTool();
|
||
|
|
||
|
//~ Begin UVoxelToolBase Interface
|
||
|
virtual void GetToolConfig(FVoxelToolBaseConfig& OutConfig) const override;
|
||
|
virtual void Tick() override;
|
||
|
virtual void UpdateRender(UMaterialInstanceDynamic* OverlayMaterialInstance, UMaterialInstanceDynamic* MeshMaterialInstance) override;
|
||
|
virtual FVoxelIntBoxWithValidity DoEdit() override;
|
||
|
//~ End UVoxelToolBase Interface
|
||
|
|
||
|
private:
|
||
|
FVector Position;
|
||
|
FVector Normal;
|
||
|
};
|