File tree 1 file changed +23
-1
lines changed
1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -3746,7 +3746,7 @@ Methods
3746
3746
-----------
3747
3747
3748
3748
A helper class for voxel areas.
3749
- It can be created via `VoxelArea:new{MinEdge= pmin, MaxEdge= pmax}`.
3749
+ It can be created via `VoxelArea:new{MinEdge = pmin, MaxEdge = pmax}`.
3750
3750
The coordinates are *inclusive*, like most other things in Minetest.
3751
3751
3752
3752
### Methods
@@ -3777,6 +3777,28 @@ The coordinates are *inclusive*, like most other things in Minetest.
3777
3777
`[z [y [x]]]`.
3778
3778
* `iterp(minp, maxp)`: same as above, except takes a vector
3779
3779
3780
+ ### Y stride and z stride of a flat array
3781
+
3782
+ For a particular position in a voxel area, whose flat array index is known,
3783
+ it is often useful to know the index of a neighboring or nearby position.
3784
+ The table below shows the changes of index required for 1 node movements along
3785
+ the axes in a voxel area:
3786
+
3787
+ Movement Change of index
3788
+ +x +1
3789
+ -x -1
3790
+ +y +ystride
3791
+ -y -ystride
3792
+ +z +zstride
3793
+ -z -zstride
3794
+
3795
+ If, for example:
3796
+
3797
+ local area = VoxelArea:new{MinEdge = emin, MaxEdge = emax}
3798
+
3799
+ The values of `ystride` and `zstride` can be obtained using `area.ystride` and
3800
+ `area.zstride`.
3801
+
3780
3802
3781
3803
3782
3804
You can’t perform that action at this time.
0 commit comments