本文整理汇总了C++中NxShape::getCCDSkeleton方法的典型用法代码示例。如果您正苦于以下问题:C++ NxShape::getCCDSkeleton方法的具体用法?C++ NxShape::getCCDSkeleton怎么用?C++ NxShape::getCCDSkeleton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NxShape
的用法示例。
在下文中一共展示了NxShape::getCCDSkeleton方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReleasePhysicActor
bool CPhysicsManager::ReleasePhysicActor (CPhysicActor* actor)
{
assert(actor != NULL);
assert(m_pScene != NULL);
assert(m_pPhysicsSDK != NULL);
bool isOk = false;
NxActor* nxActor = actor->GetPhXActor();
if( nxActor != 0)
{
NxArray<NxCCDSkeleton*> skeletons;
for (NxU32 i = 0; i < nxActor->getNbShapes(); i++)
{
NxShape* shape = nxActor->getShapes()[i];
if (shape->getCCDSkeleton() != NULL) {
skeletons.pushBack(shape->getCCDSkeleton());
}
}
for (NxU32 i = 0; i < skeletons.size(); i++)
{
m_pPhysicsSDK->releaseCCDSkeleton(*skeletons[i]);
}
m_pScene->releaseActor(*nxActor);
nxActor = 0;
}
return true;
}
示例2: ReleaseAllActors
//----------------------------------------------------------------------------
// ReleaseAllActors : Alliberem tots els actors de l'escena de PhysX
//----------------------------------------------------------------------------
bool CPhysicsManager::ReleaseAllActors ( void ) //EUserDataFlag _eFlags )
{
assert ( m_pScene != NULL );
assert ( m_pPhysicsSDK != NULL );
bool isOk = true;
NxActor** l_ppActorList = m_pScene->getActors();
NxU32 l_TotalActors = m_pScene->getNbActors();
while ( l_TotalActors -- )
{
NxActor* nxActor = *l_ppActorList;
if ( nxActor != 0)
{
NxArray<NxCCDSkeleton*> skeletons;
for (NxU32 i = 0; i < nxActor->getNbShapes(); i++)
{
NxShape* shape = nxActor->getShapes()[i];
if (shape->getCCDSkeleton() != NULL) {
skeletons.pushBack(shape->getCCDSkeleton());
}
}
for (NxU32 i = 0; i < skeletons.size(); i++)
{
m_pPhysicsSDK->releaseCCDSkeleton(*skeletons[i]);
}
m_pScene->releaseActor(*nxActor);
nxActor = 0;
}
}
return isOk;
}