MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / step

Function step

data/Scenes/AnimatedBody_2D.py:14–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13# This function is called automatically in each simulation step.
14def step():
15 sim = sph.Simulation.getCurrent()
16 boundary = sim.getBoundaryModel(1)
17 animatedBody = boundary.getRigidBodyObject()
18
19 tm = sph.TimeManager.getCurrent()
20 t = tm.getTime()
21 animatedBody.setVelocity([ 0.35*math.sin(0.75*t), -0.35*math.cos(0.75*t), 0])
22 animatedBody.animate()

Callers

nothing calls this directly

Calls 6

getBoundaryModelMethod · 0.80
getRigidBodyObjectMethod · 0.80
getTimeMethod · 0.80
animateMethod · 0.80
getCurrentMethod · 0.45
setVelocityMethod · 0.45

Tested by

no test coverage detected