922f361cb0
- 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
23 lines
482 B
C++
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
|