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.cpp
diff --git
a/src/lindenmayersystem.cpp
b/src/lindenmayersystem.cpp
index 394f22aea1f28e86c61781a5ef940b635e8cd8a5..18339122df83c5e9b8938c7f8bdd73d5568e21ce 100644
(file)
--- a/
src/lindenmayersystem.cpp
+++ b/
src/lindenmayersystem.cpp
@@
-87,6
+87,16
@@
void LindenmayerSystem::generate()
+/**
+ * Render L-system data
+ */
+void LindenmayerSystem::render()
+{
+ _model->draw();
+}
+
+
+
/**
* Set the initial rule (the axiom)
* @param axiom the axiom
/**
* Set the initial rule (the axiom)
* @param axiom the axiom
@@
-124,7
+134,7
@@
void LindenmayerSystem::setAngle(double degrees)
/**
/**
- * Set
depth of recursion
+ * Set
recursion depth
* @param depth depth of recursion
*/
void LindenmayerSystem::setDepth(int depth)
* @param depth depth of recursion
*/
void LindenmayerSystem::setDepth(int depth)
@@
-135,18
+145,19
@@
void LindenmayerSystem::setDepth(int depth)
/**
/**
- * Set
diameter of segment
+ * Set
initial segment diameter
* @param diameter the diameter
*/
void LindenmayerSystem::setDiameter(double diameter)
{
* @param diameter the diameter
*/
void LindenmayerSystem::setDiameter(double diameter)
{
+ _segmentDiameter = diameter;
_model->setDiameter(diameter);
}
/**
_model->setDiameter(diameter);
}
/**
- * Set diameter factor
+ * Set
segment
diameter factor
* @param diameterFactor the diameter factor
*/
void LindenmayerSystem::setDiameterFactor(double diameterFactor)
* @param diameterFactor the diameter factor
*/
void LindenmayerSystem::setDiameterFactor(double diameterFactor)
@@
-195,7
+206,7
@@
double LindenmayerSystem::getAngle()
/**
/**
- * Get
depth of recursion
+ * Get
recursion depth
* @return depth of recursion
*/
int LindenmayerSystem::getDepth()
* @return depth of recursion
*/
int LindenmayerSystem::getDepth()
@@
-206,19
+217,30
@@
int LindenmayerSystem::getDepth()
/**
/**
- * Get
the generated model
- * @return
generated model
+ * Get
initial segment diameter
+ * @return
the diameter
*/
*/
-
Model *LindenmayerSystem::getModel
()
+
double LindenmayerSystem::getDiameter
()
{
{
- return _model;
+ return _segmentDiameter;
+}
+
+
+
+/**
+ * Get segment diameter factor
+ * @return the diameter factor
+ */
+double LindenmayerSystem::getDiameterFactor()
+{
+ return _model->getDiameterFactor();
}
/**
* Recursively apply the replacement rules
}
/**
* Recursively apply the replacement rules
- * @param rule rule
+ * @param rule
the
rule
* @param level recursion level
*/
void LindenmayerSystem::recursiveWalk(string rule, int level)
* @param level recursion level
*/
void LindenmayerSystem::recursiveWalk(string rule, int level)
@@
-348,7
+370,7
@@
void LindenmayerSystem::recursiveWalk(string rule, int level)
break;
break;
- // decrement
diameter of segment
+ // decrement
segment diameter
case '!':
_model->decrementDiameter();
case '!':
_model->decrementDiameter();