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"
44 * @param model create this model
55 * Reset to default state
100 * Walk forward, creating a filled surface
105 * Save current state to stack
110 * Restore old state from stack
116 * Set turn/pitch/roll angle
117 * @param angle the angle, in radians
119 void setAngle(double radians
);
123 * Get turn/pitch/roll angle
124 * @return the angle, in radians
130 Coordinate _position
; // Current position
132 Vector _heading
; // Forward pointing vector
133 Vector _left
; // Left pointing vector
134 Vector _up
; // Up pointing vector
136 double _angle
; // Turn/pitch/roll angle, in radians
138 stack
<Coordinate
> _positionStack
; // Positions in stack
139 stack
<Vector
> _headingStack
; // Heading vectors in stack
140 stack
<Vector
> _leftStack
; // Left vectors in stack
141 stack
<Vector
> _upStack
; // Up vectors in stack
142 stack
<double> _diameterStack
; // Diameters in stack
143 stack
<int> _colorIndexStack
; // Colors indices in stack
145 Model
*_model
; // The created model