HyperspaceExplorer 0.7.1
|
The alphabet for the Lindenmayer System. More...
Public Member Functions | |
Alphabet (const std::string &letters) | |
std::shared_ptr< Displayable > | getDisplayable (char letter) |
std::string | toString () const |
Static Public Attributes | |
static const char | LEFT_X = '+' |
static const char | RIGHT_X = '-' |
static const char | LEFT_Y = '^' |
static const char | RIGHT_Y = 'v' |
static const char | LEFT_Z = '<' |
static const char | RIGHT_Z = '>' |
static const char | LEFT_W = '[' |
static const char | RIGHT_W = ']' |
static const char | FORWARD = 'f' |
static const char | BACK = 'b' |
static const char | OPEN_GROUP = '{' |
static const char | CLOSE_GROUP = '}' |
static const char | SCALE = 's' |
static const char | ANGLE = 'a' |
Private Attributes | |
std::vector< char > | letters_ |
The alphabet for the Lindenmayer System.
See http://en.wikipedia.org/wiki/L-system#L-system_structure for definitions.
The Alphabet may consist of uppercase letters.
The following characters are reserved:
+
and -
for rotation about the x
axis, ^
and v
for rotation about the y
axis, < and > for rotations about the z
axis, and
[ and
] for rotations about the w
axis. Rotations about higher axes are... not yet implemented, come to think of it.f
and b
for stepping one step forward or one step backward.{
and }
for grouping.s
for defining a scale factor.a
for defining a rotation angle.