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

Method SetTransform

ogsr_engine/xrGame/PHElement.cpp:236–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void CPHElement::SetTransform(const Fmatrix& m0)
237{
238 VERIFY2(_valid(m0), "invalid_form_in_set_transform");
239 Fvector mc;
240 CPHGeometryOwner::get_mc_vs_transform(mc, m0);
241 VERIFY_BOUNDARIES2(mc, phBoundaries, PhysicsRefObject(), "mass center in set transform");
242 dBodySetPosition(m_body, mc.x, mc.y, mc.z);
243 Fmatrix33 m33;
244 m33.set(m0);
245 dMatrix3 R;
246 PHDynamicData::FMX33toDMX(m33, R);
247 dBodySetRotation(m_body, R);
248 CPHDisablingFull::Reinit();
249
250 VERIFY2(dBodyGetPosition(m_body), "not valide safe position");
251 VERIFY2(dBodyGetLinearVel(m_body), "not valide safe velocity");
252 m_flags.set(flUpdate, TRUE);
253 m_shell->spatial_move();
254}
255
256void CPHElement::getQuaternion(Fquaternion& quaternion)
257{

Callers

nothing calls this directly

Calls 7

dBodySetPositionFunction · 0.85
dBodySetRotationFunction · 0.85
dBodyGetPositionFunction · 0.85
dBodyGetLinearVelFunction · 0.85
_validFunction · 0.50
setMethod · 0.45
spatial_moveMethod · 0.45

Tested by

no test coverage detected