本文整理汇总了C++中CKinematics::LL_GetBindTransform方法的典型用法代码示例。如果您正苦于以下问题:C++ CKinematics::LL_GetBindTransform方法的具体用法?C++ CKinematics::LL_GetBindTransform怎么用?C++ CKinematics::LL_GetBindTransform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKinematics
的用法示例。
在下文中一共展示了CKinematics::LL_GetBindTransform方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
CCarWeapon::CCarWeapon(CPhysicsShellHolder* obj)
{
m_bActive = false;
m_bAutoFire = false;
m_object = obj;
m_Ammo = xr_new<CCartridge>();
CKinematics* K = smart_cast<CKinematics*>(m_object->Visual());
CInifile* pUserData = K->LL_UserData();
m_rotate_x_bone = K->LL_BoneID (pUserData->r_string("mounted_weapon_definition","rotate_x_bone"));
m_rotate_y_bone = K->LL_BoneID (pUserData->r_string("mounted_weapon_definition","rotate_y_bone"));
m_fire_bone = K->LL_BoneID (pUserData->r_string("mounted_weapon_definition","fire_bone"));
m_min_gun_speed = pUserData->r_float("mounted_weapon_definition","min_gun_speed");
m_max_gun_speed = pUserData->r_float("mounted_weapon_definition","max_gun_speed");
CBoneData& bdX = K->LL_GetData(m_rotate_x_bone); //VERIFY(bdX.IK_data.type==jtJoint);
m_lim_x_rot.set (bdX.IK_data.limits[0].limit.x,bdX.IK_data.limits[0].limit.y);
CBoneData& bdY = K->LL_GetData(m_rotate_y_bone); //VERIFY(bdY.IK_data.type==jtJoint);
m_lim_y_rot.set (bdY.IK_data.limits[1].limit.x,bdY.IK_data.limits[1].limit.y);
xr_vector<Fmatrix> matrices;
K->LL_GetBindTransform (matrices);
m_i_bind_x_xform.invert (matrices[m_rotate_x_bone]);
m_i_bind_y_xform.invert (matrices[m_rotate_y_bone]);
m_bind_x_rot = matrices[m_rotate_x_bone].k.getP();
m_bind_y_rot = matrices[m_rotate_y_bone].k.getH();
m_bind_x.set (matrices[m_rotate_x_bone].c);
m_bind_y.set (matrices[m_rotate_y_bone].c);
m_cur_x_rot = m_bind_x_rot;
m_cur_y_rot = m_bind_y_rot;
m_destEnemyDir.setHP (m_bind_y_rot,m_bind_x_rot);
m_object->XFORM().transform_dir (m_destEnemyDir);
inheritedShooting::Light_Create ();
Load (pUserData->r_string("mounted_weapon_definition","wpn_section"));
SetBoneCallbacks ();
m_object->processing_activate ();
m_weapon_h = matrices[m_rotate_y_bone].c.y;
m_fire_norm.set (0,1,0);
m_fire_dir.set (0,0,1);
m_fire_pos.set (0,0,0);
}