Class: Raylib::BoundingBox

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/raylib_main.rb

Overview

BoundingBox

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(*args) ⇒ Object



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/raylib_helper.rb', line 139

def BoundingBox.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

#maxObject



934
# File 'lib/raylib_main.rb', line 934

def max = self[:max]

#max=(v) ⇒ Object



935
# File 'lib/raylib_main.rb', line 935

def max=(v) self[:max] = v end

#minObject



932
# File 'lib/raylib_main.rb', line 932

def min = self[:min]

#min=(v) ⇒ Object



933
# File 'lib/raylib_main.rb', line 933

def min=(v) self[:min] = v end