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
22 #ifndef OPENGLWINDOW_H
23 #define OPENGLWINDOW_H
30 #include "lindenmayersystem.h"
31 #include "lsystemparameters.h"
39 * OpenGL drawing context
55 * Start generation of l-system data
100 * Rotate around y-axis
105 * Draw l-system model to screen
110 * Reset to default view
115 * Check if live mode is activated
116 * @return true, if activated
118 bool liveActivated();
123 double _xModel
, // model coordinate (starting point)
126 double _scaleModel
; // model scale factor
127 double _yRotationModel
; // model rotation
130 LindenmayerSystem
*_lsystem
; // l-system generator
131 Model
*_model
; // the generated l-system model
132 LSystemParameters _lsystemParameters
; // saves/loads l-system parameters from file
133 string lsystemParametersPath
; // where to find the l-system rules
136 int _window
; // the rendering window
137 bool _busyGenerating
; // currently generating?
140 GLUI
*_glui
; // the GUI window
141 GLUI_EditText
*_axiomEditText
; // axiom textbox
142 vector
<GLUI_EditText
*> _ruleEditTexts
; // rule textboxes
143 GLUI_Spinner
*_angleSpinner
; // angle spinner
144 GLUI_Spinner
*_iterationsSpinner
; // iteration spinner
145 GLUI_Checkbox
*_liveCheckbox
; // live checkbox
146 int _liveUpdates
; // status of live checkbox