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
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/raylib_helper.rb', line 148 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
938 |
# File 'lib/raylib_main.rb', line 938 def max = self[:max] |
#max=(v) ⇒ Object
939 |
# File 'lib/raylib_main.rb', line 939 def max=(v) self[:max] = v end |
#min ⇒ Object
936 |
# File 'lib/raylib_main.rb', line 936 def min = self[:min] |
#min=(v) ⇒ Object
937 |
# File 'lib/raylib_main.rb', line 937 def min=(v) self[:min] = v end |
#with_max(x, y, z) ⇒ Object
170 171 172 173 |
# File 'lib/raylib_helper.rb', line 170 def with_max(x, y, z) self[:max].set(x, y, z) self end |
#with_min(x, y, z) ⇒ Object
165 166 167 168 |
# File 'lib/raylib_helper.rb', line 165 def with_min(x, y, z) self[:min].set(x, y, z) self end |