Class: Raylib::Vector4

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

Overview

Vector4, 4 components

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.copy_from(vec) ⇒ Object



115
116
117
# File 'lib/raylib_helper.rb', line 115

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

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



111
112
113
# File 'lib/raylib_helper.rb', line 111

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

Instance Method Details

#set(x, y, z, w) ⇒ Object



119
120
121
122
123
124
125
# File 'lib/raylib_helper.rb', line 119

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

#wObject



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

def w() self[:w] end

#w=(v) ⇒ Object



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

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

#xObject



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

def x() self[:x] end

#x=(v) ⇒ Object



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

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

#yObject



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

def y() self[:y] end

#y=(v) ⇒ Object



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

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

#zObject



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

def z() self[:z] end

#z=(v) ⇒ Object



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

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