本文整理汇总了C++中CKinematics::LL_SetBoneVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ CKinematics::LL_SetBoneVisible方法的具体用法?C++ CKinematics::LL_SetBoneVisible怎么用?C++ CKinematics::LL_SetBoneVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKinematics
的用法示例。
在下文中一共展示了CKinematics::LL_SetBoneVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CHangingLamp::TurnOn ()
{
light_render->set_active (true);
if (glow_render) glow_render->set_active (true);
if (light_ambient) light_ambient->set_active (true);
if (Visual()){
CKinematics* K = smart_cast<CKinematics*>(Visual());
K->LL_SetBoneVisible (light_bone, TRUE, TRUE);
K->CalculateBones_Invalidate();
K->CalculateBones ();
}
processing_activate ();
}
示例2: DieHelicopter
void CHelicopter::DieHelicopter()
{
if ( state() == CHelicopter::eDead )
return;
CEntity::Die(NULL);
m_engineSound.stop ();
m_brokenSound.create (pSettings->r_string(*cNameSect(), "broken_snd"),st_Effect,sg_SourceType);
m_brokenSound.play_at_pos (0,XFORM().c,sm_Looped);
CKinematics* K = smart_cast<CKinematics*>(Visual());
if(true /*!PPhysicsShell()*/){
string256 I;
LPCSTR bone;
u16 bone_id;
for (u32 i=0, n=_GetItemCount(*m_death_bones_to_hide); i<n; ++i){
bone = _GetItem(*m_death_bones_to_hide,i,I);
bone_id = K->LL_BoneID (bone);
K->LL_SetBoneVisible(bone_id,FALSE,TRUE);
}
///PPhysicsShell()=P_build_Shell (this,false);
PPhysicsShell()->EnabledCallbacks(TRUE);
PPhysicsShell()->set_ObjectContactCallback(CollisionCallbackDead);
PPhysicsShell()->set_ContactCallback(ContactShotMark);
}
Fvector lin_vel;
Fvector prev_pos = PositionStack.front().vPosition;
lin_vel.sub (XFORM().c,prev_pos);
if(Device.dwTimeGlobal != PositionStack.front().dwTime)
lin_vel.div((Device.dwTimeGlobal-PositionStack.front().dwTime)/1000.0f);
lin_vel.mul (m_death_lin_vel_k);
PPhysicsShell()->set_LinearVel (lin_vel);
PPhysicsShell()->set_AngularVel (m_death_ang_vel);
PPhysicsShell()->Enable ();
K->CalculateBones_Invalidate ();
K->CalculateBones ();
setState (CHelicopter::eDead);
m_engineSound.stop ();
processing_deactivate ();
m_dead = true;
}