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

Function timeStep

pyPBD/examples/bunny_cloth.py:152–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150
151# Perform simulation steps
152def timeStep():
153 sim = pbd.Simulation.getCurrent()
154 model = sim.getModel()
155
156 # We perform 8 simulation steps per render step
157 for i in range(8):
158 sim.getTimeStep().step(model)
159
160 # Update mesh normals of cloth model for rendering
161 for triModel in model.getTriangleModels():
162 triModel.updateMeshNormals(model.getParticles())
163
164# Reset the simulation
165def 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