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

Method CutVelocity

ogsr_engine/xrGame/PHActivationShape.cpp:253–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251void CPHActivationShape::InitContact(dContact* c, bool& do_collide, u16, u16) {}
252
253void CPHActivationShape::CutVelocity(float l_limit, float /*a_limit*/)
254{
255 dVector3 limitedl, diffl;
256 if (dVectorLimit(dBodyGetLinearVel(m_body), l_limit, limitedl))
257 {
258 dVectorSub(diffl, limitedl, dBodyGetLinearVel(m_body));
259 dBodySetLinearVel(m_body, diffl[0], diffl[1], diffl[2]);
260 dBodySetAngularVel(m_body, 0.f, 0.f, 0.f);
261 dxStepBody(m_body, fixed_step);
262 dBodySetLinearVel(m_body, limitedl[0], limitedl[1], limitedl[2]);
263 }
264}
265
266void CPHActivationShape::set_rotation(const Fmatrix& sof)
267{

Callers 1

ActivateMethod · 0.45

Calls 6

dVectorLimitFunction · 0.85
dBodyGetLinearVelFunction · 0.85
dVectorSubFunction · 0.85
dBodySetLinearVelFunction · 0.85
dBodySetAngularVelFunction · 0.85
dxStepBodyFunction · 0.85

Tested by

no test coverage detected