MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getZeroImpulse

Method getZeroImpulse

Engine/source/T3D/rigid.cpp:225–232  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Calculate the inertia along the given vector This function can be used to calculate the amount of force needed to affect a change in velocity along the specified normal applied at the given point. */

Source from the content-addressed store, hash-verified

223 the given point.
224*/
225F32 Rigid::getZeroImpulse(const Point3F& r,const Point3F& normal)
226{
227 Point3F a,b,c;
228 mCross(r,normal,&a);
229 invWorldInertia.mulV(a,&b);
230 mCross(b,r,&c);
231 return 1 / (oneOverMass + mDot(c,normal));
232}
233
234F32 Rigid::getKineticEnergy()
235{

Callers 2

resolveContactsMethod · 0.80
updateForcesMethod · 0.80

Calls 3

mulVMethod · 0.80
mCrossFunction · 0.50
mDotFunction · 0.50

Tested by

no test coverage detected