X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fturtle.h;h=3d1ec3c2457b67f19703b6edafa6c1b1b0be488c;hb=1a372e99786b50b48ed0158b4adcb276cf945a9e;hp=d56c09a371acd848cd19990bcb3ae8204d3f5ef6;hpb=dd73b028a74ef8b57569c3e76751481d2124e491;p=lsystem3d.git diff --git a/src/turtle.h b/src/turtle.h index d56c09a..3d1ec3c 100644 --- a/src/turtle.h +++ b/src/turtle.h @@ -1,6 +1,6 @@ // Copyright (C) 2006 Erik Dahlberg // -// This file is part of LSystem3d. +// This file is part of LSystem3D. // // LSystem3D is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -33,14 +33,14 @@ using namespace std; /** - * The model renderer + * The model creator */ class Turtle { public: /** * Constructor - * @param model render this model + * @param model create this model */ Turtle(Model *model); @@ -89,6 +89,11 @@ public: */ void walk(); + /** + * Walk forward, creating a filled surface + */ + void fillWalk(); + /** * Save current state to stack */ @@ -104,21 +109,6 @@ public: */ void reset(); - /** - * Decrement diameter of segment - */ - void decrementDiameter(); - - /** - * Begin creation of a filled surface - */ - void fenceInBegin(); - - /** - * End creation of a filled surface - */ - void fenceInEnd(); - /** * Set turn/pitch/roll angle * @param angle the angle, in radians @@ -133,23 +123,22 @@ public: protected: - Coordinate _position; // current position + Coordinate _position; // Current position - Vector _heading; // forward pointing vector - Vector _left; // left pointing vector - Vector _up; // up pointing vector + Vector _heading; // Forward pointing vector + Vector _left; // Left pointing vector + Vector _up; // Up pointing vector - double _angle; // turn/pitch/roll angle - double _diameter; // diameter of segment - bool _fenceMode; // create filled surface? + double _angle; // Turn/pitch/roll angle, in radians - stack _positionStack; // positions in stack - stack _headingStack; // heading vectors in stack - stack _leftStack; // left vectors in stack - stack _upStack; // up vectors in stack - stack _diameterStack; // diameters in stack + stack _positionStack; // Positions in stack + stack _headingStack; // Heading vectors in stack + stack _leftStack; // Left vectors in stack + stack _upStack; // Up vectors in stack + stack _diameterStack; // Diameters in stack + stack _colorIndexStack; // Colors indices in stack - Model *_model; // the rendered model + Model *_model; // The created model };