# VMatrix

- **İngilizce aslı:** https://wiki.facepunch.com/gmod/VMatrix
- **Çeviri tarihi:** 2025-09-08

4x4'lük bir matris.

Bu sayfa, matrisleri değiştirmek için kullanılabilecek tüm fonksiyonları listeler.

Bu nesne [Matrix](https://gmod.tr/wiki/Global.Matrix) ile oluşturulabilir.

| Metametot | İkinci İşlenen | Açıklama |
|---|---|---|
| `__add` | [VMatrix](https://gmod.tr/wiki/VMatrix) | Toplama işleminin sonucuyla yeni bir [VMatrix](https://gmod.tr/wiki/VMatrix) döndürür. |
| `__eq` | [any](https://gmod.tr/wiki/any) | 2 işleneni karşılaştırır, eğer ikisi de [VMatrix](https://gmod.tr/wiki/VMatrix) ise, her bir bileşeni ayrı ayrı karşılaştırır. |
| `__mul` | [VMatrix](https://gmod.tr/wiki/VMatrix) veya [Vector](https://gmod.tr/wiki/Vector) | Çarpma işleminin sonucuyla yeni bir [VMatrix](https://gmod.tr/wiki/VMatrix) veya [Vector](https://gmod.tr/wiki/Vector) döndürür. |
| `__sub` | [VMatrix](https://gmod.tr/wiki/VMatrix) | Çıkarma işleminin sonucuyla yeni bir [VMatrix](https://gmod.tr/wiki/VMatrix) döndürür. |
| `__tostring` |  | `[%f,\t%f,\t%f,\t%f]\n[%f,\t%f,\t%f,\t%f]\n[%f,\t%f,\t%f,\t%f]\n[%f,\t%f,\t%f,\t%f]` formatında bir [string](https://gmod.tr/wiki/string) döndürür. |
| `__unm` |  | Tersleme işleminin sonucuyla yeni bir [VMatrix](https://gmod.tr/wiki/VMatrix) döndürür. |

## Metotlar

VMatrix:[Add](https://gmod.tr/wiki/VMatrix:Add)( [VMatrix](https://gmod.tr/wiki/VMatrix) input )

Verilen matrisi bu matrise ekler.

[Angle](https://gmod.tr/wiki/Angle) VMatrix:[GetAngles](https://gmod.tr/wiki/VMatrix:GetAngles)()

Matrisin mutlak dönüşünü döndürür. Ölçeklendirilmiş matris beklenmedik sonuçlar üretebilir!

[number](https://gmod.tr/wiki/number) VMatrix:[GetField](https://gmod.tr/wiki/VMatrix:GetField)( [number](https://gmod.tr/wiki/number) row, [number](https://gmod.tr/wiki/number) column )

Matristeki belirli bir alanı döndürür.

[Vector](https://gmod.tr/wiki/Vector) VMatrix:[GetForward](https://gmod.tr/wiki/VMatrix:GetForward)()

Matrisin ileri yönünü alır. Yani, w koordinatı hariç matrisin ilk sütunu.

[VMatrix](https://gmod.tr/wiki/VMatrix) VMatrix:[GetInverse](https://gmod.tr/wiki/VMatrix:GetInverse)()

Orijinal matrisi değiştirmeden ters çevrilmiş bir matris döndürür. Determinantı 0 veya 0'a yakınsa (yani herhangi bir yöndeki "ölçeği" 0 ise) matrisin tersini alma işlemi başarısız olur. Ayrıca bakınız: VMatrix:GetInverseTR.

[VMatrix](https://gmod.tr/wiki/VMatrix) VMatrix:[GetInverseTR](https://gmod.tr/wiki/VMatrix:GetInverseTR)()

Orijinal matrisi değiştirmeden ters çevrilmiş bir matris döndürür. Bu fonksiyon başarısız olmaz, ancak yalnızca öteleme ve/veya döndürme içeren matrislerde doğru çalışır. Değiştirilmiş ölçeğe sahip bir matriste bu fonksiyonu kullanmak, yanlış bir ters çevrilmiş matris döndürebilir. Başka değişiklikler içeren bir matrisin tersini almak için VMatrix:GetInverse'e bakın.

[Vector](https://gmod.tr/wiki/Vector) VMatrix:[GetRight](https://gmod.tr/wiki/VMatrix:GetRight)()

Matrisin sağ yönünü alır. Yani, w koordinatı hariç matrisin ikinci sütununun tersi.

[Vector](https://gmod.tr/wiki/Vector) VMatrix:[GetScale](https://gmod.tr/wiki/VMatrix:GetScale)()

Matrisin mutlak ölçeğini döndürür.

[Vector](https://gmod.tr/wiki/Vector) VMatrix:[GetTranslation](https://gmod.tr/wiki/VMatrix:GetTranslation)()

Matrisin mutlak ötelemesini döndürür.

[VMatrix](https://gmod.tr/wiki/VMatrix) VMatrix:[GetTransposed](https://gmod.tr/wiki/VMatrix:GetTransposed)()

Bu matrisin devriğini (her satır bir sütun olur) döndürür.

[Vector](https://gmod.tr/wiki/Vector) VMatrix:[GetUp](https://gmod.tr/wiki/VMatrix:GetUp)()

Matrisin yukarı yönünü alır. Yani, w koordinatı hariç matrisin üçüncü sütunu.

VMatrix:[Identity](https://gmod.tr/wiki/VMatrix:Identity)()

Matrisi birim matris olarak başlatır.

[boolean](https://gmod.tr/wiki/boolean) VMatrix:[Invert](https://gmod.tr/wiki/VMatrix:Invert)()

Matrisin tersini alır. Determinantı 0 veya 0'a yakınsa (yani herhangi bir yöndeki "ölçeği" 0 ise) matrisin tersini alma işlemi başarısız olur. Eğer matris ters çevrilemezse, değiştirilmez. Ayrıca bakınız: VMatrix:InvertTR.

VMatrix:[InvertTR](https://gmod.tr/wiki/VMatrix:InvertTR)()

Matrisin tersini hızlıca alır. Bu fonksiyon başarısız olmaz, ancak yalnızca öteleme ve/veya döndürme içeren matrislerde doğru çalışır. Değiştirilmiş ölçeğe sahip bir matriste bu fonksiyonu kullanmak, yanlış bir ters çevrilmiş matris döndürebilir. Başka değişiklikler içeren bir matrisin tersini almak için VMatrix:Invert'e bakın. Bu fonksiyon daha hızlıdır.

[boolean](https://gmod.tr/wiki/boolean) VMatrix:[IsIdentity](https://gmod.tr/wiki/VMatrix:IsIdentity)()

Matrisin birim matrise eşit olup olmadığını döndürür.

[boolean](https://gmod.tr/wiki/boolean) VMatrix:[IsRotationMatrix](https://gmod.tr/wiki/VMatrix:IsRotationMatrix)()

Matrisin bir rotasyon matrisi olup olmadığını döndürür. Teknik olarak ileri, sağ ve yukarı vektörlerinin ortogonal (dik) ve normalize (birim) olup olmadığını kontrol eder.

[boolean](https://gmod.tr/wiki/boolean) VMatrix:[IsZero](https://gmod.tr/wiki/VMatrix:IsZero)()

Matrisin tüm alanlarının 0 olup olmadığını, yani bunun bir sıfır matrisi olup olmadığını kontrol eder.

VMatrix:[Mul](https://gmod.tr/wiki/VMatrix:Mul)( [VMatrix](https://gmod.tr/wiki/VMatrix) input )

Bu matrisi verilen matrisle çarpar.

VMatrix:[Rotate](https://gmod.tr/wiki/VMatrix:Rotate)( [Angle](https://gmod.tr/wiki/Angle) rotation )

Matrisi verilen açı kadar döndürür. Matrisi bir rotasyon matrisiyle sağdan çarpar (A = AR).

VMatrix:[Scale](https://gmod.tr/wiki/VMatrix:Scale)( [Vector](https://gmod.tr/wiki/Vector) scale )

Matrisi verilen vektörle ölçeklendirir. Matrisi bir ölçeklendirme matrisiyle sağdan çarpar (A = AS).

VMatrix:[ScaleTranslation](https://gmod.tr/wiki/VMatrix:ScaleTranslation)( [number](https://gmod.tr/wiki/number) scale )

Mutlak ötelemeyi verilen değerle ölçeklendirir.

VMatrix:[Set](https://gmod.tr/wiki/VMatrix:Set)( [VMatrix](https://gmod.tr/wiki/VMatrix) src )

Verilen matris nesnesinden değerleri kopyalar.

VMatrix:[SetAngles](https://gmod.tr/wiki/VMatrix:SetAngles)( [Angle](https://gmod.tr/wiki/Angle) angle )

Matrisin mutlak dönüşünü ayarlar.

VMatrix:[SetField](https://gmod.tr/wiki/VMatrix:SetField)( [number](https://gmod.tr/wiki/number) row, [number](https://gmod.tr/wiki/number) column, [number](https://gmod.tr/wiki/number) value )

Matristeki belirli bir alanı ayarlar.

VMatrix:[SetForward](https://gmod.tr/wiki/VMatrix:SetForward)( [Vector](https://gmod.tr/wiki/Vector) forward )

Matrisin ileri yönünü ayarlar. Yani, w koordinatı hariç matrisin ilk sütunu.

VMatrix:[SetRight](https://gmod.tr/wiki/VMatrix:SetRight)( [Vector](https://gmod.tr/wiki/Vector) forward )

Matrisin sağ yönünü ayarlar. Yani, w koordinatı hariç matrisin ikinci sütununun tersi.

VMatrix:[SetScale](https://gmod.tr/wiki/VMatrix:SetScale)( [Vector](https://gmod.tr/wiki/Vector) scale )

Döndürme ve ötelemeyi koruyarak matrisin ölçeğini değiştirir.

VMatrix:[SetTranslation](https://gmod.tr/wiki/VMatrix:SetTranslation)( [Vector](https://gmod.tr/wiki/Vector) translation )

Matrisin mutlak ötelemesini ayarlar.

VMatrix:[SetUnpacked](https://gmod.tr/wiki/VMatrix:SetUnpacked)( [number](https://gmod.tr/wiki/number) e11, [number](https://gmod.tr/wiki/number) e12, [number](https://gmod.tr/wiki/number) e13, [number](https://gmod.tr/wiki/number) e14, [number](https://gmod.tr/wiki/number) e21, [number](https://gmod.tr/wiki/number) e22, [number](https://gmod.tr/wiki/number) e23, [number](https://gmod.tr/wiki/number) e24, [number](https://gmod.tr/wiki/number) e31, [number](https://gmod.tr/wiki/number) e32, [number](https://gmod.tr/wiki/number) e33, [number](https://gmod.tr/wiki/number) e34, [number](https://gmod.tr/wiki/number) e41, [number](https://gmod.tr/wiki/number) e42, [number](https://gmod.tr/wiki/number) e43, [number](https://gmod.tr/wiki/number) e44 )

Matrisin her bir bileşenini ayarlar.

VMatrix:[SetUp](https://gmod.tr/wiki/VMatrix:SetUp)( [Vector](https://gmod.tr/wiki/Vector) forward )

Matrisin yukarı yönünü ayarlar. Yani, w koordinatı hariç matrisin üçüncü sütunu.

VMatrix:[Sub](https://gmod.tr/wiki/VMatrix:Sub)( [VMatrix](https://gmod.tr/wiki/VMatrix) input )

Verilen matrisi bu matristen çıkarır.

[table](https://gmod.tr/wiki/table) VMatrix:[ToTable](https://gmod.tr/wiki/VMatrix:ToTable)()

Matrisi 4x4'lük bir tabloya dönüştürür. Matrix fonksiyonuna bakın.

VMatrix:[Translate](https://gmod.tr/wiki/VMatrix:Translate)( [Vector](https://gmod.tr/wiki/Vector) translation )

Matrisi verilen vektör kadar öteler, yani vektörü ötelemeye ekler. Matrisi bir öteleme matrisiyle sağdan çarpar (A = AT).

[number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number), [number](https://gmod.tr/wiki/number) VMatrix:[Unpack](https://gmod.tr/wiki/VMatrix:Unpack)()

Matrisin her bir bileşenini, sütunlardan önce satırları genişleterek döndürür.

VMatrix:[Zero](https://gmod.tr/wiki/VMatrix:Zero)()

Matrisin tüm bileşenlerini 0'a ayarlar, bu aynı zamanda sıfır matrisi olarak da bilinir. Bu fonksiyon, her elemanı manuel olarak ayarlamaktan daha verimlidir.

- [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/VMatrix
