🧮 Matrix
Une matrice de transformation 4x4 construite à partir d'une rotation et d'une origine, qui peut être utilisée pour les calculs géométriques et positionnels. Cela est principalement utilisé en interne.
🎒 Exemples
-- Builds a matrix rotated 90 degrees in Yaw, placed at (100, 0, 0)
local matrix = Matrix(Rotator(0, 90, 0), Vector(100, 0, 0))
-- Rotates a direction by the matrix rotation (the origin is not applied)
local rotated_direction = matrix:TransformVector(Vector(50, 0, 0))
🛠 Constructeurs
Default Constructor
No description provided
local my_matrix = Matrix(rotation, origin)
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Rotator | rotation | Required parameter | La rotation de la matrice |
| Vector | origin | Required parameter | L'origine de la matrice |
🦠 Fonctions
| Returns | Name | Description | |
|---|---|---|---|
| Vector | TransformVector | Rotation du vecteur par cette rotation de la matrice (l'origine n'est pas appliquée) | |
| Matrix | GetTransposed | Renvoie une nouvelle matrice transposée (Wikipedia) |
Optimal
TransformVector
Rotation du vecteur par cette rotation de la matrice (l'origine n'est pas appliquée)
local ret = my_matrix:TransformVector(vector)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | vector | Required parameter | Le vecteur à transformer |
Returns
| Type | Description |
|---|---|
| Vector | Le nouveau vecteur |
Optimal
GetTransposed
Renvoie une nouvelle matrice transposée (Wikipedia)
local ret = my_matrix:GetTransposed()
Returns
| Type | Description |
|---|---|
| Matrix | La matrice transposée |
