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

Function timeStep

pyPBD/examples/armadillo.py:123–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121
122# Perform simulation steps
123def timeStep():
124 sim = pbd.Simulation.getCurrent()
125 model = sim.getModel()
126
127 # We perform 8 simulation steps per render step
128 for i in range(8):
129 sim.getTimeStep().step(model)
130
131 # Update mesh normals of tet model for rendering
132 for tetModel in model.getTetModels():
133 tetModel.updateMeshNormals(model.getParticles())
134
135# Reset the simulation
136def reset():

Callers 1

mainFunction · 0.70

Calls 5

getModelMethod · 0.80
getTimeStepMethod · 0.80
getCurrentMethod · 0.45
stepMethod · 0.45
updateMeshNormalsMethod · 0.45

Tested by

no test coverage detected