Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
treegen Namespace Reference

Classes

struct  TreeDef
 

Enumerations

enum  error { SUCCESS , UNBALANCED_BRACKETS }
 

Functions

static void tree_trunk_placement (MMVManip &vmanip, v3f p0, const TreeDef &def)
 
static void tree_leaves_placement (MMVManip &vmanip, v3f p0, PseudoRandom ps, const TreeDef &def)
 
static void tree_single_leaves_placement (MMVManip &vmanip, v3f p0, PseudoRandom ps, const TreeDef &def)
 
static void tree_fruit_placement (MMVManip &vmanip, v3f p0, const TreeDef &def)
 
static void setRotationAxisRadians (core::matrix4 &M, float angle, v3f axis)
 
static v3f transposeMatrix (const core::matrix4 &M, v3f v)
 
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 TreeDef &tree_definition)
 
treegen::error make_ltree (MMVManip &vmanip, v3s16 p0, const TreeDef &tree_definition)
 
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(), and PseudoRandom::range().

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 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(), and PseudoRandom::range().

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(), and PseudoRandom::range().

Referenced by MapgenV6::placeTreesAndJungleGrass().

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

◆ setRotationAxisRadians()

void treegen::setRotationAxisRadians ( core::matrix4 & M,
float angle,
v3f axis )
static

Referenced by make_ltree().

+ Here is the caller graph for this function:

◆ spawn_ltree()

treegen::error treegen::spawn_ltree ( ServerMap * map,
v3s16 p0,
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 ModApiEnv::l_spawn_tree().

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

◆ transposeMatrix()

v3f treegen::transposeMatrix ( const core::matrix4 & M,
v3f v )
static

Referenced by make_ltree().

+ Here is the caller graph for this function:

◆ tree_fruit_placement()

void treegen::tree_fruit_placement ( MMVManip & vmanip,
v3f p0,
const TreeDef & def )
static

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,
const TreeDef & def )
static

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,
const TreeDef & def )
static

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,
const TreeDef & def )
static

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: