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

Method CPhysicsShellAnimator

ogsr_engine/xrGame/PhysicsShellAnimator.cpp:11–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9ICF bool no_physics_shape(const SBoneShape& shape);
10
11CPhysicsShellAnimator::CPhysicsShellAnimator(CPhysicsShell* _pPhysicsShell) : m_pPhysicsShell(_pPhysicsShell)
12{
13 for (xr_vector<CPHElement*>::iterator i = m_pPhysicsShell->Elements().begin(); i != m_pPhysicsShell->Elements().end(); i++)
14 {
15 CPhysicsShellAnimatorBoneData PhysicsShellAnimatorBoneDataC;
16 PhysicsShellAnimatorBoneDataC.m_element = *i;
17 CBoneInstance& B = m_pPhysicsShell->PKinematics()->LL_GetBoneInstance(PhysicsShellAnimatorBoneDataC.m_element->m_SelfID);
18 B.reset_callback();
19 PhysicsShellAnimatorBoneDataC.m_anim_fixed_dJointID = dJointCreateFixed(0, 0);
20 ((CPHShell*)(m_pPhysicsShell))->Island().DActiveIsland()->AddJoint(PhysicsShellAnimatorBoneDataC.m_anim_fixed_dJointID);
21 dJointAttach(PhysicsShellAnimatorBoneDataC.m_anim_fixed_dJointID, PhysicsShellAnimatorBoneDataC.m_element->get_body(), 0);
22 dJointSetFixed(PhysicsShellAnimatorBoneDataC.m_anim_fixed_dJointID);
23 m_bones_data.push_back(PhysicsShellAnimatorBoneDataC);
24 }
25
26 for (u16 i = 0; i < m_pPhysicsShell->get_JointsNumber(); i++)
27 {
28 ((CPHShell*)(m_pPhysicsShell))->DeleteJoint(i);
29 }
30}
31
32CPhysicsShellAnimator::~CPhysicsShellAnimator()
33{

Callers

nothing calls this directly

Calls 11

dJointCreateFixedFunction · 0.85
dJointAttachFunction · 0.85
dJointSetFixedFunction · 0.85
AddJointMethod · 0.80
get_JointsNumberMethod · 0.80
DeleteJointMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
DActiveIslandMethod · 0.45
get_bodyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected