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
65 * @param x1 x start point
66 * @param y1 y start point
67 * @param z1 z start point
68 * @param x2 x end point
69 * @param y2 y end point
70 * @param z2 z end point
72 void segment(double x1
, double y1
, double z1
, double x2
, double y2
, double z2
);
76 * @param x x-coordinate
77 * @param y y-coordinate
78 * @param z z-coordinate
80 void vertex(double x
, double y
, double z
);
84 * @param x x-coordinate
85 * @param y y-coordinate
86 * @param z z-coordinate
88 void normal(double x
, double y
, double z
);
91 * Begin a modelling session
96 * End a modelling session
101 * Begin creation of a filled polygon
106 * End creation of a filled polygon
111 * Increment current index to color table
116 * Decrement current index to color table
121 * Decrement segment diameter
123 void decrementDiameter();
127 * Set current color index
128 * @param index the color index
130 void setColorIndex(int index
);
133 * Set current segment diameter
134 * @param diameter the diameter
136 void setDiameter(double diameter
);
139 * Set segment diameter factor
140 * @param diameter the diameter factor
142 void setDiameterFactor(double diameterFactor
);
146 * Get current color index
147 * @return color index
152 * Get current segment diameter
153 * @return the diameter
155 double getDiameter();
158 * Get segment diameter factor
159 * @return the diameter factor
161 double getDiameterFactor();
165 GLuint _displayList
; // All drawing operations
167 vector
<Color
> _colorTable
; // Color table
168 int _colorIndex
; // Current index to color table
169 double _diameter
; // Current segment diameter
170 double _diameterFactor
; // Diameter factor // TODO: "Diameter factor"?