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

Method reset

SPlisHSPlasH/BoundaryModel_Akinci2012.cpp:31–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void BoundaryModel_Akinci2012::reset()
32{
33 BoundaryModel::reset();
34
35 // Note:
36 // positions and velocities are already updated by updateBoundaryParticles
37 if (!m_rigidBody->isDynamic() && !m_rigidBody->isAnimated())
38 {
39 // reset velocities and accelerations
40 for (int j = 0; j < (int)numberOfParticles(); j++)
41 {
42 m_x[j] = m_x0[j];
43 m_v[j].setZero();
44 }
45 }
46}
47
48void BoundaryModel_Akinci2012::computeBoundaryVolume()
49{

Callers

nothing calls this directly

Calls 4

isAnimatedMethod · 0.80
resetFunction · 0.50
isDynamicMethod · 0.45
setZeroMethod · 0.45

Tested by

no test coverage detected