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 create this model
93 * Walk forward, creating a filled surface
98 * Save current state to stack
103 * Restore old state from stack
108 * Reset to default state
113 * Set turn/pitch/roll angle
114 * @param angle the angle, in radians
116 void setAngle(double radians
);
119 * Get turn/pitch/roll angle
120 * @return the angle, in radians
126 Coordinate _position
; // Current position
128 Vector _heading
; // Forward pointing vector
129 Vector _left
; // Left pointing vector
130 Vector _up
; // Up pointing vector
132 double _angle
; // Turn/pitch/roll angle, in radians
134 stack
<Coordinate
> _positionStack
; // Positions in stack
135 stack
<Vector
> _headingStack
; // Heading vectors in stack
136 stack
<Vector
> _leftStack
; // Left vectors in stack
137 stack
<Vector
> _upStack
; // Up vectors in stack
138 stack
<double> _diameterStack
; // Diameters in stack
139 stack
<int> _colorIndexStack
; // Colors indices in stack
141 Model
*_model
; // The created model