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

Function timeStep

pyPBD/examples/cloth_model.py:104–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102
103# Perform simulation steps
104def timeStep():
105 sim = pbd.Simulation.getCurrent()
106 model = sim.getModel()
107
108 # We perform 8 simulation steps per render step
109 for i in range(8):
110 sim.getTimeStep().step(model)
111
112 # Update mesh normals of cloth model for rendering
113 for triModel in model.getTriangleModels():
114 triModel.updateMeshNormals(model.getParticles())
115
116# Reset the simulation
117def 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