Implemented the first version of the 3D engine. Added support for loading 'obj' files as a mesh.

This commit is contained in:
2020-07-14 16:53:06 -05:00
parent b318076f05
commit 05d2beb8ac
4 changed files with 75 additions and 49 deletions
+1 -10
View File
@@ -1,12 +1,7 @@
import vectors
class Matrix4x4:
def __init__(self):
self.row0 = None
self.row1 = None
self.row2 = None
self.row3 = None
def __init__(self, row0, row1, row2, row3):
if not isinstance(row0, vectors.Vector4d):
raise ValueError("Row must be a Vector4d object.", row0)
@@ -36,10 +31,6 @@ class Matrix4x4:
return vectors.Vector3d(x, y, z)
class Matrix3x3:
def __init__(self):
self.row0 = None
self.row1 = None
self.row2 = None
def __init__(self, row0, row1, row2):
self.row0 = row0