Class: Raylib::Transform
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Transform
- Defined in:
- lib/raylib/core/structs/transform.rb
Overview
Transform, vertex transformation data
Class Method Summary collapse
Instance Method Summary collapse
-
#rotation ⇒ Quaternion
Rotation.
-
#rotation=(new_rotation) ⇒ Object
Sets Rotation.
-
#scale ⇒ Vector3
Scale.
-
#scale=(new_scale) ⇒ Object
Sets Scale.
- #to_s ⇒ Object
-
#translation ⇒ Vector3
Translation.
-
#translation=(new_translation) ⇒ Object
Sets Translation.
Class Method Details
.create(translation, rotation, scale) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/raylib/core/structs/transform.rb', line 10 def self.create(translation, rotation, scale) new.tap do |instance| instance[:translation] = translation instance[:rotation] = rotation instance[:scale] = scale end end |
Instance Method Details
#rotation ⇒ Quaternion
Rotation
33 |
# File 'lib/raylib/core/structs/transform.rb', line 33 def rotation = self[:rotation] |
#rotation=(new_rotation) ⇒ Object
Sets Rotation
36 37 38 |
# File 'lib/raylib/core/structs/transform.rb', line 36 def rotation=(new_rotation) self[:rotation] = new_rotation end |
#scale ⇒ Vector3
Scale
42 |
# File 'lib/raylib/core/structs/transform.rb', line 42 def scale = self[:scale] |
#scale=(new_scale) ⇒ Object
Sets Scale
45 46 47 |
# File 'lib/raylib/core/structs/transform.rb', line 45 def scale=(new_scale) self[:scale] = new_scale end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/raylib/core/structs/transform.rb', line 18 def to_s "Raylib::Transform##{object_id} translation=#{translation} rotation=#{rotation} scale=#{scale}" end |
#translation ⇒ Vector3
Translation
24 |
# File 'lib/raylib/core/structs/transform.rb', line 24 def translation = self[:translation] |
#translation=(new_translation) ⇒ Object
Sets Translation
27 28 29 |
# File 'lib/raylib/core/structs/transform.rb', line 27 def translation=(new_translation) self[:translation] = new_translation end |