2020-10-31 15:11:25 -07:00
|
|
|
#ifndef VOXEL_GENERATOR_SCRIPT_H
|
|
|
|
#define VOXEL_GENERATOR_SCRIPT_H
|
|
|
|
|
|
|
|
#include "voxel_generator.h"
|
|
|
|
|
2021-01-16 05:41:46 -08:00
|
|
|
// Generator based on a script, like GDScript, C# or NativeScript.
|
|
|
|
// The script is expected to properly handle multithreading.
|
2020-10-31 15:11:25 -07:00
|
|
|
class VoxelGeneratorScript : public VoxelGenerator {
|
|
|
|
GDCLASS(VoxelGeneratorScript, VoxelGenerator)
|
|
|
|
public:
|
|
|
|
VoxelGeneratorScript();
|
|
|
|
|
|
|
|
void generate_block(VoxelBlockRequest &input) override;
|
|
|
|
int get_used_channels_mask() const override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void _bind_methods();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VOXEL_GENERATOR_SCRIPT_H
|