ProceduralWorlds

Even though the C++ and C# workflows are near-identical, I have split them into two parts for ease of use.

Table of Contents

  1. C++
  2. C#

C++ documentation

List of classes

  1. Generator
  2. HeightMap
  3. NoiseMap
  4. PerlinComposition
  5. Graph
  6. WorldShapes
  7. Presets
  8. SuccessPredicate

Generator class

Available in namespace that
Once you start using the library the first thing you need is an instantiation of the Generator class.
This class contains all the logic needed to generate a world.

Methods:

HeightMap class

Available in namespace that
This class is a wrapper around a list of NoiseMaps. These noisemaps gets blended together to form the final heightmap.

Methods:

NoiseMap class

Available in namespace that
This class is a wrapper around a perlin object and a graph object. Both objects are fully customizable to generate a noisemap to your liking.

Methods:

PerlinComposition

Available in namespace that
This class is produces perlin noise depending on the added octaves.

Methods:

Graph

Available in namespace that
This class acts as a graph between which the nodes are linearly interpolated.

Methods:

WorldShape

Available in namespace that::shape
The interface WorldShape is the base class of all the world shapes. It only has one method used internally, the Transform method. This transforms a heightmap value using the worldshape.

The WorldShapes in the library are:

You can create your own worldshapes by creating a class that derives from the WorldShape interface and implements the Transform method.

Presets

Available in namespace that::preset
The Presets class contains static methods that will add noisemaps to a given Generator.

Methods:

SuccessPredicate

This class is a wrapper around a std::function with 2 float parameters that returns a bool.
The two float parameters will be two height values that are tested. (usually named height0 and height1)
The return value of this function should be whether or not the predicate succeeded.

C# documentation

Before usage of this library you need to set up the location of the dll file inside the file ProceduralWorldsDll.cs.
There is a string variable called DLL_NAME that needs to be changed to the location of the dll file.

List of classes

  1. Generator
  2. HeightMap
  3. NoiseMap
  4. PerlinComposition
  5. Graph
  6. WorldShapes
  7. Presets
  8. SuccessPredicate

Generator class

Available in namespace that
Once you start using the library the first thing you need is an instantiation of the Generator class.
This class contains all the logic needed to generate a world.

Properties:

Methods:

HeightMap class

Available in namespace that
This class is a wrapper around a list of NoiseMaps. These noisemaps gets blended together to form the final heightmap.

THIS CLASS CANNOT BE INSTANTIATED USING NEW To create HeightMap objects that are not connected to any Generator, use the DynamicHeightMap class with the same functionality.

Methods:

NoiseMap class

Available in namespace that
This class is a wrapper around a perlin object and a graph object. Both objects are fully customizable to generate a noisemap to your liking.

Properties:

Methods:

PerlinComposition

Available in namespace that
This class is produces perlin noise depending on the added octaves.

THIS CLASS CANNOT BE INSTANTIATED USING NEW To create PerlinComposition objects that are not connected to any NoiseMap, use the DynamicPerlinComposition class with the same functionality.

Methods:

Graph

Available in namespace that
This class acts as a graph between which the nodes are linearly interpolated.

THIS CLASS CANNOT BE INSTANTIATED USING NEW To create Graph objects that are not connected to any NoiseMap, use the DynamicGraph class with the same functionality.

Methods:

IWorldShape

Available in namespace that.shape
The interface IWorldShape is the base of all the world shapes.

The WorldShapes in the library are:

Presets

Available in namespace that.preset
The Presets class contains static methods that will add noisemaps to a given Generator.

Methods:

SuccessPredicate

This class is a wrapper around a Func object with 2 float parameters that returns a bool.
The two float parameters will be two height values that are tested. (usually named height0 and height1)
The return value of this function should be whether or not the predicate succeeded.