Files
FLESH/Source/FLESHEditor/Public/FLESHGraph/FLESHExecutor.h
2025-04-23 01:18:06 +08:00

81 lines
2.0 KiB
C++

#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "FLESHGraph/FLESHCompiler.h"
#include "FLESHExecutor.generated.h"
class UBooleanCutTool;
class USkeletalMeshComponent;
/**
* FLESH executor class
* Executes compiled FLESH graph on target actor
*/
UCLASS(BlueprintType)
class FLESHEDITOR_API UFLESHExecutor : public UObject
{
GENERATED_BODY()
public:
// Constructor
UFLESHExecutor();
// Initialize executor with compiler
UFUNCTION(BlueprintCallable, Category = "FLESH")
void Initialize(UFLESHCompiler* InCompiler);
// Execute graph on target actor
UFUNCTION(BlueprintCallable, Category = "FLESH")
bool Execute(AActor* InTargetActor);
// Set boolean cut tool
UFUNCTION(BlueprintCallable, Category = "FLESH")
void SetCutTool(UBooleanCutTool* InCutTool);
// Get boolean cut tool
UFUNCTION(BlueprintCallable, Category = "FLESH")
UBooleanCutTool* GetCutTool() const;
private:
// Compiler reference
UPROPERTY()
TObjectPtr<UFLESHCompiler> Compiler;
// Target actor
UPROPERTY()
TObjectPtr<AActor> TargetActor;
// Target skeletal mesh component
UPROPERTY()
TObjectPtr<USkeletalMeshComponent> TargetSkeletalMesh;
// Boolean cut tool
UPROPERTY()
TObjectPtr<UBooleanCutTool> CutTool;
// Find target skeletal mesh component
bool FindTargetSkeletalMesh();
// Execute node
bool ExecuteNode(const FFLESHNodeData& NodeData);
// Execute cut node
bool ExecuteCutNode(const FFLESHNodeData& NodeData);
// Execute blood effect node
bool ExecuteBloodEffectNode(const FFLESHNodeData& NodeData);
// Execute physics node
bool ExecutePhysicsNode(const FFLESHNodeData& NodeData);
// Execute organ node
bool ExecuteOrganNode(const FFLESHNodeData& NodeData);
// Execute wound node
bool ExecuteWoundNode(const FFLESHNodeData& NodeData);
// Execute bone selection node
bool ExecuteBoneSelectionNode(const FFLESHNodeData& NodeData);
};