本文整理汇总了C++中LLMotion::setStopTime方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMotion::setStopTime方法的具体用法?C++ LLMotion::setStopTime怎么用?C++ LLMotion::setStopTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMotion
的用法示例。
在下文中一共展示了LLMotion::setStopTime方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: stopMotionLocally
//-----------------------------------------------------------------------------
// stopMotionLocally()
//-----------------------------------------------------------------------------
BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate)
{
// if already inactive, return false
LLMotion *motion = findMotion(id);
if (!motion)
{
return FALSE;
}
// If on active list, stop it
if (isMotionActive(motion) && !motion->isStopped())
{
// when using timesteps, set stop time to last frame's time, otherwise grab current timer value
// *FIX: should investigate this inconsistency...hints of obscure bugs
F32 stop_time = (mTimeStep != 0.f || mPaused) ? (mTime) : mTimeOffset + (mTimer.getElapsedTimeF32() * mTimeFactor);
motion->setStopTime(stop_time);
if (stop_immediate)
{
deactivateMotion(motion, false);
}
return TRUE;
}
else if (isMotionLoading(motion))
{
motion->setStopped(TRUE);
return TRUE;
}
return FALSE;
}
示例2: setTimeStep
//-----------------------------------------------------------------------------
// setTimeStep()
//-----------------------------------------------------------------------------
void LLMotionController::setTimeStep(F32 step)
{
mTimeStep = step;
if (step != 0.f)
{
// make sure timestamps conform to new quantum
for (motion_list_t::iterator iter = mActiveMotions.begin();
iter != mActiveMotions.end(); ++iter)
{
LLMotion* motionp = *iter;
motionp->mActivationTimestamp = (F32)llfloor(motionp->mActivationTimestamp / step) * step;
BOOL stopped = motionp->isStopped();
motionp->setStopTime((F32)llfloor(motionp->getStopTime() / step) * step);
motionp->setStopped(stopped);
motionp->mSendStopTimestamp = (F32)llfloor(motionp->mSendStopTimestamp / step) * step;
}
}
}