mirror of
https://github.com/Relintai/voxelman.git
synced 2024-11-12 10:15:12 +01:00
Port lod index parameter to VexelMesher from Terraman.
This commit is contained in:
parent
96d00c4068
commit
9940dedb88
@ -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<VoxelLibrary> VoxelMesher::get_library() {
|
||||
return _library;
|
||||
}
|
||||
@ -918,6 +925,7 @@ VoxelMesher::VoxelMesher(const Ref<VoxelLibrary> &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");
|
||||
|
@ -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<VoxelLibrary> get_library();
|
||||
void set_library(const Ref<VoxelLibrary> &library);
|
||||
|
||||
@ -214,6 +217,7 @@ protected:
|
||||
int _format;
|
||||
|
||||
int _texture_scale;
|
||||
int _lod_index;
|
||||
|
||||
PoolVector<Vertex> _vertices;
|
||||
PoolVector<int> _indices;
|
||||
|
Loading…
Reference in New Issue
Block a user