diff --git a/voxel_buffer.cpp b/voxel_buffer.cpp index f125912..1f0f119 100644 --- a/voxel_buffer.cpp +++ b/voxel_buffer.cpp @@ -368,6 +368,7 @@ void VoxelBuffer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_voxel_iso", "x", "y", "z", "channel"), &VoxelBuffer::get_voxel_iso, DEFVAL(0)); ClassDB::bind_method(D_METHOD("fill", "value", "channel"), &VoxelBuffer::fill, DEFVAL(0)); + ClassDB::bind_method(D_METHOD("fill_iso", "value", "channel"), &VoxelBuffer::fill_iso, DEFVAL(0)); ClassDB::bind_method(D_METHOD("fill_area", "value", "min", "max", "channel"), &VoxelBuffer::_fill_area_binding, DEFVAL(0)); ClassDB::bind_method(D_METHOD("copy_from", "other", "channel"), &VoxelBuffer::_copy_from_binding, DEFVAL(0)); ClassDB::bind_method(D_METHOD("copy_from_area", "other", "src_min", "src_max", "dst_min", "channel"), &VoxelBuffer::_copy_from_area_binding, DEFVAL(0)); diff --git a/voxel_buffer.h b/voxel_buffer.h index 88afb81..e4a0204 100644 --- a/voxel_buffer.h +++ b/voxel_buffer.h @@ -65,6 +65,7 @@ public: _FORCE_INLINE_ void set_voxel(int value, const Vector3i pos, unsigned int channel_index = 0) { set_voxel(value, pos.x, pos.y, pos.z, channel_index); } void fill(int defval, unsigned int channel_index = 0); + _FORCE_INLINE_ void fill_iso(float value, unsigned int channel = 0) { fill(iso_to_byte(value), channel); } void fill_area(int defval, Vector3i min, Vector3i max, unsigned int channel_index = 0); bool is_uniform(unsigned int channel_index = 0) const;