Class: Raylib::Transform

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/raylib/core/structs/transform.rb

Overview

Transform, vertex transformation data

Class Method Summary collapse

Instance Method Summary collapse

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

#rotationQuaternion

Rotation

Returns:



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

#scaleVector3

Scale

Returns:



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_sObject



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

#translationVector3

Translation

Returns:



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