#ifndef VOXEL_MESH_BUILDER #define VOXEL_MESH_BUILDER #include #include #include #include "voxel.h" #include "voxel_buffer.h" class VoxelLibrary; class VoxelMeshBuilder : public Reference { OBJ_TYPE(VoxelMeshBuilder, Reference); public: static const unsigned int MAX_MATERIALS = 8; // Arbitrary. Tweak if needed. private: Ref _library; Ref _materials[MAX_MATERIALS]; SurfaceTool _surface_tool[MAX_MATERIALS]; public: VoxelMeshBuilder(); void set_material(Ref material, unsigned int id); void set_library(Ref library); Ref build(Ref buffer_ref); protected: static void _bind_methods(); }; #endif // VOXEL_MESH_BUILDER