| 9 | ICF bool no_physics_shape(const SBoneShape& shape); |
| 10 | |
| 11 | CPhysicsShellAnimator::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 | |
| 32 | CPhysicsShellAnimator::~CPhysicsShellAnimator() |
| 33 | { |
nothing calls this directly
no test coverage detected