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
27 #include "coordinate.h"
43 * @param model render this model
93 * Save current state to stack
98 * Restore old state from stack
103 * Reset to default state
108 * Decrement diameter of segment
110 void decrementDiameter();
113 * Begin creation of a filled surface
118 * End creation of a filled surface
123 * Set turn/pitch/roll angle
124 * @param angle the angle, in radians
126 void setAngle(double radians
);
129 * Get turn/pitch/roll angle
130 * @return the angle, in radians
136 Coordinate _position
; // current position
138 Vector _heading
; // forward pointing vector
139 Vector _left
; // left pointing vector
140 Vector _up
; // up pointing vector
142 double _angle
; // turn/pitch/roll angle
143 double _diameter
; // diameter of segment
144 bool _fenceMode
; // create filled surface?
146 stack
<Coordinate
> _positionStack
; // positions in stack
147 stack
<Vector
> _headingStack
; // heading vectors in stack
148 stack
<Vector
> _leftStack
; // left vectors in stack
149 stack
<Vector
> _upStack
; // up vectors in stack
150 stack
<double> _diameterStack
; // diameters in stack
152 Model
*_model
; // the rendered model