2020-02-17 22:05:16 +00:00
|
|
|
#ifndef VOXEL_GENERATOR_WAVES_H
|
|
|
|
#define VOXEL_GENERATOR_WAVES_H
|
|
|
|
|
|
|
|
#include "voxel_generator_heightmap.h"
|
|
|
|
|
2022-01-09 22:13:10 +00:00
|
|
|
namespace zylann::voxel {
|
|
|
|
|
2020-02-17 22:05:16 +00:00
|
|
|
class VoxelGeneratorWaves : public VoxelGeneratorHeightmap {
|
|
|
|
GDCLASS(VoxelGeneratorWaves, VoxelGeneratorHeightmap)
|
|
|
|
|
|
|
|
public:
|
|
|
|
VoxelGeneratorWaves();
|
2021-01-16 23:19:54 +00:00
|
|
|
~VoxelGeneratorWaves();
|
2020-02-17 22:05:16 +00:00
|
|
|
|
2022-02-12 23:37:02 +00:00
|
|
|
Result generate_block(VoxelGenerator::VoxelQueryData &input) override;
|
2020-02-17 22:05:16 +00:00
|
|
|
|
2021-01-16 13:41:46 +00:00
|
|
|
Vector2 get_pattern_size() const;
|
2020-02-17 22:05:16 +00:00
|
|
|
void set_pattern_size(Vector2 size);
|
|
|
|
|
2021-01-16 13:41:46 +00:00
|
|
|
Vector2 get_pattern_offset() const;
|
2020-02-17 22:05:16 +00:00
|
|
|
void set_pattern_offset(Vector2 offset);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void _bind_methods();
|
|
|
|
|
2021-01-16 13:41:46 +00:00
|
|
|
struct Parameters {
|
|
|
|
Vector2 pattern_size;
|
|
|
|
Vector2 pattern_offset;
|
|
|
|
};
|
|
|
|
|
|
|
|
Parameters _parameters;
|
2021-02-19 01:30:22 +00:00
|
|
|
RWLock _parameters_lock;
|
2020-02-17 22:05:16 +00:00
|
|
|
};
|
|
|
|
|
2022-01-09 22:13:10 +00:00
|
|
|
} // namespace zylann::voxel
|
|
|
|
|
2020-02-17 22:05:16 +00:00
|
|
|
#endif // VOXEL_GENERATOR_WAVES_H
|