mirror of
https://github.com/UOH-CS-Level5/551455-graphics-programming-2526-the-repo-Zyb3rWolfi.git
synced 2025-11-29 00:43:08 +00:00
Added createTranslation
This commit is contained in:
parent
78b2d5dbb7
commit
315273e0ec
@ -62,12 +62,20 @@ public class MyMatrix
|
||||
|
||||
public static MyMatrix CreateIdentity()
|
||||
{
|
||||
return null;
|
||||
return new MyMatrix(
|
||||
1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1
|
||||
);
|
||||
}
|
||||
|
||||
public static MyMatrix CreateTranslation(MyVector pTranslation)
|
||||
{
|
||||
return null;
|
||||
return new MyMatrix(1f, 0f, 0f, 0f,
|
||||
0f, 1f, 0f, 0f,
|
||||
0f, 0f, 1f, 0f,
|
||||
pTranslation.X, pTranslation.Y, pTranslation.Z, 1f);
|
||||
}
|
||||
|
||||
public static MyMatrix CreateScale(MyVector pScale)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user