Lindenmayer System
A Simple L-system Image Generator Featuring Turtle Graphics
Public Member Functions | Public Attributes | List of all members
LProduction Class Reference

Stochastic context-free production. More...

#include <Lsystem.h>

Public Member Functions

 LProduction (char lhs, const std::wstring rhs, float fProb=1)
 Constructor. More...
 

Public Attributes

char m_chLHS = '\0'
 Left-hand side of production.
 
std::wstring m_wstrRHS
 Right-hand side of production.
 
float m_fProb
 Probability of production applying.
 

Detailed Description

A production (also known as a rule) consists of a left-hand side, a right-hand side, and the probability that the production will be applied in a stochastic L-system. If your L-system is not stochastic, the probability is set to 1.

Definition at line 43 of file Lsystem.h.

Constructor & Destructor Documentation

◆ LProduction()

LProduction::LProduction ( char  lhs,
const std::wstring  rhs,
float  fProb = 1 
)
Parameters
lhsLeft hand side of production.
rhsRight hand side of production.
fProbProduction probability (defaults to 1).

Definition at line 40 of file Lsystem.cpp.