Minetest 5.10.0-dev
 
Loading...
Searching...
No Matches
CavesV6 Class Reference

#include <cavegen.h>

+ Collaboration diagram for CavesV6:

Public Member Functions

 CavesV6 (const NodeDefManager *ndef, GenerateNotifier *gennotify=NULL, int water_level=1, content_t water_source=CONTENT_IGNORE, content_t lava_source=CONTENT_IGNORE)
 
void makeCave (MMVManip *vm, v3s16 nmin, v3s16 nmax, PseudoRandom *ps, PseudoRandom *ps2, bool is_large_cave, int max_stone_height, s16 *heightmap=NULL)
 

Public Attributes

MMVManipvm
 
const NodeDefManagerndef
 
GenerateNotifiergennotify
 
PseudoRandomps
 
PseudoRandomps2
 
s16 * heightmap
 
content_t c_water_source
 
content_t c_lava_source
 
int water_level
 
u16 ystride
 
s16 min_tunnel_diameter
 
s16 max_tunnel_diameter
 
u16 tunnel_routepoints
 
int part_max_length_rs
 
bool large_cave
 
bool large_cave_is_flat
 
v3s16 node_min
 
v3s16 node_max
 
v3f orp
 
v3s16 of
 
v3s16 ar
 
s16 rs
 
v3f main_direction
 
s16 route_y_min
 
s16 route_y_max
 

Private Member Functions

void makeTunnel (bool dirswitch)
 
void carveRoute (v3f vec, float f, bool randomize_xz, bool tunnel_above_ground)
 
s16 getSurfaceFromHeightmap (v3s16 p)
 

Constructor & Destructor Documentation

◆ CavesV6()

CavesV6::CavesV6 ( const NodeDefManager * ndef,
GenerateNotifier * gennotify = NULL,
int water_level = 1,
content_t water_source = CONTENT_IGNORE,
content_t lava_source = CONTENT_IGNORE )

References c_lava_source, c_water_source, CONTENT_AIR, CONTENT_IGNORE, gennotify, NodeDefManager::getId(), ndef, and water_level.

+ Here is the call graph for this function:

Member Function Documentation

◆ carveRoute()

void CavesV6::carveRoute ( v3f vec,
float f,
bool randomize_xz,
bool tunnel_above_ground )
private

References c_lava_source, c_water_source, VoxelArea::contains(), CONTENT_AIR, NodeDefManager::get(), MapNode::getContent(), VoxelArea::index(), ContentFeatures::is_ground_content, large_cave, large_cave_is_flat, VoxelManipulator::m_area, VoxelManipulator::m_data, VoxelManipulator::m_flags, MAP_BLOCKSIZE, MYMAX, ndef, node_max, node_min, of, orp, p(), ps, PseudoRandom::range(), rs, vm, VMANIP_FLAG_CAVE, and water_level.

Referenced by makeTunnel().

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

◆ getSurfaceFromHeightmap()

s16 CavesV6::getSurfaceFromHeightmap ( v3s16 p)
inlineprivate

References heightmap, node_max, node_min, p(), water_level, and ystride.

Referenced by makeTunnel().

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

◆ makeCave()

void CavesV6::makeCave ( MMVManip * vm,
v3s16 nmin,
v3s16 nmax,
PseudoRandom * ps,
PseudoRandom * ps2,
bool is_large_cave,
int max_stone_height,
s16 * heightmap = NULL )

References GenerateNotifier::addEvent(), ar, gennotify, GENNOTIFY_CAVE_BEGIN, GENNOTIFY_CAVE_END, GENNOTIFY_LARGECAVE_BEGIN, GENNOTIFY_LARGECAVE_END, heightmap, large_cave, large_cave_is_flat, main_direction, makeTunnel(), MAP_BLOCKSIZE, max_tunnel_diameter, min_tunnel_diameter, MYMAX, PseudoRandom::next(), node_max, node_min, of, orp, part_max_length_rs, ps, ps2, PseudoRandom::range(), rangelim, route_y_max, route_y_min, tunnel_routepoints, vm, water_level, and ystride.

Referenced by MapgenV6::generateCaves().

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

◆ makeTunnel()

void CavesV6::makeTunnel ( bool dirswitch)
private

References ar, carveRoute(), getSurfaceFromHeightmap(), large_cave, main_direction, max_tunnel_diameter, min_tunnel_diameter, PseudoRandom::next(), of, orp, part_max_length_rs, ps, ps2, PseudoRandom::range(), route_y_max, route_y_min, and rs.

Referenced by makeCave().

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

Member Data Documentation

◆ ar

v3s16 CavesV6::ar

Referenced by makeCave(), and makeTunnel().

◆ c_lava_source

content_t CavesV6::c_lava_source

Referenced by CavesV6(), and carveRoute().

◆ c_water_source

content_t CavesV6::c_water_source

Referenced by CavesV6(), and carveRoute().

◆ gennotify

GenerateNotifier* CavesV6::gennotify

Referenced by CavesV6(), and makeCave().

◆ heightmap

s16* CavesV6::heightmap

◆ large_cave

bool CavesV6::large_cave

Referenced by carveRoute(), makeCave(), and makeTunnel().

◆ large_cave_is_flat

bool CavesV6::large_cave_is_flat

Referenced by carveRoute(), and makeCave().

◆ main_direction

v3f CavesV6::main_direction

Referenced by makeCave(), and makeTunnel().

◆ max_tunnel_diameter

s16 CavesV6::max_tunnel_diameter

Referenced by makeCave(), and makeTunnel().

◆ min_tunnel_diameter

s16 CavesV6::min_tunnel_diameter

Referenced by makeCave(), and makeTunnel().

◆ ndef

const NodeDefManager* CavesV6::ndef

Referenced by CavesV6(), and carveRoute().

◆ node_max

v3s16 CavesV6::node_max

◆ node_min

v3s16 CavesV6::node_min

◆ of

v3s16 CavesV6::of

Referenced by carveRoute(), makeCave(), and makeTunnel().

◆ orp

v3f CavesV6::orp

Referenced by carveRoute(), makeCave(), and makeTunnel().

◆ part_max_length_rs

int CavesV6::part_max_length_rs

Referenced by makeCave(), and makeTunnel().

◆ ps

PseudoRandom* CavesV6::ps

Referenced by carveRoute(), makeCave(), and makeTunnel().

◆ ps2

PseudoRandom* CavesV6::ps2

Referenced by makeCave(), and makeTunnel().

◆ route_y_max

s16 CavesV6::route_y_max

Referenced by makeCave(), and makeTunnel().

◆ route_y_min

s16 CavesV6::route_y_min

Referenced by makeCave(), and makeTunnel().

◆ rs

s16 CavesV6::rs

Referenced by carveRoute(), and makeTunnel().

◆ tunnel_routepoints

u16 CavesV6::tunnel_routepoints

Referenced by makeCave().

◆ vm

MMVManip* CavesV6::vm

Referenced by carveRoute(), and makeCave().

◆ water_level

int CavesV6::water_level

◆ ystride

u16 CavesV6::ystride

The documentation for this class was generated from the following files: