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

Function render

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

Source from the content-addressed store, hash-verified

60 print("Number of vertices: " + str(width*height*depth))
61
62def render():
63 sim = pbd.Simulation.getCurrent()
64 model = sim.getModel()
65 pd = model.getParticles()
66 tetModel = model.getTetModels()[0]
67 offset = tetModel.getIndexOffset()
68 drawMesh(pd, tetModel.getSurfaceMesh(), offset, [0,0.2,0.7])
69
70 glPushMatrix()
71 glLoadIdentity()
72 drawText([-0.95,0.9], "Time: {:.2f}".format(pbd.TimeManager.getCurrent().getTime()))
73 glPopMatrix()
74
75def timeStep():
76 sim = pbd.Simulation.getCurrent()

Callers 1

mainFunction · 0.70

Calls 7

drawMeshFunction · 0.85
drawTextFunction · 0.85
getModelMethod · 0.80
getTimeMethod · 0.80
getCurrentMethod · 0.45
getIndexOffsetMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected