Class: Raylib::Vector3

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

Overview

Vector3, 3 components

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.copy_from(vec) ⇒ Object



91
92
93
# File 'lib/raylib_helper.rb', line 91

def self.copy_from(vec)
  Vector3.create(vec[:x], vec[:y], vec[:z])
end

.create(x = 0, y = 0, z = 0) ⇒ Object



87
88
89
# File 'lib/raylib_helper.rb', line 87

def self.create(x = 0, y = 0, z = 0)
  Vector3.new.set(x, y, z)
end

Instance Method Details

#set(x, y, z) ⇒ Object



95
96
97
98
99
100
# File 'lib/raylib_helper.rb', line 95

def set(x, y, z)
  self[:x] = x
  self[:y] = y
  self[:z] = z
  self
end

#xObject



102
# File 'lib/raylib_helper.rb', line 102

def x() self[:x] end

#x=(v) ⇒ Object



103
# File 'lib/raylib_helper.rb', line 103

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

#yObject



104
# File 'lib/raylib_helper.rb', line 104

def y() self[:y] end

#y=(v) ⇒ Object



105
# File 'lib/raylib_helper.rb', line 105

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

#zObject



106
# File 'lib/raylib_helper.rb', line 106

def z() self[:z] end

#z=(v) ⇒ Object



107
# File 'lib/raylib_helper.rb', line 107

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