本文整理汇总了C++中LLAvatarListEntry::getID方法的典型用法代码示例。如果您正苦于以下问题:C++ LLAvatarListEntry::getID方法的具体用法?C++ LLAvatarListEntry::getID怎么用?C++ LLAvatarListEntry::getID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLAvatarListEntry
的用法示例。
在下文中一共展示了LLAvatarListEntry::getID方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: focusOnCurrent
void LLFloaterAvatarList::focusOnCurrent()
{
std::map<LLUUID, LLAvatarListEntry>::iterator iter;
LLAvatarListEntry *entry;
if (mAvatars.size() == 0)
{
return;
}
for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++)
{
entry = &iter->second;
if (entry->isDead())
continue;
if (entry->getID() == mFocusedAvatar)
{
removeFocusFromAll();
entry->setFocus(TRUE);
gAgentCamera.lookAtObject(mFocusedAvatar, false);
return;
}
}
}
示例2: expireAvatarList
void LLFloaterAvatarList::expireAvatarList()
{
// llinfos << "radar: expiring" << llendl;
std::map<LLUUID, LLAvatarListEntry>::iterator iter;
std::queue<LLUUID> delete_queue;
bool alive;
for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++)
{
LLAvatarListEntry *entry = &iter->second;
alive = entry->getAlive();
if (entry->isDead())
{
//llinfos << "radar: expiring avatar " << entry->getName() << llendl;
LLUUID av_id = entry->getID();
delete_queue.push(av_id);
}
}
while (!delete_queue.empty())
{
mAvatars.erase(delete_queue.front());
delete_queue.pop();
}
}
示例3: focusOnNext
void LLFloaterAvatarList::focusOnNext(BOOL marked_only)
{
std::map<LLUUID, LLAvatarListEntry>::iterator iter;
BOOL found = FALSE;
LLAvatarListEntry *next = NULL;
LLAvatarListEntry *entry;
if (mAvatars.size() == 0)
{
return;
}
for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++)
{
entry = &iter->second;
if (entry->isDead())
continue;
if (next == NULL && ((!marked_only && entry->isDrawn()) || entry->isMarked()))
{
next = entry;
}
if (found && ((!marked_only && entry->isDrawn()) || entry->isMarked()))
{
next = entry;
break;
}
if (entry->getID() == mFocusedAvatar)
{
found = TRUE;
}
}
if (next != NULL)
{
removeFocusFromAll();
next->setFocus(TRUE);
mFocusedAvatar = next->getID();
gAgentCamera.lookAtObject(mFocusedAvatar, false);
}
}
示例4: onClickAR
//static
void LLFloaterAvatarList::onClickAR(void *userdata)
{
LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata;
LLScrollListItem *item = self->mAvatarList->getFirstSelected();
if (item)
{
LLUUID agent_id = item->getUUID();
LLAvatarListEntry *entry = self->getAvatarEntry(agent_id);
if (entry)
{
LLFloaterReporter::showFromObject(entry->getID());
}
}
}
示例5: focusOnPrev
void LLFloaterAvatarList::focusOnPrev(BOOL marked_only)
{
std::map<LLUUID, LLAvatarListEntry>::iterator iter;
LLAvatarListEntry *prev = NULL;
LLAvatarListEntry *entry;
if (mAvatars.size() == 0)
{
return;
}
for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++)
{
entry = &iter->second;
if (entry->isDead())
continue;
if (prev != NULL && entry->getID() == mFocusedAvatar)
{
break;
}
if ((!marked_only && entry->isDrawn()) || entry->isMarked())
{
prev = entry;
}
}
if (prev != NULL)
{
removeFocusFromAll();
prev->setFocus(TRUE);
mFocusedAvatar = prev->getID();
gAgentCamera.lookAtObject(mFocusedAvatar, false);
}
}
示例6: onClickSendKeys
void LLFloaterAvatarList::onClickSendKeys(void *userdata)
{
LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata;
std::map<LLUUID, LLAvatarListEntry>::iterator iter;
LLAvatarListEntry *entry;
if (self->mAvatars.size() == 0)
return;
for (iter = self->mAvatars.begin(); iter != self->mAvatars.end(); iter++)
{
entry = &iter->second;
if (!entry->isDead() && entry->isInSim())
announce(entry->getID().asString());
}
}
示例7: refreshAvatarList
/**
* Redraws the avatar list
* Only does anything if the avatar list is visible.
* @author Dale Glass
*/
void LLFloaterAvatarList::refreshAvatarList()
{
// Don't update list when interface is hidden
if (!sInstance->getVisible()) return;
// We rebuild the list fully each time it's refreshed
// The assumption is that it's faster to refill it and sort than
// to rebuild the whole list.
LLDynamicArray<LLUUID> selected = mAvatarList->getSelectedIDs();
S32 scrollpos = mAvatarList->getScrollPos();
mAvatarList->deleteAllItems();
LLVector3d mypos = gAgent.getPositionGlobal();
LLVector3d posagent;
posagent.setVec(gAgent.getPositionAgent());
LLVector3d simpos = mypos - posagent;
std::map<LLUUID, LLAvatarListEntry>::iterator iter;
for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++)
{
LLSD element;
LLUUID av_id;
std::string av_name;
LLAvatarListEntry *entry = &iter->second;
// Skip if avatar hasn't been around
if (entry->isDead())
{
continue;
}
av_id = entry->getID();
av_name = entry->getName().c_str();
LLVector3d position = entry->getPosition();
BOOL UnknownAltitude = false;
LLVector3d delta = position - mypos;
F32 distance = (F32)delta.magVec();
if (position.mdV[VZ] == 0.0)
{
UnknownAltitude = true;
distance = 9000.0;
}
delta.mdV[2] = 0.0f;
F32 side_distance = (F32)delta.magVec();
// HACK: Workaround for an apparent bug:
// sometimes avatar entries get stuck, and are registered
// by the client as perpetually moving in the same direction.
// this makes sure they get removed from the visible list eventually
//jcool410 -- this fucks up seeing dueds thru minimap data > 1024m away, so, lets just say > 2048m to the side is bad
//aka 8 sims
if (side_distance > 2048.0f)
{
continue;
}
if (av_id.isNull())
{
//llwarns << "Avatar with null key somehow got into the list!" << llendl;
continue;
}
element["id"] = av_id;
element["columns"][LIST_MARK]["column"] = "marked";
element["columns"][LIST_MARK]["type"] = "text";
if (entry->isMarked())
{
element["columns"][LIST_MARK]["value"] = "X";
element["columns"][LIST_MARK]["color"] = LLColor4::blue.getValue();
element["columns"][LIST_MARK]["font-style"] = "BOLD";
}
else
{
element["columns"][LIST_MARK]["value"] = "";
}
element["columns"][LIST_AVATAR_NAME]["column"] = "avatar_name";
element["columns"][LIST_AVATAR_NAME]["type"] = "text";
element["columns"][LIST_AVATAR_NAME]["value"] = av_name;
if (entry->isFocused())
{
element["columns"][LIST_AVATAR_NAME]["font-style"] = "BOLD";
}
//<edit> custom colors for certain types of avatars!
//Changed a bit so people can modify them in settings. And since they're colors, again it's possibly account-based. Starting to think I need a function just to determine that. - HgB
//element["columns"][LIST_AVATAR_NAME]["color"] = gColors.getColor( "MapAvatar" ).getValue();
LLViewerRegion* parent_estate = LLWorld::getInstance()->getRegionFromPosGlobal(entry->getPosition());
LLUUID estate_owner = LLUUID::null;
//.........这里部分代码省略.........
示例8: refreshAvatarList
/**
* Redraws the avatar list
* Only does anything if the avatar list is visible.
* @author Dale Glass
*/
void LLFloaterAvatarList::refreshAvatarList()
{
// Don't update list when interface is hidden
if (!sInstance->getVisible()) return;
// We rebuild the list fully each time it's refreshed
// The assumption is that it's faster to refill it and sort than
// to rebuild the whole list.
LLDynamicArray<LLUUID> selected = mAvatarList->getSelectedIDs();
S32 scrollpos = mAvatarList->getScrollPos();
mAvatarList->deleteAllItems();
LLVector3d mypos = gAgent.getPositionGlobal();
LLVector3d posagent;
posagent.setVec(gAgent.getPositionAgent());
LLVector3d simpos = mypos - posagent;
std::map<LLUUID, LLAvatarListEntry>::iterator iter;
for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++)
{
LLSD element;
LLUUID av_id;
LLAvatarListEntry *entry = &iter->second;
// Skip if avatar hasn't been around
if (entry->isDead())
{
continue;
}
av_id = entry->getID();
LLVector3d position = entry->getPosition();
BOOL UnknownAltitude = false;
LLVector3d delta = position - mypos;
F32 distance = (F32)delta.magVec();
if (position.mdV[VZ] == 0.0)
{
UnknownAltitude = true;
distance = 9000.0;
}
delta.mdV[2] = 0.0f;
F32 side_distance = (F32)delta.magVec();
// HACK: Workaround for an apparent bug:
// sometimes avatar entries get stuck, and are registered
// by the client as perpetually moving in the same direction.
// this makes sure they get removed from the visible list eventually
//jcool410 -- this fucks up seeing dueds thru minimap data > 1024m away, so, lets just say > 2048m to the side is bad
//aka 8 sims
if (side_distance > 2048.0f)
{
continue;
}
if (av_id.isNull())
{
//llwarns << "Avatar with null key somehow got into the list!" << llendl;
continue;
}
element["id"] = av_id;
element["columns"][LIST_MARK]["column"] = "marked";
element["columns"][LIST_MARK]["type"] = "text";
if (entry->isMarked())
{
element["columns"][LIST_MARK]["value"] = "X";
element["columns"][LIST_MARK]["color"] = LLColor4::blue.getValue();
element["columns"][LIST_MARK]["font-style"] = "BOLD";
}
else
{
element["columns"][LIST_MARK]["value"] = "";
}
element["columns"][LIST_AVATAR_NAME]["column"] = "avatar_name";
element["columns"][LIST_AVATAR_NAME]["type"] = "text";
element["columns"][LIST_AVATAR_NAME]["value"] = entry->getName().c_str();
if (entry->isFocused())
{
element["columns"][LIST_AVATAR_NAME]["font-style"] = "BOLD";
}
if (LLMuteList::getInstance()->isMuted(av_id))
{
element["columns"][LIST_AVATAR_NAME]["color"] = LLColor4::red2.getValue();
}
char temp[32];
LLColor4 color = LLColor4::black;
element["columns"][LIST_DISTANCE]["column"] = "distance";
//.........这里部分代码省略.........