Add VoxelBuffer::fill_iso()

This commit is contained in:
Marc Gilleron 2019-04-22 20:14:25 +01:00
parent 0808bf2691
commit 869b921ce8
2 changed files with 2 additions and 0 deletions

View File

@ -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));

View File

@ -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;