本文整理汇总了C++中ISkeletonAnim::StopAnimationsAllLayers方法的典型用法代码示例。如果您正苦于以下问题:C++ ISkeletonAnim::StopAnimationsAllLayers方法的具体用法?C++ ISkeletonAnim::StopAnimationsAllLayers怎么用?C++ ISkeletonAnim::StopAnimationsAllLayers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISkeletonAnim
的用法示例。
在下文中一共展示了ISkeletonAnim::StopAnimationsAllLayers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Reset
//------------------------------------------------------------------------
void CVehiclePartAnimated::Reset()
{
CVehiclePartBase::Reset();
SetDrivingProxy(false);
if (m_slot > -1 && m_pCharInstance)
{
ISkeletonAnim* pSkeletonAnim = m_pCharInstance->GetISkeletonAnim();
CRY_ASSERT(pSkeletonAnim);
ISkeletonPose* pSkeletonPose = m_pCharInstance->GetISkeletonPose();
CRY_ASSERT(pSkeletonPose);
IDefaultSkeleton &rIDefaultSkeleton = m_pCharInstance->GetIDefaultSkeleton();
pSkeletonAnim->StopAnimationsAllLayers();
pSkeletonPose->SetDefaultPose();
pSkeletonPose->SetForceSkeletonUpdate(0);
for (int i = 0; i < rIDefaultSkeleton.GetJointCount(); ++i)
{
pSkeletonPose->SetMaterialOnJoint(i, NULL);
}
}
m_iRotChangedFrameId = 0;
}
示例2: StopAnimationsInAllLayers
void CScriptbind_Entity::StopAnimationsInAllLayers(IEntity *pEntity, int slot)
{
ICharacterInstance *pCharacter = pEntity->GetCharacter(slot);
if(!pCharacter)
return;
ISkeletonAnim *pSkeletonAnim = pCharacter->GetISkeletonAnim();
if(!pSkeletonAnim)
return;
pSkeletonAnim->StopAnimationsAllLayers();
}
示例3: InitGeometry
//------------------------------------------------------------------------
void CVehiclePartAnimated::InitGeometry()
{
if (!m_pSharedParameters->m_filename.empty())
{
m_slot = GetEntity()->LoadCharacter(m_slot, m_pSharedParameters->m_filename.c_str());
m_pCharInstance = GetEntity()->GetCharacter(m_slot);
if (m_pCharInstance)
{
if (m_pCharInstance->GetIMaterial() && !GetEntity()->GetMaterial())
{
SetMaterial(m_pCharInstance->GetIMaterial());
}
ISkeletonAnim* pSkeletonAnim = m_pCharInstance->GetISkeletonAnim();
ISkeletonPose* pSkeletonPose = m_pCharInstance->GetISkeletonPose();
IDefaultSkeleton &rIDefaultSkeleton = m_pCharInstance->GetIDefaultSkeleton();
if (pSkeletonAnim)
pSkeletonAnim->StopAnimationsAllLayers();
if (m_hideCount == 0)
GetEntity()->SetSlotFlags(m_slot, GetEntity()->GetSlotFlags(m_slot) | ENTITY_SLOT_RENDER);
else
GetEntity()->SetSlotFlags(m_slot, GetEntity()->GetSlotFlags(m_slot) & ~(ENTITY_SLOT_RENDER | ENTITY_SLOT_RENDER_NEAREST));
#if ENABLE_VEHICLE_DEBUG
if (IsDebugParts())
{
CryLog("joint transformations for %s", m_pCharInstance->GetFilePath());
for (int i = 0; i < rIDefaultSkeleton.GetJointCount(); ++i)
{
VehicleUtils::LogMatrix(rIDefaultSkeleton.GetJointNameByID(i), Matrix34(pSkeletonPose->GetRelJointByID(i)));
}
}
#endif
}
if (!m_pCharInstanceDestroyed && !m_pSharedParameters->m_filenameDestroyed.empty())
m_pCharInstanceDestroyed = gEnv->pCharacterManager->CreateInstance(m_pSharedParameters->m_filenameDestroyed.c_str());
if (m_pCharInstanceDestroyed)
{
m_pCharInstanceDestroyed->AddRef();
#if ENABLE_VEHICLE_DEBUG
if (IsDebugParts())
{
CryLog("joint transformations for %s", m_pCharInstanceDestroyed->GetFilePath());
ISkeletonPose* pSkeletonDestroyed = m_pCharInstanceDestroyed->GetISkeletonPose();
IDefaultSkeleton &rIDefaultSkeleton = m_pCharInstanceDestroyed->GetIDefaultSkeleton();
for (int i = 0; i < rIDefaultSkeleton.GetJointCount(); ++i)
{
VehicleUtils::LogMatrix(rIDefaultSkeleton.GetJointNameByID(i), Matrix34(pSkeletonDestroyed->GetRelJointByID(i)));
}
}
#endif
}
}
if (m_pSharedParameters->m_isPhysicalized && m_slot > -1)
GetEntity()->UnphysicalizeSlot(m_slot);
if (m_pCharInstance)
{
m_pCharInstance->GetISkeletonAnim()->StopAnimationsAllLayers();
if (m_hideCount == 0)
GetEntity()->SetSlotFlags(m_slot, GetEntity()->GetSlotFlags(m_slot) | ENTITY_SLOT_RENDER);
else
GetEntity()->SetSlotFlags(m_slot, GetEntity()->GetSlotFlags(m_slot) & ~(ENTITY_SLOT_RENDER | ENTITY_SLOT_RENDER_NEAREST));
}
// Disable hand-placed (static) decals on vehicles
GetEntity()->SetFlags(GetEntity()->GetFlags() | ENTITY_FLAG_NO_DECALNODE_DECALS);
}