godot_voxel/streams/vox_loader.h

30 lines
561 B
C
Raw Normal View History

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