本文整理汇总了C++中LLMotion::aisync_loaded方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMotion::aisync_loaded方法的具体用法?C++ LLMotion::aisync_loaded怎么用?C++ LLMotion::aisync_loaded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMotion
的用法示例。
在下文中一共展示了LLMotion::aisync_loaded方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateLoadingMotions
//-----------------------------------------------------------------------------
// updateLoadingMotions()
//-----------------------------------------------------------------------------
void LLMotionController::updateLoadingMotions()
{
// query pending motions for completion
for (motion_set_t::iterator iter = mLoadingMotions.begin();
iter != mLoadingMotions.end(); )
{
motion_set_t::iterator curiter = iter++;
LLMotion* motionp = *curiter;
if( !motionp)
{
continue; // maybe shouldn't happen but i've seen it -MG
}
LLMotion::LLMotionInitStatus status = motionp->onInitialize(mCharacter);
if (status == LLMotion::STATUS_SUCCESS)
{
mLoadingMotions.erase(curiter);
// add motion to our loaded motion list
mLoadedMotions.insert(motionp);
// this motion should be playing
if (!motionp->isStopped())
{
//<singu>
F32 start_time = mAnimTime;
if (!mDisableSyncing)
{
motionp->aisync_loaded();
start_time = motionp->syncActivationTime(start_time);
}
++mDisableSyncing;
//</singu>
activateMotionInstance(motionp, start_time);
//<singu>
--mDisableSyncing;
//</singu>
}
}
else if (status == LLMotion::STATUS_FAILURE)
{
llinfos << "Motion " << motionp->getID() << " init failed." << llendl;
sRegistry.markBad(motionp->getID());
mLoadingMotions.erase(curiter);
// Singu note: a motion in mLoadingMotions will not be in mActiveMotions
// and therefore not be in mDeprecatedMotions. So, we don't have to
// check for it's existence there.
llassert(mDeprecatedMotions.find(motionp) == mDeprecatedMotions.end());
mAllMotions.erase(motionp->getID());
//<singu>
// Make sure we're not registered anymore.
motionp->unregister_client();
//</singu>
delete motionp;
}
}
}