mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-17 05:22:35 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ce594753e | |||
| ae44083cf2 |
@@ -68,11 +68,17 @@ module CyberarmEngine
|
|||||||
other.max.x <= max.x && other.max.y <= max.y && other.max.z <= max.z
|
other.max.x <= max.x && other.max.y <= max.y && other.max.z <= max.z
|
||||||
end
|
end
|
||||||
|
|
||||||
# returns whether the vector is inside of the bounding box
|
# returns whether the 3D vector is inside of the bounding box
|
||||||
|
def inside?(vector)
|
||||||
|
(vector.x.between?(@min.x, @max.x) || vector.x.between?(@max.x, @min.x)) &&
|
||||||
|
(vector.y.between?(@min.y, @max.y) || vector.y.between?(@max.y, @min.y)) &&
|
||||||
|
(vector.z.between?(@min.z, @max.z) || vector.z.between?(@max.z, @min.z))
|
||||||
|
end
|
||||||
|
|
||||||
|
# returns whether the 2D vector is inside of the bounding box
|
||||||
def point?(vector)
|
def point?(vector)
|
||||||
vector.x.between?(@min.x, @max.x) &&
|
(vector.x.between?(@min.x, @max.x) || vector.x.between?(@max.x, @min.x)) &&
|
||||||
vector.y.between?(@min.y, @max.y) &&
|
(vector.y.between?(@min.y, @max.y) || vector.y.between?(@max.y, @min.y))
|
||||||
vector.z.between?(@min.z, @max.z)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def volume
|
def volume
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ module CyberarmEngine
|
|||||||
Button: { # < Label
|
Button: { # < Label
|
||||||
margin: 1,
|
margin: 1,
|
||||||
padding: 4,
|
padding: 4,
|
||||||
border_thickness: 4,
|
border_thickness: 1,
|
||||||
border_color: ["ffd59674".hex, "ffff8746".hex],
|
border_color: ["ffd59674".hex, "ffff8746".hex],
|
||||||
border_radius: 0,
|
border_radius: 0,
|
||||||
background: ["ffc75e61".to_i(16), "ffe26623".to_i(16)],
|
background: ["ffc75e61".to_i(16), "ffe26623".to_i(16)],
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module CyberarmEngine
|
module CyberarmEngine
|
||||||
NAME = "InDev"
|
NAME = "InDev"
|
||||||
VERSION = "0.11.0"
|
VERSION = "0.11.1"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user