#pragma once
#include "FastNoise_Config.h"
// Node class definitions
#include "Generators/BasicGenerators.h"
#include "Generators/Value.h"
#include "Generators/Perlin.h"
#include "Generators/Simplex.h"
#include "Generators/Cellular.h"
#include "Generators/Fractal.h"
#include "Generators/DomainWarp.h"
#include "Generators/DomainWarpFractal.h"
#include "Generators/Modifiers.h"
#include "Generators/Blends.h"
namespace FastNoise
{
///
/// Create new instance of a FastNoise node
///
///
/// auto node = FastNoise::New();
///
/// Node class to create
/// Max SIMD level, Null = Auto
/// SmartNode is guaranteed not nullptr
template
SmartNode New( FastSIMD::eLevel maxSimdLevel /*= FastSIMD::Level_Null*/ )
{
static_assert( std::is_base_of::value, "This function should only be used for FastNoise node classes, for example FastNoise::Simplex" );
static_assert( std::is_member_function_pointer::value, "Cannot create abstract node class, use a derived class, for example: Fractal -> FractalFBm" );
#if FASTNOISE_USE_SHARED_PTR
return SmartNode( FastSIMD::New( maxSimdLevel ) );
#else
return SmartNode( FastSIMD::New( maxSimdLevel, &SmartNodeManager::Allocate ) );
#endif
}
///
/// Create a tree of FastNoise nodes from an encoded string
///
///
/// FastNoise::SmartNode<> rootNode = FastNoise::NewFromEncodedNodeTree( "DQAFAAAAAAAAQAgAAAAAAD8AAAAAAA==" );
///
/// Can be generated using the NoiseTool
/// Max SIMD level, Null = Auto
/// Root node of the tree, nullptr for invalid strings
FASTNOISE_API SmartNode<> NewFromEncodedNodeTree( const char* encodedNodeTreeString, FastSIMD::eLevel maxSimdLevel = FastSIMD::Level_Null );
}