当前位置: 首页>>代码示例>>C++>>正文


C++ LLVisualParam::linkDrivenParams方法代码示例

本文整理汇总了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;
			}
		}
	}
}
开发者ID:OS-Development,项目名称:VW.Dolphin_v3,代码行数:32,代码来源:llwearable.cpp

示例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;
			}
		}
	}
}
开发者ID:AdeonWriter,项目名称:SingularityViewer,代码行数:35,代码来源:llwearable.cpp


注:本文中的LLVisualParam::linkDrivenParams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。