basic_proto
This commit is contained in:
@@ -73,6 +73,21 @@ class OpenGLWidget(QOpenGLWidget):
|
||||
glVertex3fv(vertex)
|
||||
glEnd()
|
||||
|
||||
# Draw edges
|
||||
glColor3f(0.0, 0.0, 1.0) # Set color to blue
|
||||
glLineWidth(2.0) # Set line width
|
||||
glBegin(GL_LINES)
|
||||
for triangle in vertices:
|
||||
glVertex3fv(triangle[0])
|
||||
glVertex3fv(triangle[1])
|
||||
|
||||
glVertex3fv(triangle[1])
|
||||
glVertex3fv(triangle[2])
|
||||
|
||||
glVertex3fv(triangle[2])
|
||||
glVertex3fv(triangle[0])
|
||||
glEnd()
|
||||
|
||||
def mousePressEvent(self, event):
|
||||
self.lastPos = event.pos()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user