2019-11-10 02:33:02 +01:00
|
|
|
#ifndef GROUND_CLUTTER_H
|
|
|
|
#define GROUND_CLUTTER_H
|
|
|
|
|
|
|
|
#include "core/resource.h"
|
|
|
|
|
2019-11-10 13:42:59 +01:00
|
|
|
#include "../../texture_packer/texture_packer.h"
|
2020-01-09 04:29:05 +01:00
|
|
|
#include "../meshers/voxel_mesher.h"
|
2019-11-10 13:42:59 +01:00
|
|
|
|
|
|
|
class VoxelChunk;
|
|
|
|
class VoxelMesher;
|
|
|
|
|
2019-11-10 02:33:02 +01:00
|
|
|
class GroundClutter : public Resource {
|
|
|
|
GDCLASS(GroundClutter, Resource);
|
|
|
|
|
|
|
|
public:
|
2019-11-10 13:42:59 +01:00
|
|
|
bool should_spawn(VoxelChunk *chunk, int x, int y, int z);
|
|
|
|
bool should_spawn_bind(Node *chunk, int x, int y, int z);
|
|
|
|
|
|
|
|
void add_meshes_to(Ref<VoxelMesher> mesher, VoxelChunk *chunk, int x, int y, int z);
|
|
|
|
void add_meshes_to_bind(Ref<VoxelMesher> mesher, Node *chunk, int x, int y, int z);
|
|
|
|
void add_textures_to(Ref<TexturePacker> packer);
|
|
|
|
|
2019-11-10 02:33:02 +01:00
|
|
|
GroundClutter();
|
|
|
|
~GroundClutter();
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void _bind_methods();
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|