Class: Raylib::Vector3
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Vector3
- Defined in:
- lib/raylib_main.rb,
lib/raylib_helper.rb
Overview
Vector3, 3 components
Class Method Summary collapse
Instance Method Summary collapse
- #set(x, y, z) ⇒ Object
- #x ⇒ Object
- #x=(v) ⇒ Object
- #y ⇒ Object
- #y=(v) ⇒ Object
- #z ⇒ Object
- #z=(v) ⇒ Object
Class Method Details
.copy_from(vec) ⇒ Object
77 78 79 |
# File 'lib/raylib_helper.rb', line 77 def self.copy_from(vec) Vector3.create(vec[:x], vec[:y], vec[:z]) end |
.create(x = 0, y = 0, z = 0) ⇒ Object
73 74 75 |
# File 'lib/raylib_helper.rb', line 73 def self.create(x = 0, y = 0, z = 0) Vector3.new.set(x, y, z) end |
Instance Method Details
#set(x, y, z) ⇒ Object
81 82 83 84 85 86 |
# File 'lib/raylib_helper.rb', line 81 def set(x, y, z) self[:x] = x self[:y] = y self[:z] = z self end |
#x ⇒ Object
432 |
# File 'lib/raylib_main.rb', line 432 def x = self[:x] |
#x=(v) ⇒ Object
433 |
# File 'lib/raylib_main.rb', line 433 def x=(v) self[:x] = v end |
#y ⇒ Object
434 |
# File 'lib/raylib_main.rb', line 434 def y = self[:y] |
#y=(v) ⇒ Object
435 |
# File 'lib/raylib_main.rb', line 435 def y=(v) self[:y] = v end |
#z ⇒ Object
436 |
# File 'lib/raylib_main.rb', line 436 def z = self[:z] |
#z=(v) ⇒ Object
437 |
# File 'lib/raylib_main.rb', line 437 def z=(v) self[:z] = v end |