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


C++ LLAvatarListEntry::setPosition方法代码示例

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


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

示例1: updateAvatarList


//.........这里部分代码省略.........
				// or if the avatar is a dummy
				if (avatarp->isDead() || avatarp->isSelf() || avatarp->mIsDummy)
				{
					continue;
				}

				// Get avatar data
				position = gAgent.getPosGlobalFromAgent(avatarp->getCharacterPosition());
				name = avatarp->getFullname();

				if (!LLAvatarNameCache::getPNSName(avatarp->getID(), name))
					continue;

				//duped for lower section
				if (name.empty() || (name.compare(" ") == 0))// || (name.compare(gCacheName->getDefaultName()) == 0))
				{
					if (!gCacheName->getFullName(avid, name)) //seems redudant with LLAvatarNameCache::getPNSName above...
					{
						continue;
					}
				}

				if (avid.isNull())
				{
					//llinfos << "Key empty for avatar " << name << llendl;
					continue;
				}

				LLAvatarListEntry* entry = getAvatarEntry(avid);
				if (entry)
				{
					// Avatar already in list, update position
					F32 dist = (F32)(position - mypos).magVec();
					entry->setPosition(position, (avatarp->getRegion() == gAgent.getRegion()), true, dist < 20.0, dist < 100.0);
					if(avatarp->isTyping())entry->setActivity(LLAvatarListEntry::ACTIVITY_TYPING);
				}
				else
				{
					// Avatar not there yet, add it
					if(announce && avatarp->getRegion() == gAgent.getRegion())
						announce_keys.push(avid);
					mAvatars.push_back(LLAvatarListEntryPtr(new LLAvatarListEntry(avid, name, position)));
				}
			}
			else
			{
				if (i < positions.size())
				{
					position = positions[i];
				}
				else
				{
					continue;
				}

				if (!LLAvatarNameCache::getPNSName(avid, name))
				{
					//name = gCacheName->getDefaultName();
					continue; //prevent (Loading...)
				}

				LLAvatarListEntry* entry = getAvatarEntry(avid);
				if (entry)
				{
					// Avatar already in list, update position
					F32 dist = (F32)(position - mypos).magVec();
开发者ID:aragornarda,项目名称:SingularityViewer,代码行数:67,代码来源:llfloateravatarlist.cpp


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