本文整理汇总了C++中CKinematics::CalculateBones_Invalidate方法的典型用法代码示例。如果您正苦于以下问题:C++ CKinematics::CalculateBones_Invalidate方法的具体用法?C++ CKinematics::CalculateBones_Invalidate怎么用?C++ CKinematics::CalculateBones_Invalidate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKinematics
的用法示例。
在下文中一共展示了CKinematics::CalculateBones_Invalidate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateCL
void CCarWeapon::UpdateCL()
{
if(!m_bActive) return;
UpdateBarrelDir ();
CKinematics* K = smart_cast<CKinematics*>(m_object->Visual());
K->CalculateBones_Invalidate();
K->CalculateBones ();
UpdateFire ();
}
示例2: RespawnInit
void CHangingLamp::RespawnInit()
{
Init();
if(Visual()){
CKinematics* K = smart_cast<CKinematics*>(Visual());
K->LL_SetBonesVisible(u64(-1));
K->CalculateBones_Invalidate();
K->CalculateBones ();
}
}
示例3:
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 ();
}
示例4: UpdateXFORM
void CPhysicsShellHolder::UpdateXFORM(const Fmatrix &upd)
{
inherited::UpdateXFORM(upd);
static int method = 1 + 4 + 8; // alpet: набор флагов для отладки, можно менять значение во время выполнения из Watches
if (PPhysicsShell())
{
// m_pPhysicsShell->SetTransform(upd);
if (method & 1)
{
PPhysicsShell()->mXFORM.set(upd);
PPhysicsShell()->SetGlTransformDynamic(upd);
}
if (method & 2)
{ // стянуто из Car.cpp и как-то не так работает
bool enable = PPhysicsShell()->isEnabled();
Fmatrix inv, replace;
Fmatrix restored_form;
PPhysicsShell()->GetGlobalTransformDynamic(&restored_form);
inv.set(restored_form);
inv.invert();
replace.mul(upd, inv);
PPhysicsShell()->SetTransform (replace);
if (enable) PPhysicsShell()->Enable();
else PPhysicsShell()->Disable();
// PPhysicsShell()->GetGlobalTransformDynamic(&XFORM());
}
// пересчет костей
CKinematics *K = PKinematics(Visual());
if (K)
{
K->CalculateBones_Invalidate();
K->CalculateBones();
}
if (method & 4)
PPhysicsShell()->Update();
if (method & 8)
PPhysicsShell()->GetGlobalTransformDynamic(&XFORM());
}
}
示例5: 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;
}