1 // Copyright (C) 2006 Erik Dahlberg
3 // This file is part of LSystem3D.
5 // LSystem3D is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // LSystem3D is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with LSystem3D; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
53 * @param x1 x start point
54 * @param y1 y start point
55 * @param z1 z start point
56 * @param x2 x end point
57 * @param y2 y end point
58 * @param z2 z end point
60 void segment(double x1
, double y1
, double z1
, double x2
, double y2
, double z2
);
64 * @param x x-coordinate
65 * @param y y-coordinate
66 * @param z z-coordinate
68 void vertex(double x
, double y
, double z
);
72 * @param x x-coordinate
73 * @param y y-coordinate
74 * @param z z-coordinate
76 void normal(double x
, double y
, double z
);
89 * Begin a modelling session
94 * End a modelling session
99 * Begin creation of a filled polygon
104 * End creation of a filled polygon
109 * Increment current index to color table
114 * Decrement current index to color table
119 * Decrement diameter of segment
121 void decrementDiameter();
124 * Set current color index
125 * @param index the color index
127 void setColorIndex(int index
);
130 * Set current diameter of segment
131 * @param diameter the diameter
133 void setDiameter(double diameter
);
136 * Set diameter factor
137 * @param diameter the diameter factor
139 void setDiameterFactor(double diameterFactor
);
142 * Get current color index
143 * @return color index
148 * Get current diameter of segment
149 * @return diameter of segment
151 double getDiameter();
155 GLuint _displayList
; // All drawing operations
157 vector
<Color
> _colorTable
; // Color table
158 int _colorIndex
; // Current index to color table
159 double _diameter
; // Current diameter of segment
160 double _diameterFactor
; // Diameter factor // TODO: "Diameter factor"?