This commit is contained in:
2024-04-09 17:24:02 +02:00
Unverified
parent 8f9ef3f4ff
commit 8766725953
8 changed files with 156 additions and 71 deletions

20
src/object_builder.py Normal file
View File

@@ -0,0 +1,20 @@
from object import Object
from vertex import Vertex
class ObjectBuilder:
vertices: list[Vertex]
lines: list[(Vertex, Vertex)]
def __init__(self):
self.vertices = []
def add_vertex(self, x: int, y: int, z: int) -> Vertex:
v = Vertex(x, y, z)
self.vertices.append(v)
return v
def add_vertices_connection(self, vertex1: Vertex, vertex2: Vertex):
self.lines.append((vertex1, vertex2))
def build(self) -> Object:
pass