igor::iLSystem Class Reference

#include <iLSystem.h>

Public Member Functions

 iLSystem ()=default
 
virtual ~iLSystem ()=default
 
iaString generate (iaString input, int32 iterations, uint32 seed=1337)
 
void setRule (wchar_t input, iaString output)
 
void setRule (wchar_t input, std::vector< std::pair< float64, iaString > > output)
 
void clearRule (wchar_t input)
 
void setAgeFilter (wchar_t input, iLSystemAgeFunction ageFunction, int32 ageFilter)
 
void clear ()
 

Detailed Description

string based L-System implementation

Constructor & Destructor Documentation

◆ iLSystem()

igor::iLSystem::iLSystem ( )
default

nothing to do

◆ ~iLSystem()

virtual igor::iLSystem::~iLSystem ( )
virtualdefault

nothing to do

Member Function Documentation

◆ clear()

void igor::iLSystem::clear ( )

clears all data

◆ clearRule()

void igor::iLSystem::clearRule ( wchar_t  input)

clears rule for specified input character

Parameters
inputthe input character

◆ generate()

iaString igor::iLSystem::generate ( iaString  input,
int32  iterations,
uint32  seed = 1337 
)

generates string based on input string and rule set

Parameters
inputthe input string
iterationsthe amount of iterations to alter the string
seedrandom seed
Returns
the generated string

◆ setAgeFilter()

void igor::iLSystem::setAgeFilter ( wchar_t  input,
iLSystemAgeFunction  ageFunction,
int32  ageFilter 
)

sets age filter for specified rule

Parameters
inputthe input character
ageFunctionthe age function definition
ageFilterthe age filter threashold

◆ setRule() [1/2]

void igor::iLSystem::setRule ( wchar_t  input,
iaString  output 
)

adds a rule to replace a character with a string

Parameters
inputthe input character
outputthe output string for that rule

◆ setRule() [2/2]

void igor::iLSystem::setRule ( wchar_t  input,
std::vector< std::pair< float64, iaString > >  output 
)

adds a rule to replace a character with a couple string

Parameters
inputthe input character
rulesweighted rules

The documentation for this class was generated from the following files: