godot_voxel/streams/vox_loader.h
Marc Gilleron 922f361cb0 Made it compile in Godot 4
- Made a bunch of changes to comply with Godot 4 API
- Use Godot's Vector3i and add the missing stuff with helper functions
- Transvoxel uses custom attributes API, the old way would not work
- Wrap MeshOptimizer in a unique namespace (see build script why)
- Added clang-format file for the module as some rules now differ
- Prevent thirdparty code and lookup tables from being clang-formatted
- Very likely full of runtime bugs that need fixing
2021-12-13 21:38:10 +00:00

23 lines
482 B
C++

#ifndef VOX_LOADER_H
#define VOX_LOADER_H
#include <core/object/ref_counted.h>
class VoxelBuffer;
class VoxelColorPalette;
// Simple loader for MagicaVoxel
class VoxelVoxLoader : public RefCounted {
GDCLASS(VoxelVoxLoader, RefCounted);
public:
Error load_from_file(String fpath, Ref<VoxelBuffer> p_voxels, Ref<VoxelColorPalette> palette);
// TODO Have chunked loading for better memory usage
// TODO Saving
private:
static void _bind_methods();
};
#endif // VOX_LOADER_H