Class: Raylib::Model
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Model
- Defined in:
- lib/raylib/core/structs/model.rb
Overview
Model, meshes, materials and animation data
Class Method Summary collapse
Instance Method Summary collapse
-
#bind_pose ⇒ Transform *
Bones base transformation (pose).
-
#bind_pose=(new_bind_pose) ⇒ Object
Sets Bones base transformation (pose).
-
#bone_count ⇒ Integer
Number of bones.
-
#bone_count=(new_bone_count) ⇒ Object
Sets Number of bones.
-
#bones ⇒ BoneInfo *
Bones information (skeleton).
-
#bones=(new_bones) ⇒ Object
Sets Bones information (skeleton).
-
#material_count ⇒ Integer
Number of materials.
-
#material_count=(new_material_count) ⇒ Object
Sets Number of materials.
-
#materials ⇒ Material *
Materials array.
-
#materials=(new_materials) ⇒ Object
Sets Materials array.
-
#mesh_count ⇒ Integer
Number of meshes.
-
#mesh_count=(new_mesh_count) ⇒ Object
Sets Number of meshes.
-
#mesh_material ⇒ int *
Mesh material number.
-
#mesh_material=(new_mesh_material) ⇒ Object
Sets Mesh material number.
-
#meshes ⇒ Mesh *
Meshes array.
-
#meshes=(new_meshes) ⇒ Object
Sets Meshes array.
- #to_s ⇒ Object
-
#transform ⇒ Matrix
Local transform matrix.
-
#transform=(new_transform) ⇒ Object
Sets Local transform matrix.
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_pose ⇒ Transform *
Bones base transformation (pose)
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_count ⇒ Integer
Number of bones
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 |
#bones ⇒ BoneInfo *
Bones information (skeleton)
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_count ⇒ Integer
Number of materials
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 |
#materials ⇒ Material *
Materials array
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_count ⇒ Integer
Number of meshes
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_material ⇒ int *
Mesh material number
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 |
#meshes ⇒ Mesh *
Meshes array
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_s ⇒ Object
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 |
#transform ⇒ Matrix
Local transform matrix
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 |