Class: Raylib::Model

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

Overview

Model, meshes, materials and animation data

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(transform, mesh_count, material_count, meshes, materials, mesh_material, bone_count, bones, bind_pose) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/raylib/core/structs/model.rb', line 16

def self.create(transform, mesh_count, material_count, meshes, materials, mesh_material, bone_count, bones, bind_pose)
  new.tap do |instance|
    instance[:transform] = transform
    instance[:meshCount] = mesh_count
    instance[:materialCount] = material_count
    instance[:meshes] = meshes
    instance[:materials] = materials
    instance[:meshMaterial] = mesh_material
    instance[:boneCount] = bone_count
    instance[:bones] = bones
    instance[:bindPose] = bind_pose
  end
end

Instance Method Details

#bind_poseTransform *

Bones base transformation (pose)

Returns:



108
# File 'lib/raylib/core/structs/model.rb', line 108

def bind_pose = self[:bindPose]

#bind_pose=(new_bind_pose) ⇒ Object

Sets Bones base transformation (pose)



111
112
113
# File 'lib/raylib/core/structs/model.rb', line 111

def bind_pose=(new_bind_pose)
  self[:bindPose] = new_bind_pose
end

#bone_countInteger

Number of bones

Returns:

  • (Integer)

    boneCount



90
# File 'lib/raylib/core/structs/model.rb', line 90

def bone_count = self[:boneCount]

#bone_count=(new_bone_count) ⇒ Object

Sets Number of bones



93
94
95
# File 'lib/raylib/core/structs/model.rb', line 93

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

#bonesBoneInfo *

Bones information (skeleton)

Returns:



99
# File 'lib/raylib/core/structs/model.rb', line 99

def bones = self[:bones]

#bones=(new_bones) ⇒ Object

Sets Bones information (skeleton)



102
103
104
# File 'lib/raylib/core/structs/model.rb', line 102

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

#material_countInteger

Number of materials

Returns:

  • (Integer)

    materialCount



54
# File 'lib/raylib/core/structs/model.rb', line 54

def material_count = self[:materialCount]

#material_count=(new_material_count) ⇒ Object

Sets Number of materials



57
58
59
# File 'lib/raylib/core/structs/model.rb', line 57

def material_count=(new_material_count)
  self[:materialCount] = new_material_count
end

#materialsMaterial *

Materials array

Returns:



72
# File 'lib/raylib/core/structs/model.rb', line 72

def materials = self[:materials]

#materials=(new_materials) ⇒ Object

Sets Materials array



75
76
77
# File 'lib/raylib/core/structs/model.rb', line 75

def materials=(new_materials)
  self[:materials] = new_materials
end

#mesh_countInteger

Number of meshes

Returns:

  • (Integer)

    meshCount



45
# File 'lib/raylib/core/structs/model.rb', line 45

def mesh_count = self[:meshCount]

#mesh_count=(new_mesh_count) ⇒ Object

Sets Number of meshes



48
49
50
# File 'lib/raylib/core/structs/model.rb', line 48

def mesh_count=(new_mesh_count)
  self[:meshCount] = new_mesh_count
end

#mesh_materialint *

Mesh material number

Returns:

  • (int *)

    meshMaterial



81
# File 'lib/raylib/core/structs/model.rb', line 81

def mesh_material = self[:meshMaterial]

#mesh_material=(new_mesh_material) ⇒ Object

Sets Mesh material number



84
85
86
# File 'lib/raylib/core/structs/model.rb', line 84

def mesh_material=(new_mesh_material)
  self[:meshMaterial] = new_mesh_material
end

#meshesMesh *

Meshes array

Returns:

  • (Mesh *)

    meshes



63
# File 'lib/raylib/core/structs/model.rb', line 63

def meshes = self[:meshes]

#meshes=(new_meshes) ⇒ Object

Sets Meshes array



66
67
68
# File 'lib/raylib/core/structs/model.rb', line 66

def meshes=(new_meshes)
  self[:meshes] = new_meshes
end

#to_sObject



30
31
32
# File 'lib/raylib/core/structs/model.rb', line 30

def to_s
  "Raylib::Model##{object_id} transform=#{transform} mesh_count=#{mesh_count} material_count=#{material_count} meshes=#{meshes} materials=#{materials} mesh_material=#{mesh_material} bone_count=#{bone_count} bones=#{bones} bind_pose=#{bind_pose}"
end

#transformMatrix

Local transform matrix

Returns:



36
# File 'lib/raylib/core/structs/model.rb', line 36

def transform = self[:transform]

#transform=(new_transform) ⇒ Object

Sets Local transform matrix



39
40
41
# File 'lib/raylib/core/structs/model.rb', line 39

def transform=(new_transform)
  self[:transform] = new_transform
end