2020-09-12 13:10:05 -07:00
|
|
|
#ifndef VOX_LOADER_H
|
|
|
|
#define VOX_LOADER_H
|
|
|
|
|
2021-12-13 13:38:10 -08:00
|
|
|
#include <core/object/ref_counted.h>
|
2020-09-14 11:33:02 -07:00
|
|
|
|
2022-01-09 14:13:10 -08:00
|
|
|
namespace zylann::voxel {
|
|
|
|
|
2020-09-14 11:33:02 -07:00
|
|
|
class VoxelBuffer;
|
2021-07-31 10:48:47 -07:00
|
|
|
class VoxelColorPalette;
|
2020-09-12 13:10:05 -07:00
|
|
|
|
|
|
|
// Simple loader for MagicaVoxel
|
2021-12-13 13:38:10 -08:00
|
|
|
class VoxelVoxLoader : public RefCounted {
|
|
|
|
GDCLASS(VoxelVoxLoader, RefCounted);
|
2020-09-12 13:10:05 -07:00
|
|
|
|
|
|
|
public:
|
2021-09-25 20:14:50 -07:00
|
|
|
Error load_from_file(String fpath, Ref<VoxelBuffer> p_voxels, Ref<VoxelColorPalette> palette);
|
2020-12-18 13:20:00 -08:00
|
|
|
// TODO Have chunked loading for better memory usage
|
2021-01-28 14:02:49 -08:00
|
|
|
// TODO Saving
|
2020-09-12 13:10:05 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
static void _bind_methods();
|
|
|
|
};
|
|
|
|
|
2022-01-09 14:13:10 -08:00
|
|
|
} // namespace zylann::voxel
|
|
|
|
|
2020-09-12 13:10:05 -07:00
|
|
|
#endif // VOX_LOADER_H
|