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

Method getKineticEnergy

Engine/source/T3D/rigid.cpp:234–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234F32 Rigid::getKineticEnergy()
235{
236 Point3F w;
237 QuatF qmat = angPosition;
238 qmat.inverse();
239 qmat.mulP(angVelocity,&w);
240 const F32* f = invObjectInertia;
241 return 0.5f * ((mass * mDot(linVelocity,linVelocity)) +
242 w.x * w.x / f[0] +
243 w.y * w.y / f[5] +
244 w.z * w.z / f[10]);
245}
246
247void Rigid::getOriginVector(const Point3F &p,Point3F* r)
248{

Callers 2

updatePosMethod · 0.45
updatePosMethod · 0.45

Calls 3

mulPMethod · 0.80
mDotFunction · 0.50
inverseMethod · 0.45

Tested by

no test coverage detected