mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
General code refactoring/improvements in server, treegen and connection
This commit is contained in:
parent
24f2c38093
commit
bc4ab8b99e
34 changed files with 330 additions and 439 deletions
|
@ -21,8 +21,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <matrix4.h>
|
||||
#include "noise.h"
|
||||
#include <string>
|
||||
#include "irr_v3d.h"
|
||||
#include "nodedef.h"
|
||||
#include "mapnode.h"
|
||||
|
||||
class MMVManip;
|
||||
class NodeDefManager;
|
||||
|
@ -77,24 +79,8 @@ namespace treegen {
|
|||
void make_pine_tree(MMVManip &vmanip, v3s16 p0,
|
||||
const NodeDefManager *ndef, s32 seed);
|
||||
|
||||
// Add L-Systems tree (used by engine)
|
||||
treegen::error make_ltree(MMVManip &vmanip, v3s16 p0,
|
||||
const NodeDefManager *ndef, TreeDef tree_definition);
|
||||
// Spawn L-systems tree from LUA
|
||||
treegen::error spawn_ltree (ServerMap *map, v3s16 p0,
|
||||
const NodeDefManager *ndef, const TreeDef &tree_definition);
|
||||
|
||||
// L-System tree gen helper functions
|
||||
void tree_trunk_placement(MMVManip &vmanip, v3f p0,
|
||||
TreeDef &tree_definition);
|
||||
void tree_leaves_placement(MMVManip &vmanip, v3f p0,
|
||||
PseudoRandom ps, TreeDef &tree_definition);
|
||||
void tree_single_leaves_placement(MMVManip &vmanip, v3f p0,
|
||||
PseudoRandom ps, TreeDef &tree_definition);
|
||||
void tree_fruit_placement(MMVManip &vmanip, v3f p0,
|
||||
TreeDef &tree_definition);
|
||||
irr::core::matrix4 setRotationAxisRadians(irr::core::matrix4 M, double angle, v3f axis);
|
||||
|
||||
v3f transposeMatrix(irr::core::matrix4 M ,v3f v);
|
||||
|
||||
// Spawn L-Systems tree on VManip
|
||||
treegen::error make_ltree(MMVManip &vmanip, v3s16 p0, const TreeDef &def);
|
||||
// Helper to spawn it directly on map
|
||||
treegen::error spawn_ltree(ServerMap *map, v3s16 p0, const TreeDef &def);
|
||||
}; // namespace treegen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue