MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / PhDataUpdate

Method PhDataUpdate

ogsr_engine/xrGame/PHShell.cpp:177–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175float CPHShell::getDensity() { return getMass() / getVolume(); }
176
177void CPHShell::PhDataUpdate(dReal step)
178{
179 ELEMENT_I i = elements.begin(), e = elements.end();
180 bool disable = true;
181 for (; e != i; ++i)
182 {
183 (*i)->PhDataUpdate(step);
184 dBodyID body = (*i)->get_body();
185 if (body && disable && dBodyIsEnabled(body))
186 disable = false;
187 }
188 if (disable)
189 {
190 DisableObject();
191 CPHObject::put_in_recently_deactivated();
192 }
193 else
194 ReanableObject();
195
196 if (PhOutOfBoundaries(cast_fv(dBodyGetPosition((*elements.begin())->get_body()))))
197 Disable();
198}
199
200void CPHShell::PhTune(dReal step)
201{

Callers

nothing calls this directly

Calls 6

dBodyIsEnabledFunction · 0.85
dBodyGetPositionFunction · 0.85
PhOutOfBoundariesFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
get_bodyMethod · 0.45

Tested by

no test coverage detected