Minor cleanup.
[lsystem3d.git] / src / lindenmayersystem.h
index b937e72a95e819f3685eb870b2011a142c94f9e7..77c8ec0ec2832934b3854d23c9a113fac1c6eaed 100644 (file)
@@ -34,7 +34,7 @@ using namespace std;
 
 
 /**
- * Lindenmayer System
+ * Lindenmayer system generator
  */
 class LindenmayerSystem
 {
@@ -51,6 +51,7 @@ public:
      */
     ~LindenmayerSystem();
     
+    
     /**
      * Clear all parameters
      */
@@ -61,6 +62,12 @@ public:
      */
     void generate();
     
+    /**
+     * Render L-system data
+     */
+    void render();
+    
+    
     /**
      * Set the initial rule (the axiom)
      * @param axiom the axiom
@@ -80,23 +87,24 @@ public:
     void setAngle(double degrees);
     
     /**
-     * Set depth of recursion
+     * Set recursion depth
      * @param depth depth of recursion
      */
     void setDepth(int depth);
     
     /**
-     * Set diameter of segment
+     * Set initial segment diameter
      * @param diameter the diameter
      */
     void setDiameter(double diameter);
     
     /**
-     * Set diameter factor
+     * Set segment diameter factor
      * @param diameterFactor the diameter factor
      */
     void setDiameterFactor(double diameterFactor);
     
+    
     /**
      * Get the initial rule (the axiom)
      * @return the axiom
@@ -116,30 +124,38 @@ public:
     double getAngle();
     
     /**
-     * Get depth of recursion
+     * Get recursion depth
      * @return depth of recursion
      */
     int getDepth();
     
     /**
-     * Get the generated model
-     * @return generated model
+     * Get initial segment diameter
+     * @return the diameter
      */
-    Model *getModel();
+    double getDiameter();
+    
+    /**
+     * Get segment diameter factor
+     * @return the diameter factor
+     */
+    double getDiameterFactor();
     
 protected:
     
     /**
      * Recursively apply the replacement rules
-     * @param rule rule
+     * @param rule the rule
      * @param level recursion level
      */
     void recursiveWalk(string rule, int level);
     
+    
     // Parameters
     Rule _axiom;
     RuleSet _rules;
     int _depth;
+    double _segmentDiameter;
     
     Model *_model;      // The active model
     Turtle *_turtle;    // The rendering turtle