Class: Raylib::ModelAnimation

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

Overview

ModelAnimation

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(bone_count, frame_count, bones, frame_poses) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/raylib/core/structs/model_animation.rb', line 11

def self.create(bone_count, frame_count, bones, frame_poses)
  new.tap do |instance|
    instance[:boneCount] = bone_count
    instance[:frameCount] = frame_count
    instance[:bones] = bones
    instance[:framePoses] = frame_poses
  end
end

Instance Method Details

#bone_countInteger

Number of bones

Returns:

  • (Integer)

    boneCount



26
# File 'lib/raylib/core/structs/model_animation.rb', line 26

def bone_count = self[:boneCount]

#bone_count=(new_bone_count) ⇒ Object

Sets Number of bones



29
30
31
# File 'lib/raylib/core/structs/model_animation.rb', line 29

def bone_count=(new_bone_count)
  self[:boneCount] = new_bone_count
end

#bonesBoneInfo *

Bones information (skeleton)

Returns:



44
# File 'lib/raylib/core/structs/model_animation.rb', line 44

def bones = self[:bones]

#bones=(new_bones) ⇒ Object

Sets Bones information (skeleton)



47
48
49
# File 'lib/raylib/core/structs/model_animation.rb', line 47

def bones=(new_bones)
  self[:bones] = new_bones
end

#frame_countInteger

Number of animation frames

Returns:

  • (Integer)

    frameCount



35
# File 'lib/raylib/core/structs/model_animation.rb', line 35

def frame_count = self[:frameCount]

#frame_count=(new_frame_count) ⇒ Object

Sets Number of animation frames



38
39
40
# File 'lib/raylib/core/structs/model_animation.rb', line 38

def frame_count=(new_frame_count)
  self[:frameCount] = new_frame_count
end

#frame_posesTransform **

Poses array by frame

Returns:



53
# File 'lib/raylib/core/structs/model_animation.rb', line 53

def frame_poses = self[:framePoses]

#frame_poses=(new_frame_poses) ⇒ Object

Sets Poses array by frame



56
57
58
# File 'lib/raylib/core/structs/model_animation.rb', line 56

def frame_poses=(new_frame_poses)
  self[:framePoses] = new_frame_poses
end

#to_sObject



20
21
22
# File 'lib/raylib/core/structs/model_animation.rb', line 20

def to_s
  "Raylib::ModelAnimation##{object_id} bone_count=#{bone_count} frame_count=#{frame_count} bones=#{bones} frame_poses=#{frame_poses}"
end