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


C++ LLVOAvatar::getActualButtGrav方法代码示例

本文整理汇总了C++中LLVOAvatar::getActualButtGrav方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVOAvatar::getActualButtGrav方法的具体用法?C++ LLVOAvatar::getActualButtGrav怎么用?C++ LLVOAvatar::getActualButtGrav使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLVOAvatar的用法示例。


在下文中一共展示了LLVOAvatar::getActualButtGrav方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: isDirty

// Avatar parameter and texture definitions can change over time.
// * If parameters or textures have been REMOVED since the wearable was created,
// they're just ignored, so we consider the wearable clean even though isOldVersion()
// will return true. 
// * If parameters or textures have been ADDED since the wearable was created,
// they are taken to have default values, so we consider the wearable clean
// only if those values are the same as the defaults.
BOOL LLWearable::isDirty()
{
	LLVOAvatar* avatar = gAgent.getAvatarObject();
	llassert( avatar );
	if( !avatar )
	{
		return FALSE;
	}


	for( LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam(); 
		param;
		param = (LLViewerVisualParam*) avatar->getNextVisualParam() )
	{
		if (param->getWearableType() == mType && param->isTweakable())
		{
			F32 weight = get_if_there(mVisualParamMap, param->getID(), param->getDefaultWeight());
			weight = llclamp( weight, param->getMinWeight(), param->getMaxWeight() );
			
			U8 a = F32_to_U8( param->getWeight(), param->getMinWeight(), param->getMaxWeight() );

			if(avatar->getAppearanceFlag() == true)
			{
				//boob
				if(param->getID() == 507)
				{
						weight = get_if_there(mVisualParamMap, param->getID(), avatar->getActualBoobGrav());
						weight = llclamp( weight, param->getMinWeight(), param->getMaxWeight() );
				}
				//butt
				if(param->getID() == 795)
				{
						weight = get_if_there(mVisualParamMap, param->getID(), avatar->getActualButtGrav());
						weight = llclamp( weight, param->getMinWeight(), param->getMaxWeight() );
				}
				//fat
				if(param->getID() == 157)
				{
						weight = get_if_there(mVisualParamMap, param->getID(), avatar->getActualFatGrav());
						weight = llclamp( weight, param->getMinWeight(), param->getMaxWeight() );
				}
			}
			else
			{
				//boob
				if(param->getID() == 507)
				{
						a = F32_to_U8( avatar->getActualBoobGrav(), param->getMinWeight(), param->getMaxWeight() );
				}
				//butt
				if(param->getID() == 795)
				{
						a = F32_to_U8( avatar->getActualButtGrav(), param->getMinWeight(), param->getMaxWeight() );
				}
				//fat
				if(param->getID() == 157)
				{
						a = F32_to_U8( avatar->getActualFatGrav(), param->getMinWeight(), param->getMaxWeight() );
				}
			}

			
			U8 b = F32_to_U8( weight, param->getMinWeight(), param->getMaxWeight() );
			if( a != b  )
			{
				llwarns << "param ID " << param->getID() << " was changed." << llendl;
				return TRUE;
			}
		}
	}

	for( S32 te = 0; te < TEX_NUM_INDICES; te++ )
	{
		if( LLVOAvatar::getTEWearableType((ETextureIndex) te ) == mType )
		{
			LLViewerImage* avatar_image = avatar->getTEImage( te );
			if( !avatar_image )
			{
				llassert( 0 );
				continue;
			}
			const LLUUID& image_id = get_if_there(mTEMap,  te, LLVOAvatar::getDefaultTEImageID((ETextureIndex) te ) );
			if( avatar_image->getID() != image_id )
			{
				return TRUE;
			}
		}
	}

	//if( gFloaterCustomize )
	//{
	//	if( mDescription != gFloaterCustomize->getWearableDescription( mType ) )
	//	{
//.........这里部分代码省略.........
开发者ID:9skunks,项目名称:imprudence,代码行数:101,代码来源:llwearable.cpp


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