repositories
/
lsystem3d.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor cleanup.
[lsystem3d.git]
/
src
/
lindenmayersystem.h
diff --git
a/src/lindenmayersystem.h
b/src/lindenmayersystem.h
index b937e72a95e819f3685eb870b2011a142c94f9e7..77c8ec0ec2832934b3854d23c9a113fac1c6eaed 100644
(file)
--- a/
src/lindenmayersystem.h
+++ b/
src/lindenmayersystem.h
@@
-34,7
+34,7
@@
using namespace std;
/**
/**
- * Lindenmayer
System
+ * Lindenmayer
system generator
*/
class LindenmayerSystem
{
*/
class LindenmayerSystem
{
@@
-51,6
+51,7
@@
public:
*/
~LindenmayerSystem();
*/
~LindenmayerSystem();
+
/**
* Clear all parameters
*/
/**
* Clear all parameters
*/
@@
-61,6
+62,12
@@
public:
*/
void generate();
*/
void generate();
+ /**
+ * Render L-system data
+ */
+ void render();
+
+
/**
* Set the initial rule (the axiom)
* @param axiom the axiom
/**
* Set the initial rule (the axiom)
* @param axiom the axiom
@@
-80,23
+87,24
@@
public:
void setAngle(double degrees);
/**
void setAngle(double degrees);
/**
- * Set
depth of recursion
+ * Set
recursion depth
* @param depth depth of recursion
*/
void setDepth(int 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);
/**
* @param diameter the diameter
*/
void setDiameter(double diameter);
/**
- * Set diameter factor
+ * Set
segment
diameter factor
* @param diameterFactor the diameter factor
*/
void setDiameterFactor(double diameterFactor);
* @param diameterFactor the diameter factor
*/
void setDiameterFactor(double diameterFactor);
+
/**
* Get the initial rule (the axiom)
* @return the axiom
/**
* Get the initial rule (the axiom)
* @return the axiom
@@
-116,30
+124,38
@@
public:
double getAngle();
/**
double getAngle();
/**
- * Get
depth of recursion
+ * Get
recursion depth
* @return depth of recursion
*/
int getDepth();
/**
* @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
protected:
/**
* Recursively apply the replacement rules
- * @param rule rule
+ * @param rule
the
rule
* @param level recursion level
*/
void recursiveWalk(string rule, int level);
* @param level recursion level
*/
void recursiveWalk(string rule, int level);
+
// Parameters
Rule _axiom;
RuleSet _rules;
int _depth;
// Parameters
Rule _axiom;
RuleSet _rules;
int _depth;
+ double _segmentDiameter;
Model *_model; // The active model
Turtle *_turtle; // The rendering turtle
Model *_model; // The active model
Turtle *_turtle; // The rendering turtle