mirror of
https://github.com/Relintai/godot_voxel.git
synced 2024-11-19 02:47:18 +01:00
Added get_size() as Vector3 to VoxelBuffer
This commit is contained in:
parent
10c2e69a0c
commit
6d872160ab
@ -287,6 +287,7 @@ void VoxelBuffer::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("create", "sx", "sy", "sz"), &VoxelBuffer::create);
|
ClassDB::bind_method(D_METHOD("create", "sx", "sy", "sz"), &VoxelBuffer::create);
|
||||||
ClassDB::bind_method(D_METHOD("clear"), &VoxelBuffer::clear);
|
ClassDB::bind_method(D_METHOD("clear"), &VoxelBuffer::clear);
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("get_size"), &VoxelBuffer::_get_size_binding);
|
||||||
ClassDB::bind_method(D_METHOD("get_size_x"), &VoxelBuffer::get_size_x);
|
ClassDB::bind_method(D_METHOD("get_size_x"), &VoxelBuffer::get_size_x);
|
||||||
ClassDB::bind_method(D_METHOD("get_size_y"), &VoxelBuffer::get_size_y);
|
ClassDB::bind_method(D_METHOD("get_size_y"), &VoxelBuffer::get_size_y);
|
||||||
ClassDB::bind_method(D_METHOD("get_size_z"), &VoxelBuffer::get_size_z);
|
ClassDB::bind_method(D_METHOD("get_size_z"), &VoxelBuffer::get_size_z);
|
||||||
|
@ -112,6 +112,7 @@ protected:
|
|||||||
_FORCE_INLINE_ int get_size_x() const { return _size.x; }
|
_FORCE_INLINE_ int get_size_x() const { return _size.x; }
|
||||||
_FORCE_INLINE_ int get_size_y() const { return _size.y; }
|
_FORCE_INLINE_ int get_size_y() const { return _size.y; }
|
||||||
_FORCE_INLINE_ int get_size_z() const { return _size.z; }
|
_FORCE_INLINE_ int get_size_z() const { return _size.z; }
|
||||||
|
_FORCE_INLINE_ Vector3 _get_size_binding() const { return _size.to_vec3(); }
|
||||||
|
|
||||||
_FORCE_INLINE_ int _get_voxel_binding(int x, int y, int z, unsigned int channel) const { return get_voxel(x, y, z, channel); }
|
_FORCE_INLINE_ int _get_voxel_binding(int x, int y, int z, unsigned int channel) const { return get_voxel(x, y, z, channel); }
|
||||||
_FORCE_INLINE_ void _set_voxel_binding(int value, int x, int y, int z, unsigned int channel) { set_voxel(value, x, y, z, channel); }
|
_FORCE_INLINE_ void _set_voxel_binding(int value, int x, int y, int z, unsigned int channel) { set_voxel(value, x, y, z, channel); }
|
||||||
|
Loading…
Reference in New Issue
Block a user