mirror of
https://github.com/Relintai/godot_voxel.git
synced 2024-11-11 20:35:08 +01:00
25 lines
516 B
C++
25 lines
516 B
C++
#ifndef VOXEL_MESHER_H
|
|
#define VOXEL_MESHER_H
|
|
|
|
#include "../voxel_buffer.h"
|
|
#include <scene/resources/mesh.h>
|
|
|
|
class VoxelMesher : public Reference {
|
|
GDCLASS(VoxelMesher, Reference)
|
|
public:
|
|
struct Output {
|
|
Vector<Array> surfaces;
|
|
Mesh::PrimitiveType primitive_type;
|
|
};
|
|
|
|
virtual void build(Output &output, const VoxelBuffer &voxels, int padding);
|
|
virtual int get_minimum_padding() const;
|
|
|
|
Ref<Mesh> build_mesh(Ref<VoxelBuffer> voxels);
|
|
|
|
protected:
|
|
static void _bind_methods();
|
|
};
|
|
|
|
#endif // VOXEL_MESHER_H
|