MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / main

Function main

pyPBD/examples/beam_model.py:89–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87 buildModel()
88
89def main():
90 pbd.Logger.addConsoleSink(pbd.LogLevel.INFO)
91
92 initGL(1280, 1024)
93 gluLookAt (5, 4, 15, 5, -1, 0, 0, 1, 0)
94
95 buildModel()
96
97 running = True
98 while running:
99 for event in pygame.event.get():
100 if event.type == pygame.QUIT:
101 running = False
102 if event.type == pygame.KEYDOWN:
103 if event.key == pygame.K_r:
104 reset()
105 if event.key == pygame.K_ESCAPE:
106 running = False
107
108 glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
109 glClearColor(0.3, 0.3, 0.3, 1.0)
110 timeStep()
111 render()
112 pygame.display.flip()
113
114 pygame.quit()
115 pbd.Timing.printAverageTimes()
116
117if __name__ == "__main__":
118 main()

Callers 1

beam_model.pyFile · 0.70

Calls 7

initGLFunction · 0.85
printAverageTimesMethod · 0.80
buildModelFunction · 0.70
resetFunction · 0.70
timeStepFunction · 0.70
renderFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected