Moved simple generators under a simple/ folder
parent
791bdafff1
commit
2018625b34
1
SCsub
1
SCsub
|
@ -14,6 +14,7 @@ files = [
|
|||
"storage/*.cpp",
|
||||
"generators/*.cpp",
|
||||
"generators/graph/*.cpp",
|
||||
"generators/simple/*.cpp",
|
||||
"util/*.cpp",
|
||||
"terrain/*.cpp",
|
||||
"server/*.cpp",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef VOXEL_GENERATOR_FLAT_H
|
||||
#define VOXEL_GENERATOR_FLAT_H
|
||||
|
||||
#include "voxel_generator.h"
|
||||
#include "../voxel_generator.h"
|
||||
|
||||
class VoxelGeneratorFlat : public VoxelGenerator {
|
||||
GDCLASS(VoxelGeneratorFlat, VoxelGenerator)
|
|
@ -1,6 +1,6 @@
|
|||
#include "voxel_generator_heightmap.h"
|
||||
#include "../util/array_slice.h"
|
||||
#include "../util/fixed_array.h"
|
||||
#include "../../util/array_slice.h"
|
||||
#include "../../util/fixed_array.h"
|
||||
|
||||
VoxelGeneratorHeightmap::VoxelGeneratorHeightmap() {
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef VOXEL_GENERATOR_HEIGHTMAP_H
|
||||
#define VOXEL_GENERATOR_HEIGHTMAP_H
|
||||
|
||||
#include "../storage/voxel_buffer.h"
|
||||
#include "voxel_generator.h"
|
||||
#include "../../storage/voxel_buffer.h"
|
||||
#include "../voxel_generator.h"
|
||||
#include <core/image.h>
|
||||
|
||||
class VoxelGeneratorHeightmap : public VoxelGenerator {
|
|
@ -1,6 +1,6 @@
|
|||
#include "voxel_generator_image.h"
|
||||
#include "../util/array_slice.h"
|
||||
#include "../util/fixed_array.h"
|
||||
#include "../../util/array_slice.h"
|
||||
#include "../../util/fixed_array.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -48,11 +48,13 @@ void VoxelGeneratorImage::generate_block(VoxelBlockRequest &input) {
|
|||
image.lock();
|
||||
|
||||
if (_blur_enabled) {
|
||||
VoxelGeneratorHeightmap::generate(out_buffer,
|
||||
VoxelGeneratorHeightmap::generate(
|
||||
out_buffer,
|
||||
[&image](int x, int z) { return get_height_blurred(image, x, z); },
|
||||
input.origin_in_voxels, input.lod);
|
||||
} else {
|
||||
VoxelGeneratorHeightmap::generate(out_buffer,
|
||||
VoxelGeneratorHeightmap::generate(
|
||||
out_buffer,
|
||||
[&image](int x, int z) { return get_height_repeat(image, x, z); },
|
||||
input.origin_in_voxels, input.lod);
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef VOXEL_GENERATOR_NOISE_H
|
||||
#define VOXEL_GENERATOR_NOISE_H
|
||||
|
||||
#include "voxel_generator.h"
|
||||
#include "../voxel_generator.h"
|
||||
#include <modules/opensimplex/open_simplex_noise.h>
|
||||
|
||||
class VoxelGeneratorNoise : public VoxelGenerator {
|
|
@ -1,5 +1,5 @@
|
|||
#include "voxel_generator_waves.h"
|
||||
#include "../util/utility.h"
|
||||
#include "../../util/utility.h"
|
||||
#include <cmath>
|
||||
|
||||
VoxelGeneratorWaves::VoxelGeneratorWaves() {
|
||||
|
@ -8,14 +8,14 @@ VoxelGeneratorWaves::VoxelGeneratorWaves() {
|
|||
}
|
||||
|
||||
void VoxelGeneratorWaves::generate_block(VoxelBlockRequest &input) {
|
||||
|
||||
VoxelBuffer &out_buffer = **input.voxel_buffer;
|
||||
const Vector2 freq(
|
||||
Math_PI / static_cast<float>(_pattern_size.x),
|
||||
Math_PI / static_cast<float>(_pattern_size.y));
|
||||
const Vector2 offset = _pattern_offset;
|
||||
|
||||
VoxelGeneratorHeightmap::generate(out_buffer,
|
||||
VoxelGeneratorHeightmap::generate(
|
||||
out_buffer,
|
||||
[freq, offset](int x, int z) {
|
||||
return 0.5 + 0.25 * (Math::cos((x + offset.x) * freq.x) + Math::sin((z + offset.y) * freq.y));
|
||||
},
|
|
@ -6,13 +6,13 @@
|
|||
#include "editor/terrain/voxel_terrain_editor_plugin.h"
|
||||
#include "generators/graph/voxel_generator_graph.h"
|
||||
#include "generators/graph/voxel_graph_node_db.h"
|
||||
#include "generators/voxel_generator_flat.h"
|
||||
#include "generators/voxel_generator_heightmap.h"
|
||||
#include "generators/voxel_generator_image.h"
|
||||
#include "generators/voxel_generator_noise.h"
|
||||
#include "generators/voxel_generator_noise_2d.h"
|
||||
#include "generators/simple/voxel_generator_flat.h"
|
||||
#include "generators/simple/voxel_generator_heightmap.h"
|
||||
#include "generators/simple/voxel_generator_image.h"
|
||||
#include "generators/simple/voxel_generator_noise.h"
|
||||
#include "generators/simple/voxel_generator_noise_2d.h"
|
||||
#include "generators/simple/voxel_generator_waves.h"
|
||||
#include "generators/voxel_generator_script.h"
|
||||
#include "generators/voxel_generator_waves.h"
|
||||
#include "meshers/blocky/voxel_library.h"
|
||||
#include "meshers/blocky/voxel_mesher_blocky.h"
|
||||
#include "meshers/cubes/voxel_mesher_cubes.h"
|
||||
|
|
Loading…
Reference in New Issue