Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
MapgenV7 Class Reference

#include <mapgen_v7.h>

+ Inheritance diagram for MapgenV7:
+ Collaboration diagram for MapgenV7:

Public Member Functions

 MapgenV7 (MapgenV7Params *params, EmergeParams *emerge)
 
 ~MapgenV7 ()
 
virtual MapgenType getType () const
 
virtual void makeChunk (BlockMakeData *data)
 
int getSpawnLevelAtPoint (v2s16 p)
 
float baseTerrainLevelAtPoint (s16 x, s16 z)
 
float baseTerrainLevelFromMap (int index)
 
bool getMountainTerrainAtPoint (s16 x, s16 y, s16 z)
 
bool getMountainTerrainFromMap (int idx_xyz, int idx_xz, s16 y)
 
bool getRiverChannelFromMap (int idx_xyz, int idx_xz, s16 y)
 
bool getFloatlandTerrainFromMap (int idx_xyz, float float_offset)
 
int 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

s16 mount_zero_level
 
s16 floatland_ymin
 
s16 floatland_ymax
 
s16 floatland_taper
 
float float_taper_exp
 
float floatland_density
 
s16 floatland_ywater
 
float * float_offset_cache = nullptr
 
Noisenoise_terrain_base
 
Noisenoise_terrain_alt
 
Noisenoise_terrain_persist
 
Noisenoise_height_select
 
Noisenoise_mount_height
 
Noisenoise_ridge_uwater
 
Noisenoise_mountain
 
Noisenoise_ridge
 
Noisenoise_floatland
 

Additional Inherited Members

- Static Public Member Functions inherited from Mapgen
static u32 getBlockSeed (v3s16 p, s32 seed)
 
static u32 getBlockSeed2 (v3s16 p, s32 seed)
 
static MapgenType getMapgenType (const std::string &mgname)
 
static const char * getMapgenName (MapgenType mgtype)
 
static MapgencreateMapgen (MapgenType mgtype, MapgenParams *params, EmergeParams *emerge)
 
static MapgenParamscreateMapgenParams (MapgenType mgtype)
 
static void getMapgenNames (std::vector< const char * > *mgnames, bool include_hidden)
 
static void setDefaultSettings (Settings *settings)
 
- Public Attributes inherited from Mapgen
s32 seed = 0
 
int water_level = 0
 
int mapgen_limit = 0
 
u32 flags = 0
 
bool generating = false
 
int id = -1
 
MMVManipvm = nullptr
 
EmergeParamsm_emerge = nullptr
 
const NodeDefManagerndef = nullptr
 
u32 blockseed
 
s16 * heightmap = nullptr
 
biome_tbiomemap = nullptr
 
v3s16 csize
 
BiomeGenbiomegen = nullptr
 
GenerateNotifier gennotify
 
- Protected Attributes inherited from MapgenBasic
BiomeManagerm_bmgr
 
Noisenoise_filler_depth
 
v3s16 node_min
 
v3s16 node_max
 
v3s16 full_node_min
 
v3s16 full_node_max
 
content_t c_stone
 
content_t c_water_source
 
content_t c_river_water_source
 
content_t c_lava_source
 
content_t c_cobble
 
int ystride
 
int zstride
 
int zstride_1d
 
int zstride_1u1d
 
u32 spflags
 
NoiseParams np_cave1
 
NoiseParams np_cave2
 
NoiseParams np_cavern
 
NoiseParams np_dungeons
 
float cave_width
 
float cavern_limit
 
float cavern_taper
 
float cavern_threshold
 
int small_cave_num_min
 
int small_cave_num_max
 
int large_cave_num_min
 
int large_cave_num_max
 
float large_cave_flooded
 
s16 large_cave_depth
 
s16 dungeon_ymin
 
s16 dungeon_ymax
 

Constructor & Destructor Documentation

◆ MapgenV7()

MapgenV7::MapgenV7 ( MapgenV7Params * params,
EmergeParams * emerge )

References MapgenBasic::cave_width, MapgenV7Params::cave_width, MapgenBasic::cavern_limit, MapgenV7Params::cavern_limit, MapgenBasic::cavern_taper, MapgenV7Params::cavern_taper, MapgenBasic::cavern_threshold, MapgenV7Params::cavern_threshold, Mapgen::csize, MapgenBasic::dungeon_ymax, MapgenV7Params::dungeon_ymax, MapgenBasic::dungeon_ymin, MapgenV7Params::dungeon_ymin, float_offset_cache, float_taper_exp, MapgenV7Params::float_taper_exp, floatland_density, MapgenV7Params::floatland_density, floatland_taper, MapgenV7Params::floatland_taper, floatland_ymax, MapgenV7Params::floatland_ymax, floatland_ymin, MapgenV7Params::floatland_ymin, floatland_ywater, MapgenV7Params::floatland_ywater, MapgenBasic::large_cave_depth, MapgenV7Params::large_cave_depth, MapgenBasic::large_cave_flooded, MapgenV7Params::large_cave_flooded, MapgenBasic::large_cave_num_max, MapgenV7Params::large_cave_num_max, MapgenBasic::large_cave_num_min, MapgenV7Params::large_cave_num_min, MGV7_FLOATLANDS, MGV7_MOUNTAINS, MGV7_RIDGES, mount_zero_level, MapgenV7Params::mount_zero_level, MapgenBasic::noise_filler_depth, noise_floatland, noise_height_select, noise_mount_height, noise_mountain, noise_ridge, noise_ridge_uwater, noise_terrain_alt, noise_terrain_base, noise_terrain_persist, MapgenBasic::np_cave1, MapgenV7Params::np_cave1, MapgenBasic::np_cave2, MapgenV7Params::np_cave2, MapgenBasic::np_cavern, MapgenV7Params::np_cavern, MapgenBasic::np_dungeons, MapgenV7Params::np_dungeons, MapgenV7Params::np_filler_depth, MapgenV7Params::np_floatland, MapgenV7Params::np_height_select, MapgenV7Params::np_mount_height, MapgenV7Params::np_mountain, MapgenV7Params::np_ridge, MapgenV7Params::np_ridge_uwater, MapgenV7Params::np_terrain_alt, MapgenV7Params::np_terrain_base, MapgenV7Params::np_terrain_persist, Mapgen::seed, MapgenBasic::small_cave_num_max, MapgenV7Params::small_cave_num_max, MapgenBasic::small_cave_num_min, MapgenV7Params::small_cave_num_min, MapgenBasic::spflags, and MapgenParams::spflags.

◆ ~MapgenV7()

Member Function Documentation

◆ baseTerrainLevelAtPoint()

float MapgenV7::baseTerrainLevelAtPoint ( s16 x,
s16 z )

References noise_height_select, noise_terrain_alt, noise_terrain_base, noise_terrain_persist, NoisePerlin2D(), Noise::np, NoiseParams::persist, rangelim, and Mapgen::seed.

Referenced by getSpawnLevelAtPoint().

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

◆ baseTerrainLevelFromMap()

float MapgenV7::baseTerrainLevelFromMap ( int index)

References noise_height_select, noise_terrain_alt, noise_terrain_base, rangelim, and Noise::result.

Referenced by generateTerrain().

+ Here is the caller graph for this function:

◆ generateTerrain()

◆ getFloatlandTerrainFromMap()

bool MapgenV7::getFloatlandTerrainFromMap ( int idx_xyz,
float float_offset )

References floatland_density, noise_floatland, and Noise::result.

Referenced by generateTerrain().

+ Here is the caller graph for this function:

◆ getMountainTerrainAtPoint()

bool MapgenV7::getMountainTerrainAtPoint ( s16 x,
s16 y,
s16 z )

References mount_zero_level, noise_mount_height, noise_mountain, NoisePerlin2D(), NoisePerlin3D(), Noise::np, and Mapgen::seed.

Referenced by getSpawnLevelAtPoint().

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

◆ getMountainTerrainFromMap()

bool MapgenV7::getMountainTerrainFromMap ( int idx_xyz,
int idx_xz,
s16 y )

References mount_zero_level, noise_mount_height, noise_mountain, and Noise::result.

Referenced by generateTerrain().

+ Here is the caller graph for this function:

◆ getRiverChannelFromMap()

bool MapgenV7::getRiverChannelFromMap ( int idx_xyz,
int idx_xz,
s16 y )

References noise_ridge, noise_ridge_uwater, Noise::result, and Mapgen::water_level.

Referenced by generateTerrain().

+ Here is the caller graph for this function:

◆ getSpawnLevelAtPoint()

int MapgenV7::getSpawnLevelAtPoint ( v2s16 p)
virtual

Reimplemented from Mapgen.

References baseTerrainLevelAtPoint(), getMountainTerrainAtPoint(), MAX_MAP_GENERATION_LIMIT, MGV7_MOUNTAINS, MGV7_RIDGES, noise_ridge_uwater, noise_terrain_alt, noise_terrain_base, NoisePerlin2D(), Noise::np, NoiseParams::offset, p(), Mapgen::seed, MapgenBasic::spflags, and Mapgen::water_level.

+ Here is the call graph for this function:

◆ getType()

virtual MapgenType MapgenV7::getType ( ) const
inlinevirtual

Reimplemented from Mapgen.

References MAPGEN_V7.

◆ makeChunk()

Member Data Documentation

◆ float_offset_cache

float* MapgenV7::float_offset_cache = nullptr
private

◆ float_taper_exp

float MapgenV7::float_taper_exp
private

Referenced by MapgenV7(), and generateTerrain().

◆ floatland_density

float MapgenV7::floatland_density
private

◆ floatland_taper

s16 MapgenV7::floatland_taper
private

Referenced by MapgenV7(), and generateTerrain().

◆ floatland_ymax

s16 MapgenV7::floatland_ymax
private

◆ floatland_ymin

s16 MapgenV7::floatland_ymin
private

◆ floatland_ywater

s16 MapgenV7::floatland_ywater
private

Referenced by MapgenV7(), and generateTerrain().

◆ mount_zero_level

s16 MapgenV7::mount_zero_level
private

◆ noise_floatland

Noise* MapgenV7::noise_floatland
private

◆ noise_height_select

Noise* MapgenV7::noise_height_select
private

◆ noise_mount_height

Noise* MapgenV7::noise_mount_height
private

◆ noise_mountain

◆ noise_ridge

Noise* MapgenV7::noise_ridge
private

◆ noise_ridge_uwater

Noise* MapgenV7::noise_ridge_uwater
private

◆ noise_terrain_alt

◆ noise_terrain_base

◆ noise_terrain_persist

Noise* MapgenV7::noise_terrain_persist
private

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