本文整理汇总了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();