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


C++ LLViewerJointAttachment::getItemID方法代码示例

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


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

示例1: refreshAll

void RlvFloaterBehaviour::refreshAll()
{
	LLVOAvatar* pAvatar = gAgent.getAvatarObject();
	LLCtrlListInterface* pList = childGetListInterface("behaviour_list");
	const rlv_object_map_t* pRlvObjects = gRlvHandler.getObjectMap();
	if ( (!pAvatar) || (!pList) || (!pRlvObjects) )
		return;

	pList->operateOnAll(LLCtrlListInterface::OP_DELETE);

	for (rlv_object_map_t::const_iterator itObj = pRlvObjects->begin(), endObj = pRlvObjects->end(); itObj != endObj; ++itObj)
	{
		std::string strName = itObj->first.asString();

		LLViewerInventoryItem* pItem = NULL;
		LLViewerObject* pObj = gObjectList.findObject(itObj->first);
		if (pObj)
		{
			LLViewerJointAttachment* pAttachPt = 
				get_if_there(pAvatar->mAttachmentPoints, gRlvHandler.getAttachPointIndex(pObj), (LLViewerJointAttachment*)NULL);
			if (pAttachPt)
			{
				pItem = gInventory.getItem(pAttachPt->getItemID());
			}
		}

		if (pItem)
			strName = pItem->getName();

		const rlv_command_list_t* pCommands = itObj->second.getCommandList();
		for (rlv_command_list_t::const_iterator itCmd = pCommands->begin(), endCmd = pCommands->end(); itCmd != endCmd; ++itCmd)
		{
			std::string strBhvr = itCmd->asString(); LLUUID uuid(itCmd->getOption());
			if (uuid.notNull())
			{
				std::string strLookup;
				if ( (gCacheName->getFullName(uuid, strLookup)) || (gCacheName->getGroupName(uuid, strLookup)) )
				{
					if (strLookup.find("???") == std::string::npos)
						strBhvr.assign(itCmd->getBehaviour()).append(":").append(strLookup);
				}
				else if (m_PendingLookup.end() == std::find(m_PendingLookup.begin(), m_PendingLookup.end(), uuid))
				{
					gCacheName->get(uuid, FALSE, onAvatarNameLookup, this);
					m_PendingLookup.push_back(uuid);
				}
			}

			LLSD element;

			// Restriction column
			element["columns"][0]["column"] = "behaviour";
			element["columns"][0]["value"] = strBhvr;
			element["columns"][0]["font"] = "SANSSERIF";
			element["columns"][0]["font-style"] = "NORMAL";

			// Object Name column
			element["columns"][1]["column"] = "name";
			element["columns"][1]["value"] = strName;
			element["columns"][1]["font"] = "SANSSERIF";
			element["columns"][1]["font-style"] = "NORMAL";

			pList->addElement(element, ADD_BOTTOM);
		}
	}
}
开发者ID:kow,项目名称:Meerkat-Viewer,代码行数:66,代码来源:rlvfloaterbehaviour.cpp


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