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

Method setMass

ogsr_engine/xrGame/PHShell.cpp:131–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void CPHShell::setMass(float M)
132{
133 ELEMENT_I i;
134 float volume = 0.f;
135 for (i = elements.begin(); elements.end() != i; ++i)
136 volume += (*i)->get_volume();
137
138 for (i = elements.begin(); elements.end() != i; ++i)
139 (*i)->setMass((*i)->get_volume() / volume * M);
140}
141
142void CPHShell::setMass1(float M)
143{

Callers 5

create_physic_shellMethod · 0.45
CreateBrokenMethod · 0.45
setMass1Method · 0.45
P_build_SimpleShellFunction · 0.45
AddElementMethod · 0.45

Calls 3

get_volumeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected