Class: Raylib::Vector3
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Vector3
- Defined in:
- lib/raylib/core/structs/vector3.rb
Overview
Vector3, 3 components
Class Method Summary collapse
Instance Method Summary collapse
- #to_s ⇒ Object
-
#x ⇒ Float
Vector x component.
-
#x=(new_x) ⇒ Object
Sets Vector x component.
-
#y ⇒ Float
Vector y component.
-
#y=(new_y) ⇒ Object
Sets Vector y component.
-
#z ⇒ Float
Vector z component.
-
#z=(new_z) ⇒ Object
Sets Vector z component.
Class Method Details
.create(x, y, z) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/raylib/core/structs/vector3.rb', line 10 def self.create(x, y, z) new.tap do |instance| instance[:x] = x instance[:y] = y instance[:z] = z end end |
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/raylib/core/structs/vector3.rb', line 18 def to_s "Raylib::Vector3##{object_id} x=#{x} y=#{y} z=#{z}" end |
#x ⇒ Float
Vector x component
24 |
# File 'lib/raylib/core/structs/vector3.rb', line 24 def x = self[:x] |
#x=(new_x) ⇒ Object
Sets Vector x component
27 28 29 |
# File 'lib/raylib/core/structs/vector3.rb', line 27 def x=(new_x) self[:x] = new_x end |
#y ⇒ Float
Vector y component
33 |
# File 'lib/raylib/core/structs/vector3.rb', line 33 def y = self[:y] |
#y=(new_y) ⇒ Object
Sets Vector y component
36 37 38 |
# File 'lib/raylib/core/structs/vector3.rb', line 36 def y=(new_y) self[:y] = new_y end |
#z ⇒ Float
Vector z component
42 |
# File 'lib/raylib/core/structs/vector3.rb', line 42 def z = self[:z] |
#z=(new_z) ⇒ Object
Sets Vector z component
45 46 47 |
# File 'lib/raylib/core/structs/vector3.rb', line 45 def z=(new_z) self[:z] = new_z end |