# IMesh:DrawSkinned

- **Ortam:** İstemci
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/IMesh:DrawSkinned
- **Çeviri tarihi:** 2026-04-09

```lua
IMesh:DrawSkinned( table bones, boolean multiply = false )
```

## Son Eklenenler

Bu yakın zamanda versiyonunda eklendi (2026.02.25). [Dev Şubesi](https://gmod.tr/wiki/Dev_Branch) - Evet, şimdi.

## Açıklama

Aktif matris ve verilen kemik matriçleri ile ağ oluşturur.

## Argümanlar

1.. sıralı [Tablo](https://gmod.tr/wiki/table)[VMatrix](https://gmod.tr/wiki/VMatrix)> **kemikler**: Kemik olarak kullanacağımız 52 tane matris listesi.
2.. [Boolean](https://gmod.tr/wiki/boolean) **çoğaltmak** = yanlış: Eğer ayarlanırsa, şu anda aktif olan model matrisine verilen matriçleri çarpır ([cam. GetModelMatrix](https://gmod.tr/wiki/cam.GetModelMatrix)Bu bir performans çarpmasına neden olur.

### Örnek

Örnek kullanım. Haritalarda 0, 0, 0 konumda iskelet animasyonu kullanarak dans eden bir küp çiziyor. (gm_construct's spawn)

```lua
local mat = Material( "models/debug/debugwhite" )
local ZMin, ZMax = -10, 10
local pos = Vector( 0, 0, 0 )
local function SetPosZ( i )
	pos[3] = math.Remap( math.sin( ( CurTime() * 7 ) + ( i / 2 ) ), -1, 1, ZMin, ZMax )
	return pos
end

local s = 50

local v = {
	Vector( -s, -s, -s ), Vector( s, -s, -s ), Vector( s, s, -s ), Vector( -s, s, -s ),
	Vector( -s, -s, s ), Vector( s, -s, s ), Vector( s, s, s ), Vector( -s, s, s ),
}

local tris = {
	{1, 2, 3}, {1, 3, 4}, {5, 8, 7}, {5, 7, 6}, {1, 5, 6}, {1, 6, 2},
	{2, 6, 7}, {2, 7, 3}, {3, 7, 8}, {3, 8, 4}, {4, 8, 5}, {4, 5, 1}
}

local normals = {
	Vector( 0, 0,-1 ), Vector( 0, 0,-1 ), Vector( 0, 0, 1 ),
	Vector( 0, 0, 1 ), Vector( 0,-1, 0 ), Vector( 0,-1, 0 ),
	Vector( 1, 0, 0 ), Vector( 1, 0, 0 ), Vector( 0, 1, 0 ),
	Vector( 0, 1, 0 ), Vector( -1, 0, 0 ), Vector( -1, 0, 0 )
}

local imesh = Mesh( mat, 2 )

mesh.Begin( imesh, MATERIAL_TRIANGLES, 12 )
	for ti, t in ipairs( tris ) do
		local n = normals[ti]
		for _, i in ipairs( t ) do
			mesh.Position( v[i] )
			mesh.BoneData( 0, i, 1 )
			mesh.BoneData( 1, i, 0 )
			mesh.Normal( n )
			mesh.Color( 255, 255, 255, 255 )
			mesh.AdvanceVertex()
		end
	end
mesh.End()

local boneCount = 8
local boneTable = {}
for i = 1, boneCount do
	boneTable[i] = Matrix()
end

hook.Add("PostDrawOpaqueRenderables", "Cube", function()

	-- Kemik matrislerini güncelle
	for i = 1, boneCount do
		boneTable[i]:Identity()
		boneTable[i]:Translate( SetPosZ( i ) )
	end

	-- Yapılandırma modeli aydınlatması
	render.ResetModelLighting( 0.5, 0.5, 0.5 )
	render.SetModelLighting( BOX_FRONT, 1, 1, 1 )
	render.SetModelLighting( BOX_LEFT, 1, 0, 0 )
	render.SetModelLighting( BOX_RIGHT, 0, 1, 0 )
	render.SetModelLighting( BOX_TOP, 0, 0, 1 )

	-- Görüntüleme malzemesini ayarla
	render.SetMaterial( mat )

	-- Kemik tablosuyla ağ çiz.
	imesh:DrawSkinned( boneTable )

end)
```

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/IMesh:DrawSkinned
