// Copyright 2020 Phyronnaz #pragma once #include "CoreMinimal.h" #include "VoxelMinimal.h" #include "VoxelIntBox.h" #include "VoxelGenerator.generated.h" class FVoxelGeneratorInstance; class FVoxelTransformableGeneratorInstance; struct FVoxelGeneratorParameter; /** * A UVoxelGenerator is used to create a FVoxelGeneratorInstance */ UCLASS(BlueprintType, Abstract) class VOXEL_API UVoxelGenerator : public UObject { GENERATED_BODY() public: //~ Begin UVoxelGenerator Interface virtual void ApplyParameters(const TMap& Parameters); virtual void GetParameters(TArray& OutParameters) const; virtual TVoxelSharedRef GetInstance(const TMap& Parameters); virtual TVoxelSharedRef GetInstance(); //~ End UVoxelGenerator Interface protected: TMap ApplyParametersInternal(const TMap& Parameters); }; // Generator that can be moved around UCLASS(Abstract) class VOXEL_API UVoxelTransformableGenerator : public UVoxelGenerator { GENERATED_BODY() public: //~ Begin UVoxelTransformableGenerator Interface virtual TVoxelSharedRef GetTransformableInstance(const TMap& Parameters); virtual TVoxelSharedRef GetTransformableInstance(); //~ End UVoxelTransformableGenerator Interface //~ Begin UVoxelGenerator Interface virtual TVoxelSharedRef GetInstance(const TMap& Parameters) override; virtual TVoxelSharedRef GetInstance() override; //~ End UVoxelGenerator Interface }; UCLASS(Abstract) class VOXEL_API UVoxelTransformableGeneratorWithBounds : public UVoxelTransformableGenerator { GENERATED_BODY() public: //~ Begin UVoxelTransformableGeneratorWithBounds Interface virtual FVoxelIntBox GetBounds() const; //~ End UVoxelTransformableGeneratorWithBounds Interface };