X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fmodel.h;h=138b8018fe3350c99ba846369344902b57417d44;hb=a4205fb0191cc9a6a9090e0f6276248724e4f940;hp=a05d8e3edc3296ea434b04d3ffc44599b75b2def;hpb=526db67540bf69a4c09ed0d0f4d62bad0a37ee70;p=lsystem3d.git diff --git a/src/model.h b/src/model.h index a05d8e3..138b801 100644 --- a/src/model.h +++ b/src/model.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 @@ -38,6 +38,7 @@ using namespace std; class Model { public: + /** * Constructor */ @@ -48,6 +49,17 @@ public: */ ~Model(); + + /** + * Clear the model + */ + void clear(); + + /** + * Render to screen + */ + void draw(); + /** * Create a segment * @param x1 x start point @@ -75,16 +87,6 @@ public: */ void normal(double x, double y, double z); - /** - * Render to screen - */ - void draw(); - - /** - * Clear the model - */ - void clear(); - /** * Begin a modelling session */ @@ -116,10 +118,11 @@ public: void prevColor(); /** - * Decrement diameter of segment + * Decrement segment diameter */ void decrementDiameter(); + /** * Set current color index * @param index the color index @@ -127,17 +130,18 @@ public: void setColorIndex(int index); /** - * Set current diameter of segment + * Set current segment diameter * @param diameter the diameter */ void setDiameter(double diameter); /** - * Set diameter factor + * Set segment diameter factor * @param diameter the diameter factor */ void setDiameterFactor(double diameterFactor); + /** * Get current color index * @return color index @@ -145,18 +149,24 @@ public: int getColorIndex(); /** - * Get current diameter of segment - * @return diameter of segment + * Get current segment diameter + * @return the diameter */ double getDiameter(); + /** + * Get segment diameter factor + * @return the diameter factor + */ + double getDiameterFactor(); + protected: GLuint _displayList; // All drawing operations vector _colorTable; // Color table int _colorIndex; // Current index to color table - double _diameter; // Current diameter of segment + double _diameter; // Current segment diameter double _diameterFactor; // Diameter factor // TODO: "Diameter factor"? };