68 int i = 0, n = Str.size();
80 Tree child = *(
new Tree(Str.substr(j + 1, i-j-1), Pos, Length, Dir, Generation, c_index, w_index));
86 if (Dir >= 360) Dir -= 360;
91 if (Dir < 0) Dir += 360;
102 c_index = Str[++i] -
'0';
107 w_index = Str[++i] -
'0';
118 Point NewPos = *(
new Point(Pos.
X + cos((M_PI / 180.0) * Dir) * Length, Pos.
Y + sin((M_PI / 180.0) * Dir) * Length));
121 DU->
drawLine((
int)Pos.
X, (
int)Pos.
Y, (
int)NewPos.
X, (
int)NewPos.
Y);
Tree(string _str, Point _pos, double _len, double _dir, int _gen, int _col, int _width)
Definition: driver3.cpp:42
double R
Definition: DrawUtil.cpp:9
double G
Definition: DrawUtil.cpp:10
#define COLORCHANGE
Definition: driver3.cpp:15
const double MAX_GENERATIONS
Definition: driver3.cpp:8
#define OPENBRACKET
Definition: driver3.cpp:13
RGB Colors[4]
Definition: DrawUtil.cpp:15
#define TURNLEFT
Definition: driver3.cpp:16
Definition: driver3.cpp:24
void Process()
Definition: driver3.cpp:66
void setColor(double r, double g, double b)
Definition: DrawUtil.cpp:317
DrawUtil * DU
Definition: driver3.cpp:23
void fillCircle(int x, int y, int r)
Definition: DrawUtil.cpp:284
double X
Definition: driver3.cpp:25
#define CLOSEDBRACKET
Definition: driver3.cpp:14
#define CIRCLE
Definition: driver3.cpp:19
Definition: driver3.cpp:33
const double ROTATE_ANGLE
Definition: driver3.cpp:9
double Y
Definition: driver3.cpp:26
double B
Definition: DrawUtil.cpp:11
#define WIDTH
Definition: driver3.cpp:20
#define TURNRIGHT
Definition: driver3.cpp:17
void drawLine(int x1, int y1, int x2, int y2)
Definition: DrawUtil.cpp:124
void changePointSize(int psize)
Definition: DrawUtil.cpp:322