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

Method activate_physic_shell

ogsr_engine/xrGame/CustomRocket.cpp:111–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111void CCustomRocket::activate_physic_shell()
112{
113 VERIFY(H_Parent());
114 VERIFY(!m_pPhysicsShell);
115 create_physic_shell();
116 if (m_pPhysicsShell->isActive())
117 return;
118 VERIFY2(_valid(m_LaunchXForm), "CCustomRocket::activate_physic_shell. Invalid m_LaunchXForm!");
119
120 // if(m_pOwner->ID()==Actor()->ID())
121 // {
122 // Msg("start v: %f,%f,%f \n",m_vLaunchVelocity.x,m_vLaunchVelocity.y,m_vLaunchVelocity.z);
123 // }
124 m_pPhysicsShell->Activate(m_LaunchXForm, m_vLaunchVelocity, m_vLaunchAngularVelocity);
125 m_pPhysicsShell->Update();
126
127 XFORM().set(m_pPhysicsShell->mXFORM);
128 Position().set(m_pPhysicsShell->mXFORM.c);
129 m_pPhysicsShell->set_PhysicsRefObject(this);
130 m_pPhysicsShell->set_ObjectContactCallback(ObjectContactCallback);
131 m_pPhysicsShell->set_ContactCallback(NULL);
132 m_pPhysicsShell->SetAirResistance(0.f, 0.f);
133 m_pPhysicsShell->set_DynamicScales(1.f, 1.f);
134 m_pPhysicsShell->SetAllGeomTraced();
135}
136
137void CCustomRocket::create_physic_shell()
138{

Callers

nothing calls this directly

Calls 13

H_ParentFunction · 0.85
XFORMFunction · 0.85
SetAllGeomTracedMethod · 0.80
_validFunction · 0.50
isActiveMethod · 0.45
ActivateMethod · 0.45
UpdateMethod · 0.45
setMethod · 0.45
set_PhysicsRefObjectMethod · 0.45
set_ContactCallbackMethod · 0.45
SetAirResistanceMethod · 0.45

Tested by

no test coverage detected