Minetest  5.4.0
treegen Namespace Reference

Classes

struct  TreeDef
 

Enumerations

enum  error { SUCCESS , UNBALANCED_BRACKETS }
 

Functions

void make_tree (MMVManip &vmanip, v3s16 p0, bool is_apple_tree, const NodeDefManager *ndef, s32 seed)
 
treegen::error spawn_ltree (ServerMap *map, v3s16 p0, const NodeDefManager *ndef, const TreeDef &tree_definition)
 
treegen::error make_ltree (MMVManip &vmanip, v3s16 p0, const NodeDefManager *ndef, TreeDef tree_definition)
 
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)
 
void make_jungletree (MMVManip &vmanip, v3s16 p0, const NodeDefManager *ndef, s32 seed)
 
void make_pine_tree (MMVManip &vmanip, v3s16 p0, const NodeDefManager *ndef, s32 seed)
 

Enumeration Type Documentation

◆ error

Enumerator
SUCCESS 
UNBALANCED_BRACKETS 

Function Documentation

◆ make_jungletree()

void treegen::make_jungletree ( MMVManip vmanip,
v3s16  p0,
const NodeDefManager ndef,
s32  seed 
)

References VoxelArea::contains(), CONTENT_AIR, CONTENT_IGNORE, errorstream, MapNode::getContent(), NodeDefManager::getId(), VoxelArea::getVolume(), VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_data, VoxelArea::MaxEdge, VoxelArea::MinEdge, p(), PseudoRandom::range(), and seed.

Referenced by MapgenV6::placeTreesAndJungleGrass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_ltree()

treegen::error treegen::make_ltree ( MMVManip vmanip,
v3s16  p0,
const NodeDefManager ndef,
TreeDef  tree_definition 
)

◆ make_pine_tree()

void treegen::make_pine_tree ( MMVManip vmanip,
v3s16  p0,
const NodeDefManager ndef,
s32  seed 
)

References VoxelArea::contains(), CONTENT_AIR, CONTENT_IGNORE, errorstream, MapNode::getContent(), NodeDefManager::getId(), VoxelArea::getVolume(), VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_data, VoxelArea::MaxEdge, VoxelArea::MinEdge, p(), PseudoRandom::range(), and seed.

Referenced by MapgenV6::placeTreesAndJungleGrass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_tree()

void treegen::make_tree ( MMVManip vmanip,
v3s16  p0,
bool  is_apple_tree,
const NodeDefManager ndef,
s32  seed 
)

References VoxelArea::contains(), CONTENT_AIR, CONTENT_IGNORE, errorstream, MapNode::getContent(), NodeDefManager::getId(), VoxelArea::getVolume(), VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_data, VoxelArea::MaxEdge, VoxelArea::MinEdge, p(), PseudoRandom::range(), and seed.

Referenced by MapgenV6::placeTreesAndJungleGrass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setRotationAxisRadians()

irr::core::matrix4 treegen::setRotationAxisRadians ( irr::core::matrix4  M,
double  angle,
v3f  axis 
)

Referenced by make_ltree().

+ Here is the caller graph for this function:

◆ spawn_ltree()

treegen::error treegen::spawn_ltree ( ServerMap map,
v3s16  p0,
const NodeDefManager ndef,
const TreeDef tree_definition 
)

References voxalgo::blit_back_with_light(), Map::dispatchEvent(), getNodeBlockPos(), MMVManip::initialEmerge(), make_ltree(), MEET_OTHER, SUCCESS, and MapEditEvent::type.

Referenced by ModApiEnvMod::l_spawn_tree().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ transposeMatrix()

v3f treegen::transposeMatrix ( irr::core::matrix4  M,
v3f  v 
)

Referenced by make_ltree().

+ Here is the caller graph for this function:

◆ tree_fruit_placement()

void treegen::tree_fruit_placement ( MMVManip vmanip,
v3f  p0,
TreeDef tree_definition 
)

References VoxelArea::contains(), CONTENT_AIR, CONTENT_IGNORE, treegen::TreeDef::fruitnode, MapNode::getContent(), VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_data, and myround().

Referenced by make_ltree().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tree_leaves_placement()

void treegen::tree_leaves_placement ( MMVManip vmanip,
v3f  p0,
PseudoRandom  ps,
TreeDef tree_definition 
)

References VoxelArea::contains(), CONTENT_AIR, CONTENT_IGNORE, treegen::TreeDef::fruit_chance, treegen::TreeDef::fruitnode, MapNode::getContent(), VoxelArea::index(), treegen::TreeDef::leaves2_chance, treegen::TreeDef::leaves2node, treegen::TreeDef::leavesnode, VoxelManipulator::m_area, VoxelManipulator::m_data, myround(), and PseudoRandom::range().

Referenced by make_ltree().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tree_single_leaves_placement()

void treegen::tree_single_leaves_placement ( MMVManip vmanip,
v3f  p0,
PseudoRandom  ps,
TreeDef tree_definition 
)

References VoxelArea::contains(), CONTENT_AIR, CONTENT_IGNORE, MapNode::getContent(), VoxelArea::index(), treegen::TreeDef::leaves2_chance, treegen::TreeDef::leaves2node, treegen::TreeDef::leavesnode, VoxelManipulator::m_area, VoxelManipulator::m_data, myround(), and PseudoRandom::range().

Referenced by make_ltree().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tree_trunk_placement()

void treegen::tree_trunk_placement ( MMVManip vmanip,
v3f  p0,
TreeDef tree_definition 
)

References VoxelArea::contains(), CONTENT_AIR, CONTENT_IGNORE, treegen::TreeDef::fruitnode, MapNode::getContent(), VoxelArea::index(), treegen::TreeDef::leaves2node, treegen::TreeDef::leavesnode, VoxelManipulator::m_area, VoxelManipulator::m_data, myround(), and treegen::TreeDef::trunknode.

Referenced by make_ltree().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: