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

Function dMassSetSphereTotal

3rd_party/Src/ode/ode/src/mass.cpp:115–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113
114
115void dMassSetSphereTotal (dMass *m, dReal total_mass, dReal radius)
116{
117 dAASSERT (m);
118 dMassSetZero (m);
119 m->mass = total_mass;
120 dReal II = REAL(0.4) * total_mass * radius*radius;
121 m->_I(0,0) = II;
122 m->_I(1,1) = II;
123 m->_I(2,2) = II;
124
125# ifndef dNODEBUG
126 checkMass (m);
127# endif
128}
129
130
131void dMassSetCappedCylinder (dMass *m, dReal density, int direction,

Callers 1

dMassSetSphereFunction · 0.85

Calls 2

dMassSetZeroFunction · 0.85
checkMassFunction · 0.85

Tested by

no test coverage detected