本文整理汇总了C++中LLMotion::setName方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMotion::setName方法的具体用法?C++ LLMotion::setName怎么用?C++ LLMotion::setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMotion
的用法示例。
在下文中一共展示了LLMotion::setName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createMotion
//-----------------------------------------------------------------------------
// createMotion()
//-----------------------------------------------------------------------------
LLMotion* LLMotionController::createMotion( const LLUUID &id )
{
LLMemType mt(LLMemType::MTYPE_ANIMATION);
// do we have an instance of this motion for this character?
LLMotion *motion = findMotion(id);
// if not, we need to create one
if (!motion)
{
// look up constructor and create it
motion = sRegistry.createMotion(id);
if (!motion)
{
return NULL;
}
// look up name for default motions
const char* motion_name = gAnimLibrary.animStateToString(id);
if (motion_name)
{
motion->setName(motion_name);
}
// initialize the new instance
LLMotion::LLMotionInitStatus stat = motion->onInitialize(mCharacter);
switch(stat)
{
case LLMotion::STATUS_FAILURE:
llinfos << "Motion " << id << " init failed." << llendl;
sRegistry.markBad(id);
delete motion;
return NULL;
case LLMotion::STATUS_HOLD:
mLoadingMotions.insert(motion);
break;
case LLMotion::STATUS_SUCCESS:
// add motion to our list
mLoadedMotions.insert(motion);
break;
default:
llerrs << "Invalid initialization status" << llendl;
break;
}
mAllMotions[id] = motion;
}
return motion;
}
示例2: addKeyframeMotion
//-----------------------------------------------------------------------------
// LLKeyframeMotionParam::addKeyframeMotion()
//-----------------------------------------------------------------------------
BOOL LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value)
{
LLMotion *newMotion = mCharacter->createMotion( id );
if (!newMotion)
{
return FALSE;
}
newMotion->setName(name);
// now add motion to this list
mParameterizedMotions[param].insert(ParameterizedMotion(newMotion, value));
return TRUE;
}