We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9126823 commit 0003fc8Copy full SHA for 0003fc8
builtin/voxelarea.lua
@@ -44,3 +44,19 @@ function VoxelArea:indexp(p)
44
return math.floor(i)
45
end
46
47
+function VoxelArea:contains(x, y, z)
48
+ return (x >= self.MinEdge.x) and (x <= self.MaxEdge.x) and
49
+ (y >= self.MinEdge.y) and (y <= self.MaxEdge.y) and
50
+ (z >= self.MinEdge.z) and (z <= self.MaxEdge.z)
51
+end
52
+
53
+function VoxelArea:containsp(p)
54
+ return (p.x >= self.MinEdge.x) and (p.x <= self.MaxEdge.x) and
55
+ (p.y >= self.MinEdge.y) and (p.y <= self.MaxEdge.y) and
56
+ (p.z >= self.MinEdge.z) and (p.z <= self.MaxEdge.z)
57
58
59
+function VoxelArea:containsi(i)
60
+ return (i >= 1) and (i <= self:getVolume())
61
62
0 commit comments