本文整理汇总了C++中LLMotion::getMinPixelArea方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMotion::getMinPixelArea方法的具体用法?C++ LLMotion::getMinPixelArea怎么用?C++ LLMotion::getMinPixelArea使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMotion
的用法示例。
在下文中一共展示了LLMotion::getMinPixelArea方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateMotionsByType
void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type)
{
BOOL update_result = TRUE;
U8 last_joint_signature[LL_CHARACTER_MAX_JOINTS];
memset(&last_joint_signature, 0, sizeof(U8) * LL_CHARACTER_MAX_JOINTS);
// iterate through active motions in chronological order
for (motion_list_t::iterator iter = mActiveMotions.begin();
iter != mActiveMotions.end(); )
{
motion_list_t::iterator curiter = iter++;
LLMotion* motionp = *curiter;
if (motionp->getBlendType() != anim_type)
{
continue;
}
BOOL update_motion = FALSE;
if (motionp->getPose()->getWeight() < 1.f)
{
update_motion = TRUE;
}
else
{
// NUM_JOINT_SIGNATURE_STRIDES should be multiple of 4
for (S32 i = 0; i < NUM_JOINT_SIGNATURE_STRIDES; i++)
{
U32 *current_signature = (U32*)&(mJointSignature[0][i * 4]);
U32 test_signature = *(U32*)&(motionp->mJointSignature[0][i * 4]);
if ((*current_signature | test_signature) > (*current_signature))
{
*current_signature |= test_signature;
update_motion = TRUE;
}
*((U32*)&last_joint_signature[i * 4]) = *(U32*)&(mJointSignature[1][i * 4]);
current_signature = (U32*)&(mJointSignature[1][i * 4]);
test_signature = *(U32*)&(motionp->mJointSignature[1][i * 4]);
if ((*current_signature | test_signature) > (*current_signature))
{
*current_signature |= test_signature;
update_motion = TRUE;
}
}
}
if (!update_motion)
{
updateIdleMotion(motionp);
continue;
}
LLPose *posep = motionp->getPose();
// only filter by LOD after running every animation at least once (to prime the avatar state)
if (mHasRunOnce && motionp->getMinPixelArea() > mCharacter->getPixelArea())
{
motionp->fadeOut();
//should we notify the simulator that this motion should be stopped (check even if skipped by LOD logic)
if (mAnimTime > motionp->mSendStopTimestamp)
{
// notify character of timed stop event on first iteration past sendstoptimestamp
// this will only be called when an animation stops itself (runs out of time)
if (mLastTime <= motionp->mSendStopTimestamp)
{
mCharacter->requestStopMotion( motionp );
stopMotionInstance(motionp, FALSE);
}
}
if (motionp->getFadeWeight() < 0.01f)
{
if (motionp->isStopped() && mAnimTime > motionp->getStopTime() + motionp->getEaseOutDuration())
{
posep->setWeight(0.f);
deactivateMotionInstance(motionp);
}
continue;
}
}
else
{
motionp->fadeIn();
}
//**********************
// MOTION INACTIVE
//**********************
if (motionp->isStopped() && mAnimTime > motionp->getStopTime() + motionp->getEaseOutDuration())
{
// this motion has gone on too long, deactivate it
// did we have a chance to stop it?
if (mLastTime <= motionp->getStopTime())
{
// if not, let's stop it this time through and deactivate it the next
//.........这里部分代码省略.........