Class: Raylib::BoundingBox
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::BoundingBox
- Defined in:
- lib/raylib_main.rb,
lib/raylib_helper.rb
Overview
BoundingBox
Class Method Summary collapse
Instance Method Summary collapse
- #max ⇒ Object
- #max=(v) ⇒ Object
- #min ⇒ Object
- #min=(v) ⇒ Object
- #with_max(x, y, z) ⇒ Object
- #with_min(x, y, z) ⇒ Object
Class Method Details
.create(*args) ⇒ Object
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/raylib_helper.rb', line 179 def self.create(*args) case args.size when 2 instance = BoundingBox.new instance[:min] = args[0] # min instance[:max] = args[1] # max instance when 6 instance = BoundingBox.new instance[:min] = Vector3.create(args[0], args[1], args[2]) # min_x, min_y, min_z instance[:max] = Vector3.create(args[3], args[4], args[5]) # max_x, max_y, max_z instance else raise ArgumentError.new 'BoundingBox.create : Number of arguments must be 2 or 6' end end |
Instance Method Details
#max ⇒ Object
936 |
# File 'lib/raylib_main.rb', line 936 def max = self[:max] |
#max=(v) ⇒ Object
937 |
# File 'lib/raylib_main.rb', line 937 def max=(v) self[:max] = v end |
#min ⇒ Object
934 |
# File 'lib/raylib_main.rb', line 934 def min = self[:min] |
#min=(v) ⇒ Object
935 |
# File 'lib/raylib_main.rb', line 935 def min=(v) self[:min] = v end |
#with_max(x, y, z) ⇒ Object
201 202 203 204 |
# File 'lib/raylib_helper.rb', line 201 def with_max(x, y, z) self[:max].set(x, y, z) self end |
#with_min(x, y, z) ⇒ Object
196 197 198 199 |
# File 'lib/raylib_helper.rb', line 196 def with_min(x, y, z) self[:min].set(x, y, z) self end |