2020-09-12 21:10:05 +01:00
|
|
|
#ifndef VOX_LOADER_H
|
|
|
|
#define VOX_LOADER_H
|
|
|
|
|
2021-07-31 18:48:47 +01:00
|
|
|
#include <core/reference.h>
|
2020-09-14 19:33:02 +01:00
|
|
|
|
|
|
|
class VoxelBuffer;
|
2021-07-31 18:48:47 +01:00
|
|
|
class VoxelColorPalette;
|
2020-09-12 21:10:05 +01:00
|
|
|
|
|
|
|
// Simple loader for MagicaVoxel
|
|
|
|
class VoxelVoxLoader : public Reference {
|
|
|
|
GDCLASS(VoxelVoxLoader, Reference);
|
|
|
|
|
|
|
|
public:
|
2021-09-26 04:14:50 +01:00
|
|
|
Error load_from_file(String fpath, Ref<VoxelBuffer> p_voxels, Ref<VoxelColorPalette> palette);
|
2020-12-18 21:20:00 +00:00
|
|
|
// TODO Have chunked loading for better memory usage
|
2021-01-28 22:02:49 +00:00
|
|
|
// TODO Saving
|
2020-09-12 21:10:05 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
static void _bind_methods();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VOX_LOADER_H
|