3 Copyright (C) 2010-2018 celeron55, Perttu Ahola <celeron55@gmail.com>,
4 Copyright (C) 2012-2018 RealBadAngel, Maciej Kasatkin
5 Copyright (C) 2015-2018 paramat
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation; either version 2.1 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public License along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
39 std::string initial_axiom;
52 int iterations_random_level;
53 std::string trunk_type;
62 void make_tree(MMVManip &vmanip, v3s16 p0,
63 bool is_apple_tree, const NodeDefManager *ndef, s32 seed);
65 void make_jungletree(MMVManip &vmanip, v3s16 p0,
66 const NodeDefManager *ndef, s32 seed);
68 void make_pine_tree(MMVManip &vmanip, v3s16 p0,
69 const NodeDefManager *ndef, s32 seed);
71 // Add L-Systems tree (used by engine)
72 treegen::error make_ltree(MMVManip &vmanip, v3s16 p0,
73 const NodeDefManager *ndef, TreeDef tree_definition);
74 // Spawn L-systems tree from LUA
75 treegen::error spawn_ltree (ServerMap *map, v3s16 p0,
76 const NodeDefManager *ndef, const TreeDef &tree_definition);
78 // L-System tree gen helper functions
79 void tree_node_placement(MMVManip &vmanip, v3f p0,
81 void tree_trunk_placement(MMVManip &vmanip, v3f p0,
82 TreeDef &tree_definition);
83 void tree_leaves_placement(MMVManip &vmanip, v3f p0,
84 PseudoRandom ps, TreeDef &tree_definition);
85 void tree_single_leaves_placement(MMVManip &vmanip, v3f p0,
86 PseudoRandom ps, TreeDef &tree_definition);
87 void tree_fruit_placement(MMVManip &vmanip, v3f p0,
88 TreeDef &tree_definition);
89 irr::core::matrix4 setRotationAxisRadians(irr::core::matrix4 M, double angle, v3f axis);
91 v3f transposeMatrix(irr::core::matrix4 M ,v3f v);
93 }; // namespace treegen