diff --git a/meshers/voxel_mesher.cpp b/meshers/voxel_mesher.cpp index 78c2a03..a995a34 100644 --- a/meshers/voxel_mesher.cpp +++ b/meshers/voxel_mesher.cpp @@ -112,6 +112,13 @@ void VoxelMesher::set_texture_scale(const int value) { _texture_scale = value; } +int VoxelMesher::get_lod_index() const { + return _lod_index; +} +void VoxelMesher::set_lod_index(const int value) { + _lod_index = value; +} + Ref VoxelMesher::get_library() { return _library; } @@ -918,6 +925,7 @@ VoxelMesher::VoxelMesher(const Ref &library) { _format = 0; _texture_scale = 1; + _lod_index = 0; } VoxelMesher::VoxelMesher() { @@ -930,6 +938,7 @@ VoxelMesher::VoxelMesher() { _channel_index_type = 0; _channel_index_isolevel = 0; _texture_scale = 1; + _lod_index = 0; } VoxelMesher::~VoxelMesher() { @@ -969,6 +978,10 @@ void VoxelMesher::_bind_methods() { ClassDB::bind_method(D_METHOD("set_texture_scale", "value"), &VoxelMesher::set_texture_scale); ADD_PROPERTY(PropertyInfo(Variant::INT, "texture_scale"), "set_texture_scale", "get_texture_scale"); + ClassDB::bind_method(D_METHOD("get_lod_index"), &VoxelMesher::get_lod_index); + ClassDB::bind_method(D_METHOD("set_lod_index", "value"), &VoxelMesher::set_lod_index); + ADD_PROPERTY(PropertyInfo(Variant::INT, "lod_index"), "set_lod_index", "get_lod_index"); + ClassDB::bind_method(D_METHOD("get_library"), &VoxelMesher::get_library); ClassDB::bind_method(D_METHOD("set_library", "value"), &VoxelMesher::set_library); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "library", PROPERTY_HINT_RESOURCE_TYPE, "VoxelLibrary"), "set_library", "get_library"); diff --git a/meshers/voxel_mesher.h b/meshers/voxel_mesher.h index 4bd3b39..6c3d78a 100644 --- a/meshers/voxel_mesher.h +++ b/meshers/voxel_mesher.h @@ -113,6 +113,9 @@ public: int get_texture_scale() const; void set_texture_scale(const int value); + int get_lod_index() const; + void set_lod_index(const int value); + Ref get_library(); void set_library(const Ref &library); @@ -214,6 +217,7 @@ protected: int _format; int _texture_scale; + int _lod_index; PoolVector _vertices; PoolVector _indices;