-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.py
More file actions
75 lines (59 loc) · 1.8 KB
/
update.py
File metadata and controls
75 lines (59 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# -*- coding: utf-8 -*-
#----------------------------------
from OpenGL.GL import *
from keyboard import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
#----------------------------------
from View.Camera import *
from View.Draw.elementsBase import *
from View.Draw.AfficherMap import *
from View.Draw.Simulation import *
from Controller.eventManager import *
from View.render import *
from View.objects.cube import *
from View.initRendu.initMur import *
from View.initRendu.initObjects import *
from View.initRendu.initSimulation import *
from View.initRendu.initMarge import *
from View.initRendu.initAlgo import initAlgo
from View.initRendu.initLignes import *
#----------------------------------
"""
Boucle qui s'execute tout le temps
"""
def update(self):
eventManager(self)
Camera(self)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
repere(100)
rendu = render(self)
if self.actualiser:
self.actualiser = False
initMur(self)
initObjects(self)
initLignes(self)
if self.afficherMarge:
initMarge(self)
self.afficherMap = True
if self.afficherMap:
rendu.Mur()
rendu.Objects()
rendu.Lignes()
if self.editMode:
rendu.EditMode()
if self.afficherMarge:
rendu.Marge()
if self.simulation:
simulation(self)
if self.afficherAlgo == 0:
initAlgo(self)
self.afficherAlgo = 1
elif self.afficherAlgo == 1:
rendu.Algo()
if self.afficherSolution == 1:
rendu.Simulation()
elif self.afficherSolution == 0:
initSimulation(self)
self.afficherSolution = 1
self.SwapBuffers()