34 #pragma region LProduction 49 LProduction(
char lhs,
const std::wstring rhs,
float fProb=1);
52 #pragma endregion LProduction 57 #pragma region LSystem 86 void SetRoot(
const std::wstring& omega);
99 #pragma endregion LSystem std::wstring m_wstrRHS
Right-hand side of production.
std::map< wchar_t, std::vector< LProduction > > m_mapRules
Productions.
void Clear()
Clear the rules, buffers, and settings.
LProduction(char lhs, const std::wstring rhs, float fProb=1)
Constructor.
std::wstring * m_pResult
Pointer to generated string.
const bool IsStochastic() const
Is a stochastic L-system.
std::wstring m_wstrBuffer[2]
Generation buffers.
A stochastic bracketed context-free L-system.
Stochastic context-free production.
const std::wstring & GetRuleString() const
Get rule string.
Pseudorandom Number Generator (PRNG for short).
Interface for the pseudorandom number generator CRandom.
std::wstring m_wstrRuleString
Rule string.
char m_chLHS
Left-hand side of production.
std::wstring m_wstrRoot
Root string.
const std::wstring & GetString() const
Get generated string.
const UINT GetGenerations() const
Get number of generations.
void AddRule(const LProduction &rule)
AddRule rule.
void Generate(const UINT n)
Generate L-system from stored root and rules.
float m_fProb
Probability of production applying.
bool m_bStochastic
Includes a stochastic rule.
void SetRoot(const std::wstring &omega)
Set the root string.
UINT m_nGenerations
Number of generations.