本文整理汇总了C++中LLVisualParam::linkDrivenParams方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVisualParam::linkDrivenParams方法的具体用法?C++ LLVisualParam::linkDrivenParams怎么用?C++ LLVisualParam::linkDrivenParams使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLVisualParam
的用法示例。
在下文中一共展示了LLVisualParam::linkDrivenParams方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createVisualParams
void LLWearable::createVisualParams()
{
for (LLViewerVisualParam* param = (LLViewerVisualParam*) gAgentAvatarp->getFirstVisualParam();
param;
param = (LLViewerVisualParam*) gAgentAvatarp->getNextVisualParam())
{
if (param->getWearableType() == mType)
{
addVisualParam(param->cloneParam(this));
}
}
// resync driver parameters to point to the newly cloned driven parameters
for (visual_param_index_map_t::iterator param_iter = mVisualParamIndexMap.begin();
param_iter != mVisualParamIndexMap.end();
++param_iter)
{
LLVisualParam* param = param_iter->second;
LLVisualParam*(LLWearable::*wearable_function)(S32)const = &LLWearable::getVisualParam;
// need this line to disambiguate between versions of LLCharacter::getVisualParam()
LLVisualParam*(LLVOAvatarSelf::*avatar_function)(S32)const = &LLVOAvatarSelf::getVisualParam;
param->resetDrivenParams();
if(!param->linkDrivenParams(boost::bind(wearable_function,(LLWearable*)this, _1), false))
{
if( !param->linkDrivenParams(boost::bind(avatar_function,gAgentAvatarp.get(),_1 ), true))
{
llwarns << "could not link driven params for wearable " << getName() << " id: " << param->getID() << llendl;
continue;
}
}
}
}
示例2: createVisualParams
void LLWearable::createVisualParams(LLAvatarAppearance *avatarp)
{
for (LLViewerVisualParam* param = (LLViewerVisualParam*) avatarp->getFirstVisualParam();
param;
param = (LLViewerVisualParam*) avatarp->getNextVisualParam())
{
if (param->getWearableType() == mType)
{
LLVisualParam *clone_param = param->cloneParam(this);
clone_param->setParamLocation(LOC_UNKNOWN);
clone_param->setParamLocation(LOC_WEARABLE);
addVisualParam(clone_param);
}
}
// resync driver parameters to point to the newly cloned driven parameters
for (visual_param_index_map_t::iterator param_iter = mVisualParamIndexMap.begin();
param_iter != mVisualParamIndexMap.end();
++param_iter)
{
LLVisualParam* param = param_iter->second;
LLVisualParam*(LLWearable::*wearable_function)(S32)const = &LLWearable::getVisualParam;
// need this line to disambiguate between versions of LLCharacter::getVisualParam()
LLVisualParam*(LLAvatarAppearance::*param_function)(S32)const = &LLAvatarAppearance::getVisualParam;
param->resetDrivenParams();
if(!param->linkDrivenParams(boost::bind(wearable_function,(LLWearable*)this, _1), false))
{
if( !param->linkDrivenParams(boost::bind(param_function,avatarp,_1 ), true))
{
LL_WARNS() << "could not link driven params for wearable " << getName() << " id: " << param->getID() << LL_ENDL;
continue;
}
}
}
}