diff --git a/Binaries/ThirdParty/FastNoise2/Linux/libFastNoise.so b/Binaries/ThirdParty/FastNoise2/Linux/libFastNoise.so index 09b9de4..19a8686 100644 Binary files a/Binaries/ThirdParty/FastNoise2/Linux/libFastNoise.so and b/Binaries/ThirdParty/FastNoise2/Linux/libFastNoise.so differ diff --git a/Binaries/ThirdParty/FastNoise2/Linux/libFastNoiseD.so b/Binaries/ThirdParty/FastNoise2/Linux/libFastNoiseD.so index a38128a..cd6de89 100644 Binary files a/Binaries/ThirdParty/FastNoise2/Linux/libFastNoiseD.so and b/Binaries/ThirdParty/FastNoise2/Linux/libFastNoiseD.so differ diff --git a/Binaries/ThirdParty/FastNoise2/Mac/libFastNoise.dylib b/Binaries/ThirdParty/FastNoise2/Mac/libFastNoise.dylib index 1095b47..0b553cb 100644 Binary files a/Binaries/ThirdParty/FastNoise2/Mac/libFastNoise.dylib and b/Binaries/ThirdParty/FastNoise2/Mac/libFastNoise.dylib differ diff --git a/Binaries/ThirdParty/FastNoise2/Mac/libFastNoiseD.dylib b/Binaries/ThirdParty/FastNoise2/Mac/libFastNoiseD.dylib index 66ec7f2..2c79be2 100644 Binary files a/Binaries/ThirdParty/FastNoise2/Mac/libFastNoiseD.dylib and b/Binaries/ThirdParty/FastNoise2/Mac/libFastNoiseD.dylib differ diff --git a/Binaries/ThirdParty/FastNoise2/Win64/FastNoise.dll b/Binaries/ThirdParty/FastNoise2/Win64/FastNoise.dll index 857f982..9272c52 100644 Binary files a/Binaries/ThirdParty/FastNoise2/Win64/FastNoise.dll and b/Binaries/ThirdParty/FastNoise2/Win64/FastNoise.dll differ diff --git a/Binaries/ThirdParty/FastNoise2/Win64/FastNoiseD.dll b/Binaries/ThirdParty/FastNoise2/Win64/FastNoiseD.dll index 7d0926a..2bac925 100644 Binary files a/Binaries/ThirdParty/FastNoise2/Win64/FastNoiseD.dll and b/Binaries/ThirdParty/FastNoise2/Win64/FastNoiseD.dll differ diff --git a/Binaries/ThirdParty/FastNoise2/Win64/FastNoiseD.pdb b/Binaries/ThirdParty/FastNoise2/Win64/FastNoiseD.pdb index 5b17e10..4f42427 100644 Binary files a/Binaries/ThirdParty/FastNoise2/Win64/FastNoiseD.pdb and b/Binaries/ThirdParty/FastNoise2/Win64/FastNoiseD.pdb differ diff --git a/Source/ThirdParty/FastNoise2/Win64/Debug/FastNoiseD.lib b/Source/ThirdParty/FastNoise2/Win64/Debug/FastNoiseD.lib index 24125d2..7356af2 100644 Binary files a/Source/ThirdParty/FastNoise2/Win64/Debug/FastNoiseD.lib and b/Source/ThirdParty/FastNoise2/Win64/Debug/FastNoiseD.lib differ diff --git a/Source/ThirdParty/FastNoise2/Win64/Release/FastNoise.lib b/Source/ThirdParty/FastNoise2/Win64/Release/FastNoise.lib index 3b043ba..982d81a 100644 Binary files a/Source/ThirdParty/FastNoise2/Win64/Release/FastNoise.lib and b/Source/ThirdParty/FastNoise2/Win64/Release/FastNoise.lib differ diff --git a/Source/ThirdParty/FastNoise2/include/FastNoise/Generators/Simplex.h b/Source/ThirdParty/FastNoise2/include/FastNoise/Generators/Simplex.h index f9a3991..51310f8 100644 --- a/Source/ThirdParty/FastNoise2/include/FastNoise/Generators/Simplex.h +++ b/Source/ThirdParty/FastNoise2/include/FastNoise/Generators/Simplex.h @@ -21,7 +21,7 @@ namespace FastNoise groups.push_back( "Coherent Noise" ); description = - "Smooth gradient noise from N dimensional simplex grid\n" + "Smooth gradient noise from an N dimensional simplex grid\n" "Developed by Ken Perlin in 2001"; } }; @@ -45,8 +45,32 @@ namespace FastNoise groups.push_back( "Coherent Noise" ); description = - "Smooth gradient noise from N dimensional simplex honeycomb grid\n" - "Developed by K.jpg in 2014"; + "Smooth gradient noise from an N dimensional simplex grid, alternate implementation\n" + "Developed by K.jpg in 2019"; + } + }; +#endif + + class OpenSimplex2S : public virtual Generator + { + public: + FASTSIMD_LEVEL_SUPPORT(FastNoise::SUPPORTED_SIMD_LEVELS); + const Metadata& GetMetadata() const override; + }; + +#ifdef FASTNOISE_METADATA + template<> + struct MetadataT : MetadataT + { + SmartNode<> CreateNode(FastSIMD::eLevel) const override; + + MetadataT() + { + groups.push_back("Coherent Noise"); + + description = + "Smoother gradient noise from an N dimensional simplex grid\n" + "Developed by K.jpg in 2017"; } }; #endif diff --git a/Source/ThirdParty/FastNoise2/include/FastNoise/SmartNode.h b/Source/ThirdParty/FastNoise2/include/FastNoise/SmartNode.h index 0915672..728e179 100644 --- a/Source/ThirdParty/FastNoise2/include/FastNoise/SmartNode.h +++ b/Source/ThirdParty/FastNoise2/include/FastNoise/SmartNode.h @@ -233,10 +233,13 @@ namespace FastNoise friend class SmartNode; explicit SmartNode( T* ptr ) : - mReferenceId( SmartNodeManager::GetReference( ptr ) ), + mReferenceId( ptr ? SmartNodeManager::GetReference( ptr ) : SmartNodeManager::kInvalidReferenceId ), mPtr( ptr ) { - SmartNodeManager::IncReference( mReferenceId ); + if( mReferenceId != SmartNodeManager::kInvalidReferenceId ) + { + SmartNodeManager::IncReference( mReferenceId ); + } } void Release() diff --git a/Source/UnrealFastNoise2/Private/FastNoise2/FastNoise2BlueprintLibrary.cpp b/Source/UnrealFastNoise2/Private/FastNoise2/FastNoise2BlueprintLibrary.cpp index a0f212c..5a93990 100644 --- a/Source/UnrealFastNoise2/Private/FastNoise2/FastNoise2BlueprintLibrary.cpp +++ b/Source/UnrealFastNoise2/Private/FastNoise2/FastNoise2BlueprintLibrary.cpp @@ -70,6 +70,11 @@ UFastNoise2OpenSimplex2Generator* UFastNoise2BlueprintLibrary::MakeOpenSimplex2G return NewObject(); } +UFastNoise2OpenSimplex2SGenerator* UFastNoise2BlueprintLibrary::MakeOpenSimplex2SGenerator() +{ + return NewObject(); +} + UFastNoise2CellularValueGenerator* UFastNoise2BlueprintLibrary::MakeCellularValueGenerator(UFastNoise2GeneratorBase* JitterModifierSource, float JitterModifierValue, EFastNoise2DistanceFunction DistanceFunction, int32 ValueIndex) { UFastNoise2CellularValueGenerator* Gen = NewObject(); diff --git a/Source/UnrealFastNoise2/Private/FastNoise2/FastNoise2Generators.cpp b/Source/UnrealFastNoise2/Private/FastNoise2/FastNoise2Generators.cpp index cae4a33..fe1548f 100644 --- a/Source/UnrealFastNoise2/Private/FastNoise2/FastNoise2Generators.cpp +++ b/Source/UnrealFastNoise2/Private/FastNoise2/FastNoise2Generators.cpp @@ -158,7 +158,7 @@ void UFastNoise2EncodedNodeTreeGenerator::PostInitProperties() } } -void UFastNoise2EncodedNodeTreeGenerator::SetEncodedNodeTree(FString InValue) +void UFastNoise2EncodedNodeTreeGenerator::SetEncodedNodeTree(const FString& InValue) { EncodedNodeTree = InValue; ResetGenerator(); @@ -227,7 +227,7 @@ FastNoise::SmartNode UFastNoise2SineWaveGenerator::InitGen ////////////////////////////////////////////////////////////////////////// -void UFastNoise2PositionOutputGenerator::SetData(FVector4 InMultipliers, FVector4 InOffsets) +void UFastNoise2PositionOutputGenerator::SetData(const FVector4& InMultipliers, const FVector4& InOffsets) { check(PositionOutputGeneratorInst.get()); Offsets = InOffsets; @@ -237,12 +237,12 @@ void UFastNoise2PositionOutputGenerator::SetData(FVector4 InMultipliers, FVector PositionOutputGeneratorInst->Set(InMultipliers.W, InOffsets.W); } -void UFastNoise2PositionOutputGenerator::SetMultipliers(FVector4 InMultipliers) +void UFastNoise2PositionOutputGenerator::SetMultipliers(const FVector4& InMultipliers) { SetData(InMultipliers, Offsets); } -void UFastNoise2PositionOutputGenerator::SetOffsets(FVector4 InOffsets) +void UFastNoise2PositionOutputGenerator::SetOffsets(const FVector4& InOffsets) { SetData(Multipliers, InOffsets); } @@ -272,7 +272,7 @@ void UFastNoise2DistanceToPointGenerator::SetDistanceFunction(EFastNoise2Distanc DistanceToPointGeneratorInst->SetDistanceFunction(FFastNoise2Helpers::ConvertUnrealToFastNoiseDistanceFunction(InDistanceFunction)); } -void UFastNoise2DistanceToPointGenerator::SetScale(FVector4 InScale) +void UFastNoise2DistanceToPointGenerator::SetScale(const FVector4& InScale) { check(DistanceToPointGeneratorInst.get()); Scale = InScale; @@ -324,6 +324,14 @@ FastNoise::SmartNode UFastNoise2OpenSimplex2Generator::Ini ////////////////////////////////////////////////////////////////////////// +FastNoise::SmartNode UFastNoise2OpenSimplex2SGenerator::InitGenerator() +{ + OpenSimplex2SGeneratorInst = FastNoise::New(); + return OpenSimplex2SGeneratorInst; +} + +////////////////////////////////////////////////////////////////////////// + void UFastNoise2CellularGeneratorBase::SetJitterModifierSource(UFastNoise2GeneratorBase* InSource) { if (InSource != nullptr) @@ -1023,7 +1031,7 @@ void UFastNoise2DomainOffsetGenerator::SetOffsetSources(UFastNoise2GeneratorBase } } -void UFastNoise2DomainOffsetGenerator::SetOffsetValues(FVector4 InValue) +void UFastNoise2DomainOffsetGenerator::SetOffsetValues(const FVector4& InValue) { check(DomainOffsetGeneratorInst.get()); Offsets = InValue; @@ -1051,7 +1059,7 @@ void UFastNoise2DomainRotateGenerator::SetSource(UFastNoise2GeneratorBase* InSou } } -void UFastNoise2DomainRotateGenerator::SetRotation(FRotator InValue) +void UFastNoise2DomainRotateGenerator::SetRotation(const FRotator& InValue) { check(DomainRotateGeneratorInst.get()); Rotation = InValue; @@ -1218,7 +1226,7 @@ void UFastNoise2DomainAxisScaleGenerator::SetSource(UFastNoise2GeneratorBase* In } } -void UFastNoise2DomainAxisScaleGenerator::SetScale(FVector4 InValue) +void UFastNoise2DomainAxisScaleGenerator::SetScale(const FVector4& InValue) { check(DomainAxisScaleGeneratorInst.get()); Scale = InValue; diff --git a/Source/UnrealFastNoise2/Public/FastNoise2/FastNoise2BlueprintLibrary.h b/Source/UnrealFastNoise2/Public/FastNoise2/FastNoise2BlueprintLibrary.h index 7088ee3..9de0561 100644 --- a/Source/UnrealFastNoise2/Public/FastNoise2/FastNoise2BlueprintLibrary.h +++ b/Source/UnrealFastNoise2/Public/FastNoise2/FastNoise2BlueprintLibrary.h @@ -12,46 +12,49 @@ class UNREALFASTNOISE2_API UFastNoise2BlueprintLibrary : public UBlueprintFuncti GENERATED_BODY() public: - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Basic Generators") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Basic Generators") static UFastNoise2EncodedNodeTreeGenerator* MakeEncodedNodeTreeGenerator(FString EncodedNodeTree); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Basic Generators") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Basic Generators") static UFastNoise2ConstantGenerator* MakeConstantGenerator(float ConstantValue); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Basic Generators") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Basic Generators") static UFastNoise2WhiteGenerator* MakeWhiteGenerator(); - - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Basic Generators") + + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Basic Generators") static UFastNoise2CheckerboardGenerator* MakeCheckerboardGenerator(float Size); - - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Basic Generators") + + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Basic Generators") static UFastNoise2SineWaveGenerator* MakeSineWaveGenerator(float Scale); - - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Basic Generators") + + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Basic Generators") static UFastNoise2PositionOutputGenerator* MakePositionOutputGenerator(FVector4 Multiplier, FVector4 Offsets); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Basic Generators") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Basic Generators") static UFastNoise2DistanceToPointGenerator* MakeDistanceToPointGenerator(UFastNoise2GeneratorBase* Source, EFastNoise2DistanceFunction DistanceFunction, FVector4 Scale); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Coherent Noise") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Coherent Noise") static UFastNoise2ValueGenerator* MakeValueGenerator(); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Coherent Noise") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Coherent Noise") static UFastNoise2PerlinGenerator* MakePerlinGenerator(); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Coherent Noise") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Coherent Noise") static UFastNoise2SimplexGenerator* MakeSimplexGenerator(); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Coherent Noise") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Coherent Noise") static UFastNoise2OpenSimplex2Generator* MakeOpenSimplex2Generator(); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Coherent Noise") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Coherent Noise") + static UFastNoise2OpenSimplex2SGenerator* MakeOpenSimplex2SGenerator(); + + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Coherent Noise") static UFastNoise2CellularValueGenerator* MakeCellularValueGenerator( UFastNoise2GeneratorBase* JitterModifierSource , float JitterModifierValue = 1.0f , EFastNoise2DistanceFunction DistanceFunction = EFastNoise2DistanceFunction::Euclidean, int32 ValueIndex = 0); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Coherent Noise") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Coherent Noise") static UFastNoise2CellularDistanceGenerator* MakeCellularDistanceGenerator( UFastNoise2GeneratorBase* JitterModifierSource , float JitterModifierValue = 1.0f @@ -60,7 +63,7 @@ class UNREALFASTNOISE2_API UFastNoise2BlueprintLibrary : public UBlueprintFuncti , int32 DistanceIndex1 = 1 , EFastNoise2CellularDistanceReturnType ReturnType = EFastNoise2CellularDistanceReturnType::Index0); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Coherent Noise") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Coherent Noise") static UFastNoise2CellularLookupGenerator* MakeCellularLookupGenerator( UFastNoise2GeneratorBase* JitterModifierSource , float JitterModifierValue = 1.0f @@ -68,7 +71,7 @@ class UNREALFASTNOISE2_API UFastNoise2BlueprintLibrary : public UBlueprintFuncti , UFastNoise2GeneratorBase* LookupSource = nullptr , float LookupFrequency = 0.1f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Fractal") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Fractal") static UFastNoise2FractalFBmGenerator* MakeFractalFBmGenerator( UFastNoise2GeneratorBase* Source, UFastNoise2GeneratorBase* GainSource = nullptr, @@ -79,7 +82,7 @@ class UNREALFASTNOISE2_API UFastNoise2BlueprintLibrary : public UBlueprintFuncti int32 Octaves = 3 ); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Fractal") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Fractal") static UFastNoise2FractalRidgedGenerator* MakeFractalRidgedGenerator( UFastNoise2GeneratorBase* Source, UFastNoise2GeneratorBase* GainSource = nullptr, @@ -89,7 +92,7 @@ class UNREALFASTNOISE2_API UFastNoise2BlueprintLibrary : public UBlueprintFuncti float Lacunarity = 2.0f, int32 Octaves = 3); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Fractal") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Fractal") static UFastNoise2FractalPingPongGenerator* MakeFractalPingPongGenerator( UFastNoise2GeneratorBase* Source, UFastNoise2GeneratorBase* PingPongStrengthSource = nullptr, @@ -101,14 +104,14 @@ class UNREALFASTNOISE2_API UFastNoise2BlueprintLibrary : public UBlueprintFuncti float Lacunarity = 2.0f, int32 Octaves = 3); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Domain Warp") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Domain Warp") static UFastNoise2DomainWarpGradientGenerator* MakeDomainWarpGradientGenerator( UFastNoise2GeneratorBase* Source, UFastNoise2GeneratorBase* WarpAmplitudeSource = nullptr, float WarpAmplitude = 1.0f, float WarpFrequency = 0.5f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Fractal | Domain Warp") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Fractal|Domain Warp") static UFastNoise2DomainWarpFractalProgressiveGenerator* MakeDomainWarpFractalProgressiveGenerator( UFastNoise2DomainWarpGeneratorBase* DomainWarpSource, UFastNoise2GeneratorBase* GainSource = nullptr, @@ -118,7 +121,7 @@ class UNREALFASTNOISE2_API UFastNoise2BlueprintLibrary : public UBlueprintFuncti float Lacunarity = 2.0f, int32 Octaves = 3); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Fractal | Domain Warp") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Fractal|Domain Warp") static UFastNoise2DomainWarpFractalIndependantGenerator* MakeDomainWarpFractalIndependantGenerator( UFastNoise2DomainWarpGeneratorBase* DomainWarpSource, UFastNoise2GeneratorBase* GainSource = nullptr, @@ -128,126 +131,126 @@ class UNREALFASTNOISE2_API UFastNoise2BlueprintLibrary : public UBlueprintFuncti float Lacunarity = 2.0f, int32 Octaves = 3); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2AddGenerator* AddValue(UFastNoise2GeneratorBase* LHSSource = nullptr, float RHS = 0.0f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2AddGenerator* AddSources(UFastNoise2GeneratorBase* LHSSource = nullptr, UFastNoise2GeneratorBase* RHSSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2SubtractGenerator* SubtractValue(UFastNoise2GeneratorBase* LHSSource = nullptr, float RHS = 0.0f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2SubtractGenerator* SubtractSource(float LHS = 0.0f, UFastNoise2GeneratorBase* RHSSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2SubtractGenerator* SubtractSources(UFastNoise2GeneratorBase* LHSSource = nullptr, UFastNoise2GeneratorBase* RHSSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MultiplyGenerator* MultiplyValue(UFastNoise2GeneratorBase* LHSSource = nullptr, float RHS = 0.0f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MultiplyGenerator* MultiplySources(UFastNoise2GeneratorBase* LHSSource = nullptr, UFastNoise2GeneratorBase* RHSSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2DivideGenerator* DivideValue(UFastNoise2GeneratorBase* LHSSource = nullptr, float RHS = 0.0f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2DivideGenerator* DivideSource(float LHS = 0.0f, UFastNoise2GeneratorBase* RHSSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2DivideGenerator* DivideSources(UFastNoise2GeneratorBase* LHSSource = nullptr, UFastNoise2GeneratorBase* RHSSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MinGenerator* MinValue(UFastNoise2GeneratorBase* LHSSource = nullptr, float RHS = 0.0f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MinGenerator* MinSources(UFastNoise2GeneratorBase* LHSSource = nullptr, UFastNoise2GeneratorBase* RHSSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MaxGenerator* MaxValue(UFastNoise2GeneratorBase* LHSSource = nullptr, float RHS = 0.0f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MaxGenerator* MaxSources(UFastNoise2GeneratorBase* LHSSource = nullptr, UFastNoise2GeneratorBase* RHSSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MinSmoothGenerator* MinValueSmoothValue(UFastNoise2GeneratorBase* LHSSource = nullptr, float RHS = 0.0f, float Smoothness = 0.1f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MinSmoothGenerator* MinSourcesSmoothValue(UFastNoise2GeneratorBase* LHSSource = nullptr, UFastNoise2GeneratorBase* RHSSource = nullptr, float Smoothness = 0.1f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MinSmoothGenerator* MinValueSmoothSource(UFastNoise2GeneratorBase* LHSSource = nullptr, float RHS = 0.0f, UFastNoise2GeneratorBase* SmoothnessSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MinSmoothGenerator* MinSourcesSmoothSource(UFastNoise2GeneratorBase* LHSSource = nullptr, UFastNoise2GeneratorBase* RHSSource = nullptr, UFastNoise2GeneratorBase* SmoothnessSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MaxSmoothGenerator* MaxValueSmoothValue(UFastNoise2GeneratorBase* LHSSource = nullptr, float RHS = 0.0f, float Smoothness = 0.1f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MaxSmoothGenerator* MaxSourcesSmoothValue(UFastNoise2GeneratorBase* LHSSource = nullptr, UFastNoise2GeneratorBase* RHSSource = nullptr, float Smoothness = 0.1f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MaxSmoothGenerator* MaxValueSmoothSource(UFastNoise2GeneratorBase* LHSSource = nullptr, float RHS = 0.0f, UFastNoise2GeneratorBase* SmoothnessSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2MaxSmoothGenerator* MaxSourcesSmoothSource(UFastNoise2GeneratorBase* LHSSource = nullptr, UFastNoise2GeneratorBase* RHSSource = nullptr, UFastNoise2GeneratorBase* SmoothnessSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2PowFloatGenerator* ExponentValueBaseSource(UFastNoise2GeneratorBase* BaseSource = nullptr, float Exponent = 2.0f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2PowFloatGenerator* ExponentSourceBaseValue(float Base = 2.0f, UFastNoise2GeneratorBase* ExponentSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2PowFloatGenerator* ExponentSourceBaseSource(UFastNoise2GeneratorBase* BaseSource = nullptr, UFastNoise2GeneratorBase* ExponentSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2PowIntGenerator* ExponentInt(UFastNoise2GeneratorBase* BaseSource = nullptr, int32 Exponent = 2); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2FadeGenerator* FadeByValue(UFastNoise2GeneratorBase* SourceA = nullptr, UFastNoise2GeneratorBase* SourceB = nullptr, float Fade = 0.5f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Blends") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Blends") static UFastNoise2FadeGenerator* FadeBySource(UFastNoise2GeneratorBase* SourceA = nullptr, UFastNoise2GeneratorBase* SourceB = nullptr, UFastNoise2GeneratorBase* FadeSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2DomainScaleGenerator* DomainScale(UFastNoise2GeneratorBase* Source = nullptr, float Scale = 1.0f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2DomainOffsetGenerator* DomainOffsetByValues(UFastNoise2GeneratorBase* Source, FVector4 Offsets); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2DomainOffsetGenerator* DomainOffsetBySources(UFastNoise2GeneratorBase* Source, UFastNoise2GeneratorBase* OffsetSourceX, UFastNoise2GeneratorBase* OffsetSourceY, UFastNoise2GeneratorBase* OffsetSourceZ, UFastNoise2GeneratorBase* OffsetSourceW); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2DomainRotateGenerator* DomainRotate(UFastNoise2GeneratorBase* Source, FRotator Rotation); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2DomainAxisScaleGenerator* DomainAxisScale(UFastNoise2GeneratorBase* Source, FVector4 Scale); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2SeedOffsetGenerator* SeedOffset(UFastNoise2GeneratorBase* Source = nullptr, int32 Offset = 1); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2RemapGenerator* Remap(UFastNoise2GeneratorBase* Source = nullptr, FVector2D FromRange = FVector2D(-1.f, 1.f), FVector2D ToRange = FVector2D(0.f, 1.f)); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2ConvertRGBA8Generator* ConvertRGBA8(UFastNoise2GeneratorBase* Source = nullptr, FVector2D Range = FVector2D(-1.f, 1.f)); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2TerraceGenerator* Terrace(UFastNoise2GeneratorBase* Source = nullptr, float Multiplier = 1.0f, float Smoothness = 0.f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2AddDimensionGenerator* AddDimensionWithPositionValue(UFastNoise2GeneratorBase* Source = nullptr, float DimensionPosition= 0.f); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2AddDimensionGenerator* AddDimensionWithPositionSource(UFastNoise2GeneratorBase* Source = nullptr, UFastNoise2GeneratorBase* DimensionPositionSource = nullptr); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2RemoveDimensionGenerator* RemoveDimension(UFastNoise2GeneratorBase* Source = nullptr, EFastNoise2Dimension DimensionToRemove = EFastNoise2Dimension::Y); - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2 | Modifiers") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2|Modifiers") static UFastNoise2GeneratorCacheGenerator* MakeGeneratorCache(UFastNoise2GeneratorBase* Source = nullptr); }; diff --git a/Source/UnrealFastNoise2/Public/FastNoise2/FastNoise2Generators.h b/Source/UnrealFastNoise2/Public/FastNoise2/FastNoise2Generators.h index 332cbaf..fc3f274 100644 --- a/Source/UnrealFastNoise2/Public/FastNoise2/FastNoise2Generators.h +++ b/Source/UnrealFastNoise2/Public/FastNoise2/FastNoise2Generators.h @@ -23,35 +23,35 @@ class UNREALFASTNOISE2_API UFastNoise2GeneratorBase : public UObject public: virtual void PostInitProperties() override; - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "Start,Size")) FFloatRange GenUniformGrid2D(TArray& OutValues, const FIntPoint& Start, const FIntPoint& Size, float Frequency = 0.01f, int32 Seed = 1337) const; - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "Start,Size")) FFloatRange GenUniformGrid3D(TArray& OutValues, const FIntVector& Start, const FIntVector& Size, float Frequency = 0.01f, int32 Seed = 1337) const; // FIntVector4 doesn't support BP, so use FVector4 - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "Start,Size")) FFloatRange GenUniformGrid4D(TArray& OutValues, const FVector4& Start, const FVector4& Size, float Frequency = 0.01f, int32 Seed = 1337) const; - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "Size")) FFloatRange GenTileable2D(TArray& OutValues, const FIntPoint& Size, float Frequency = 0.01f, int32 Seed = 1337) const; - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "Offset")) FFloatRange GenPositionArray2D(TArray& OutValues, const TArray& PosArray, const FVector2D& Offset, int32 Seed = 1337) const; - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "Offset")) FFloatRange GenPositionArray3D(TArray& OutValues, const TArray& PosArray, const FVector& Offset, int32 Seed = 1337) const; - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "Offset")) FFloatRange GenPositionArray4D(TArray& OutValues, const TArray& PosArray, const FVector4& Offset, int32 Seed = 1337) const; - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "Location")) float GenSingle2D(const FVector2D& Location, int32 Seed = 1337) const; - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "Location")) float GenSingle3D(const FVector& Location, int32 Seed = 1337) const; - UFUNCTION(BlueprintCallable, Category = "Fast Noise 2") + UFUNCTION(BlueprintCallable, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "Location")) float GenSingle4D(const FVector4& Location, int32 Seed = 1337) const; const FastNoise::SmartNode& GetGenerator() const { return GeneratorInst; } @@ -79,8 +79,8 @@ class UNREALFASTNOISE2_API UFastNoise2EncodedNodeTreeGenerator : public UFastNoi public: virtual void PostInitProperties() override; - UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") - void SetEncodedNodeTree(FString InValue); + UFUNCTION(BlueprintSetter, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "InValue")) + void SetEncodedNodeTree(const FString& InValue); protected: UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetEncodedNodeTree) @@ -170,14 +170,14 @@ class UNREALFASTNOISE2_API UFastNoise2PositionOutputGenerator : public UFastNois GENERATED_BODY() public: - UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") - void SetData(FVector4 InMultipliers, FVector4 InOffsets); + UFUNCTION(BlueprintSetter, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "InMultipliers,InOffsets")) + void SetData(const FVector4& InMultipliers, const FVector4& InOffsets); - UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") - void SetMultipliers(FVector4 InMultipliers); + UFUNCTION(BlueprintSetter, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "InMultipliers")) + void SetMultipliers(const FVector4& InMultipliers); - UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") - void SetOffsets(FVector4 InOffsets); + UFUNCTION(BlueprintSetter, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "InOffsets")) + void SetOffsets(const FVector4& InOffsets); protected: UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetMultipliers) @@ -205,8 +205,8 @@ class UNREALFASTNOISE2_API UFastNoise2DistanceToPointGenerator : public UFastNoi UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") void SetDistanceFunction(EFastNoise2DistanceFunction InDistanceFunction); - UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") - void SetScale(FVector4 InScale); + UFUNCTION(BlueprintSetter, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "InScale")) + void SetScale(const FVector4& InScale); protected: UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetScale) @@ -274,6 +274,19 @@ class UNREALFASTNOISE2_API UFastNoise2OpenSimplex2Generator : public UFastNoise2 ////////////////////////////////////////////////////////////////////////// +UCLASS(BlueprintType) +class UNREALFASTNOISE2_API UFastNoise2OpenSimplex2SGenerator : public UFastNoise2GeneratorBase +{ + GENERATED_BODY() + +protected: + virtual FastNoise::SmartNode InitGenerator() override; + + FastNoise::SmartNode OpenSimplex2SGeneratorInst = nullptr; +}; + +////////////////////////////////////////////////////////////////////////// + UCLASS(Abstract, BlueprintType) class UNREALFASTNOISE2_API UFastNoise2CellularGeneratorBase : public UFastNoise2GeneratorBase { @@ -333,7 +346,7 @@ class UNREALFASTNOISE2_API UFastNoise2CellularDistanceGenerator : public UFastNo UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") void SetDistanceIndex1(int32 InDistanceIndex1); - + UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") void SetReturnType(EFastNoise2CellularDistanceReturnType InReturnType); @@ -895,8 +908,8 @@ class UNREALFASTNOISE2_API UFastNoise2DomainOffsetGenerator : public UFastNoise2 UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") void SetOffsetSources(UFastNoise2GeneratorBase* InSourceX, UFastNoise2GeneratorBase* InSourceY, UFastNoise2GeneratorBase* InSourceZ, UFastNoise2GeneratorBase* InSourceW); - UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") - void SetOffsetValues(FVector4 InValue); + UFUNCTION(BlueprintSetter, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "InValue")) + void SetOffsetValues(const FVector4& InValue); protected: UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetOffsetValues) @@ -918,8 +931,8 @@ class UNREALFASTNOISE2_API UFastNoise2DomainRotateGenerator : public UFastNoise2 UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") void SetSource(UFastNoise2GeneratorBase* InSource); - UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") - void SetRotation(FRotator InValue); + UFUNCTION(BlueprintSetter, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "InValue")) + void SetRotation(const FRotator& InValue); protected: UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetRotation) @@ -979,13 +992,13 @@ class UNREALFASTNOISE2_API UFastNoise2RemapGenerator : public UFastNoise2Generat protected: UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetRemapFromLowerBound) float FromLowerBound = -1.f; - + UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetRemapFromUpperBound) float FromUpperBound = 1.f; - + UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetRemapToLowerBound) float ToLowerBound = 0.f; - + UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetRemapToUpperBound) float ToUpperBound = 1.f; @@ -1014,7 +1027,7 @@ class UNREALFASTNOISE2_API UFastNoise2ConvertRGBA8Generator : public UFastNoise2 protected: UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetLowerBound) float LowerBound = -1.f; - + UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetUpperBound) float UpperBound = 1.f; @@ -1043,7 +1056,7 @@ class UNREALFASTNOISE2_API UFastNoise2TerraceGenerator : public UFastNoise2Gener protected: UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetMultiplier) float Multiplier = 1.f; - + UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetSmoothness) float Smoothness = 0.f; @@ -1063,8 +1076,8 @@ class UNREALFASTNOISE2_API UFastNoise2DomainAxisScaleGenerator : public UFastNoi UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") void SetSource(UFastNoise2GeneratorBase* InSource); - UFUNCTION(BlueprintSetter, Category = "Fast Noise 2") - void SetScale(FVector4 InValue); + UFUNCTION(BlueprintSetter, Category = "Fast Noise 2", meta = (AutoCreateRefTerm = "InValue")) + void SetScale(const FVector4& InValue); protected: UPROPERTY(EditAnywhere, Category = "Fast Noise 2", BlueprintSetter = SetScale)