#include <mapgen_fractal.h>
Public Member Functions | |
MapgenFractal (MapgenFractalParams *params, EmergeParams *emerge) | |
~MapgenFractal () | |
virtual MapgenType | getType () const |
virtual void | makeChunk (BlockMakeData *data) |
int | getSpawnLevelAtPoint (v2s16 p) |
bool | getFractalAtPoint (s16 x, s16 y, s16 z) |
s16 | generateTerrain () |
Public Member Functions inherited from MapgenBasic | |
MapgenBasic (int mapgenid, MapgenParams *params, EmergeParams *emerge) | |
virtual | ~MapgenBasic () |
virtual void | generateBiomes () |
virtual void | dustTopNodes () |
virtual void | generateCavesNoiseIntersection (s16 max_stone_y) |
virtual void | generateCavesRandomWalk (s16 max_stone_y, s16 large_cave_ymax) |
virtual bool | generateCavernsNoise (s16 max_stone_y) |
virtual void | generateDungeons (s16 max_stone_y) |
Public Member Functions inherited from Mapgen | |
Mapgen ()=default | |
Mapgen (int mapgenid, MapgenParams *params, EmergeParams *emerge) | |
virtual | ~Mapgen () |
DISABLE_CLASS_COPY (Mapgen) | |
s16 | findGroundLevel (v2s16 p2d, s16 ymin, s16 ymax) |
s16 | findLiquidSurface (v2s16 p2d, s16 ymin, s16 ymax) |
void | updateHeightmap (v3s16 nmin, v3s16 nmax) |
void | getSurfaces (v2s16 p2d, s16 ymin, s16 ymax, std::vector< s16 > &floors, std::vector< s16 > &ceilings) |
void | updateLiquid (UniqueQueue< v3s16 > *trans_liquid, v3s16 nmin, v3s16 nmax) |
void | setLighting (u8 light, v3s16 nmin, v3s16 nmax) |
Set light in entire area to fixed value. | |
void | calcLighting (v3s16 nmin, v3s16 nmax, v3s16 full_nmin, v3s16 full_nmax, bool propagate_shadow=true) |
Run all lighting calculations. | |
void | propagateSunlight (v3s16 nmin, v3s16 nmax, bool propagate_shadow) |
Spread sunlight from the area above downwards. | |
void | spreadLight (const v3s16 &nmin, const v3s16 &nmax) |
Spread light in the given area. | |
virtual int | getGroundLevelAtPoint (v2s16 p) |
Private Attributes | |
u16 | formula |
bool | julia |
u16 | fractal |
u16 | iterations |
v3f | scale |
v3f | offset |
float | slice_w |
float | julia_x |
float | julia_y |
float | julia_z |
float | julia_w |
Noise * | noise_seabed = nullptr |
MapgenFractal::MapgenFractal | ( | MapgenFractalParams * | params, |
EmergeParams * | emerge ) |
References MapgenBasic::cave_width, MapgenFractalParams::cave_width, Mapgen::csize, MapgenBasic::dungeon_ymax, MapgenFractalParams::dungeon_ymax, MapgenBasic::dungeon_ymin, MapgenFractalParams::dungeon_ymin, formula, fractal, MapgenFractalParams::fractal, iterations, MapgenFractalParams::iterations, julia, julia_w, MapgenFractalParams::julia_w, julia_x, MapgenFractalParams::julia_x, julia_y, MapgenFractalParams::julia_y, julia_z, MapgenFractalParams::julia_z, MapgenBasic::large_cave_depth, MapgenFractalParams::large_cave_depth, MapgenBasic::large_cave_flooded, MapgenFractalParams::large_cave_flooded, MapgenBasic::large_cave_num_max, MapgenFractalParams::large_cave_num_max, MapgenBasic::large_cave_num_min, MapgenFractalParams::large_cave_num_min, MGFRACTAL_TERRAIN, MapgenBasic::noise_filler_depth, noise_seabed, MapgenBasic::np_cave1, MapgenFractalParams::np_cave1, MapgenBasic::np_cave2, MapgenFractalParams::np_cave2, MapgenBasic::np_dungeons, MapgenFractalParams::np_dungeons, MapgenFractalParams::np_filler_depth, MapgenFractalParams::np_seabed, offset, MapgenFractalParams::offset, scale, MapgenFractalParams::scale, Mapgen::seed, slice_w, MapgenFractalParams::slice_w, MapgenBasic::small_cave_num_max, MapgenFractalParams::small_cave_num_max, MapgenBasic::small_cave_num_min, MapgenFractalParams::small_cave_num_min, MapgenBasic::spflags, and MapgenParams::spflags.
MapgenFractal::~MapgenFractal | ( | ) |
References MapgenBasic::noise_filler_depth, and noise_seabed.
s16 MapgenFractal::generateTerrain | ( | ) |
References MapgenBasic::c_stone, MapgenBasic::c_water_source, CONTENT_AIR, CONTENT_IGNORE, MapNode::getContent(), getFractalAtPoint(), VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_data, MAX_MAP_GENERATION_LIMIT, MGFRACTAL_TERRAIN, MapgenBasic::node_max, MapgenBasic::node_min, noise_seabed, Noise::perlinMap2D(), Noise::result, MapgenBasic::spflags, Mapgen::vm, Mapgen::water_level, and MapgenBasic::ystride.
Referenced by makeChunk().
bool MapgenFractal::getFractalAtPoint | ( | s16 | x, |
s16 | y, | ||
s16 | z ) |
References formula, iterations, julia, julia_w, julia_x, julia_y, julia_z, offset, scale, and slice_w.
Referenced by generateTerrain(), and getSpawnLevelAtPoint().
|
virtual |
Reimplemented from Mapgen.
References getFractalAtPoint(), MAX_MAP_GENERATION_LIMIT, MYMAX, noise_seabed, NoisePerlin2D(), Noise::np, p(), Mapgen::seed, and Mapgen::water_level.
|
inlinevirtual |
Reimplemented from Mapgen.
References MAPGEN_FRACTAL.
|
virtual |
Reimplemented from Mapgen.
References Mapgen::biomegen, BlockMakeData::blockpos_max, BlockMakeData::blockpos_min, Mapgen::blockseed, BiomeGen::calcBiomeNoise(), Mapgen::calcLighting(), EmergeParams::decomgr, MapgenBasic::dustTopNodes(), Mapgen::flags, MapgenBasic::full_node_max, MapgenBasic::full_node_min, MapgenBasic::generateBiomes(), MapgenBasic::generateCavesNoiseIntersection(), MapgenBasic::generateCavesRandomWalk(), MapgenBasic::generateDungeons(), generateTerrain(), Mapgen::generating, Mapgen::getBlockSeed2(), MapgenBasic::large_cave_depth, Mapgen::m_emerge, MAP_BLOCKSIZE, MG_BIOMES, MG_CAVES, MG_DECORATIONS, MG_DUNGEONS, MG_LIGHT, MG_ORES, MGFRACTAL_TERRAIN, Mapgen::ndef, MapgenBasic::node_max, MapgenBasic::node_min, BlockMakeData::nodedef, EmergeParams::oremgr, DecorationManager::placeAllDecos(), OreManager::placeAllOres(), Mapgen::seed, MapgenBasic::spflags, BlockMakeData::transforming_liquid, Mapgen::updateHeightmap(), Mapgen::updateLiquid(), Mapgen::vm, and BlockMakeData::vmanip.
|
private |
Referenced by MapgenFractal(), and getFractalAtPoint().
|
private |
Referenced by MapgenFractal().
|
private |
Referenced by MapgenFractal(), and getFractalAtPoint().
|
private |
Referenced by MapgenFractal(), and getFractalAtPoint().
|
private |
Referenced by MapgenFractal(), and getFractalAtPoint().
|
private |
Referenced by MapgenFractal(), and getFractalAtPoint().
|
private |
Referenced by MapgenFractal(), and getFractalAtPoint().
|
private |
Referenced by MapgenFractal(), and getFractalAtPoint().
|
private |
Referenced by MapgenFractal(), ~MapgenFractal(), generateTerrain(), and getSpawnLevelAtPoint().
|
private |
Referenced by MapgenFractal(), and getFractalAtPoint().
|
private |
Referenced by MapgenFractal(), and getFractalAtPoint().
|
private |
Referenced by MapgenFractal(), and getFractalAtPoint().