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


C++ LLDynamicArray::put方法代码示例

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


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

示例1: dropCategory

BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop)
{
	if (category)
	{
		LLInventoryModel::cat_array_t cats;
		LLInventoryModel::item_array_t items;
		LLUniqueBuddyCollector buddies;
		gInventory.collectDescendentsIf(category->getUUID(),
										cats,
										items,
										LLInventoryModel::EXCLUDE_TRASH,
										buddies);
		S32 count = items.count();
		if(count == 0)
		{
			return false;
		}
		else if(drop)
		{
			LLDynamicArray<LLUUID> ids;
			for(S32 i = 0; i < count; ++i)
			{
				ids.put(items.get(i)->getCreatorUUID());
			}
			inviteToSession(ids);
		}
	}
	return true;
}
开发者ID:mightymarc,项目名称:SWAMPWATER,代码行数:29,代码来源:llimpanel.cpp

示例2: RevokeSelected

void JCFloaterAnimList::RevokeSelected(void *userdata )
{
	JCFloaterAnimList *self = (JCFloaterAnimList*)userdata;
	LLDynamicArray<LLUUID> ids;
	std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected();
	for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ )
	{
		LLScrollListItem *item = *itr;
		const LLUUID &id = item->getColumn(LIST_OBJECT_UUID)->getValue().asUUID();
		if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL )
		{
			ids.put(id);
		}
	}
	if( !ids.empty() )
	{
		for(LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr)
		{
			LLUUID id = *itr;
			LLMessageSystem* msg = gMessageSystem;
			msg->newMessageFast(_PREHASH_RevokePermissions);
			msg->nextBlockFast(_PREHASH_AgentData);
			msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
			msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
			msg->nextBlockFast(_PREHASH_Data);
			msg->addUUIDFast(_PREHASH_ObjectID, id);
			msg->addU32Fast(_PREHASH_ObjectPermissions, U32_MAX);
			gAgent.sendReliableMessage();
		}
	}
}
开发者ID:EmeraldViewer,项目名称:EmeraldViewer,代码行数:31,代码来源:jcfloater_animation_list.cpp

示例3: retrieve

void LLInventoryClipboard::retrieve(LLDynamicArray<LLUUID>& inv_objects) const
{
    inv_objects.reset();
    S32 count = mObjects.count();
    for(S32 i = 0; i < count; i++)
    {
        inv_objects.put(mObjects[i]);
    }
}
开发者ID:Rezzable,项目名称:heritagekey-viewer,代码行数:9,代码来源:llinventoryclipboard.cpp

示例4: dropCallingCard

BOOL LLFloaterIMPanel::dropCallingCard(LLInventoryItem* item, BOOL drop)
{
	if (item && item->getCreatorUUID().notNull())
	{
		if (drop)
		{
			LLDynamicArray<LLUUID> ids;
			ids.put(item->getCreatorUUID());
			inviteToSession(ids);
		}
		return true;
	}
	// return false if creator uuid is null.
	return false;
}
开发者ID:mightymarc,项目名称:SWAMPWATER,代码行数:15,代码来源:llimpanel.cpp

示例5: StopSelected

void JCFloaterAnimList::StopSelected(void *userdata )
{
	JCFloaterAnimList *self = (JCFloaterAnimList*)userdata;
	LLDynamicArray<LLUUID> ids;
	std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected();
	for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ )
	{
		LLScrollListItem *item = *itr;
		const LLUUID &id = item->getColumn(LIST_ANIMATION_UUID)->getValue().asUUID();
		if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL )
		{
			ids.put(id);
		}
	}
	gAgent.sendAnimationRequests(ids,ANIM_REQUEST_STOP);
}
开发者ID:EmeraldViewer,项目名称:EmeraldViewer,代码行数:16,代码来源:jcfloater_animation_list.cpp

示例6: StopSelected

void LLFloaterExploreAnimations::StopSelected(void *userdata )
{
	LLFloaterExploreAnimations *self = (LLFloaterExploreAnimations*)userdata;
	LLDynamicArray<LLUUID> ids;
	std::vector< LLScrollListItem * > items = self->getChild<LLScrollListCtrl>("anim_list")->getAllSelected();

	for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ )
	{
		LLScrollListItem *item = *itr;
		const LLUUID &id = item->getValue().asUUID();
		if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL )
		{
			ids.put(id);
		}
	}
	gAgent.sendAnimationRequests(ids,ANIM_REQUEST_STOP);
}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:17,代码来源:floaterexploreanimations.cpp

示例7: addSession

// This adds a session to the talk view. The name is the local name of
// the session, dialog specifies the type of session. If the session
// exists, it is brought forward.  Specifying id = NULL results in an
// im session to everyone. Returns the uuid of the session.
LLUUID LLIMMgr::addSession(
	const std::string& name,
	EInstantMessage dialog,
	const LLUUID& other_participant_id)
{
	//lggtodo
	LLUUID session_id = computeSessionID(dialog, other_participant_id);

	LLFloaterIMPanel* floater = findFloaterBySession(session_id);
	if(!floater)
	{
		LLDynamicArray<LLUUID> ids;
		ids.put(other_participant_id);

		floater = createFloater(
			session_id,
			other_participant_id,
			name,
			ids,
			dialog,
			TRUE);

		noteOfflineUsers(floater, ids);
		LLFloaterChatterBox::showInstance(session_id);

		// Only warn for regular IMs - not group IMs
		if( dialog == IM_NOTHING_SPECIAL )
		{
			noteMutedUsers(floater, ids);
		}
		LLFloaterChatterBox::getInstance(LLSD())->showFloater(floater);
	}
	else
	{
		floater->open();
	}
	//mTabContainer->selectTabPanel(panel);
	floater->setInputFocus(TRUE);
	return floater->getSessionID();
}
开发者ID:meta7,项目名称:Meta7-Viewer,代码行数:44,代码来源:llimview.cpp

示例8: addPropertyLine

void LLViewerParcelOverlay::addPropertyLine(
    LLDynamicArray<LLVector3, 256>& vertex_array,
    LLDynamicArray<LLColor4U, 256>& color_array,
    LLDynamicArray<LLVector2, 256>& coord_array,
    const F32 start_x, const F32 start_y,
    const U32 edge,
    const LLColor4U& color)
{
    LLColor4U underwater( color );
    underwater.mV[VALPHA] /= 2;

    LLSurface& land = mRegion->getLand();

    F32 dx;
    F32 dy;
    F32 tick_dx;
    F32 tick_dy;
    //const F32 LINE_WIDTH = 0.125f;
    const F32 LINE_WIDTH = 0.0625f;

    switch(edge)
    {
    case WEST:
        dx = 0.f;
        dy = 1.f;
        tick_dx = LINE_WIDTH;
        tick_dy = 0.f;
        break;

    case EAST:
        dx = 0.f;
        dy = 1.f;
        tick_dx = -LINE_WIDTH;
        tick_dy = 0.f;
        break;

    case NORTH:
        dx = 1.f;
        dy = 0.f;
        tick_dx = 0.f;
        tick_dy = -LINE_WIDTH;
        break;

    case SOUTH:
        dx = 1.f;
        dy = 0.f;
        tick_dx = 0.f;
        tick_dy = LINE_WIDTH;
        break;

    default:
        llerrs << "Invalid edge in addPropertyLine" << llendl;
        return;
    }

    F32 outside_x = start_x;
    F32 outside_y = start_y;
    F32 outside_z = 0.f;
    F32 inside_x  = start_x + tick_dx;
    F32 inside_y  = start_y + tick_dy;
    F32 inside_z  = 0.f;

    // First part, only one vertex
    outside_z = land.resolveHeightRegion( outside_x, outside_y );

    if (outside_z > 20.f) color_array.put( color );
    else color_array.put( underwater );

    vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );
    coord_array.put(  LLVector2(outside_x - start_x, 0.f) );

    inside_x += dx * LINE_WIDTH;
    inside_y += dy * LINE_WIDTH;

    outside_x += dx * LINE_WIDTH;
    outside_y += dy * LINE_WIDTH;

    // Then the "actual edge"
    inside_z = land.resolveHeightRegion( inside_x, inside_y );
    outside_z = land.resolveHeightRegion( outside_x, outside_y );

    if (inside_z > 20.f) color_array.put( color );
    else color_array.put( underwater );

    if (outside_z > 20.f) color_array.put( color );
    else color_array.put( underwater );

    vertex_array.put( LLVector3(inside_x, inside_y, inside_z) );
    vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );

    coord_array.put(  LLVector2(outside_x - start_x, 1.f) );
    coord_array.put(  LLVector2(outside_x - start_x, 0.f) );

    inside_x += dx * (dx - LINE_WIDTH);
    inside_y += dy * (dy - LINE_WIDTH);

    outside_x += dx * (dx - LINE_WIDTH);
    outside_y += dy * (dy - LINE_WIDTH);

    // Middle part, full width
//.........这里部分代码省略.........
开发者ID:nienhou2,项目名称:LustAirlines-Viewer,代码行数:101,代码来源:llviewerparceloverlay.cpp

示例9: serializeSelection

void ScriptCounter::serializeSelection(bool delScript)
{
	LLDynamicArray<LLViewerObject*> catfayse;
	foo=LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
	sstr.str("");
	invqueries=0;
	doDelete=false;
	scriptcount=0;
	objIDS.clear();
	delUUIDS.clear();
	objectCount=0;
	countingDone=false;
	reqObjectID.setNull();
	if(foo)
	{
		if(foo->isAvatar())
		{
			LLVOAvatar* av=find_avatar_from_object(foo);
			if(av)
			{
				for (LLVOAvatar::attachment_map_t::iterator iter = av->mAttachmentPoints.begin();
					iter != av->mAttachmentPoints.end();
					++iter)
				{
					LLViewerJointAttachment* attachment = iter->second;
					if (!attachment->getValid())
						continue ;
					LLViewerObject* object = attachment->getObject();
					if(object)
					{
						catfayse.put(object);
						objectCount++;
					}
				}
			}
		}
		else
		{
			for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin();
					 iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++)
			{
				LLSelectNode* selectNode = *iter;
				LLViewerObject* object = selectNode->getObject();
				if(object)
				{
					catfayse.put(object);
					objectCount++;
				}
			}
			doDelete=delScript;
		}
		F32 throttle = gSavedSettings.getF32("OutBandwidth");
		if((throttle == 0.f) || (throttle > 128000.f))
		{
			gMessageSystem->mPacketRing.setOutBandwidth(128000);
			gMessageSystem->mPacketRing.setUseOutThrottle(TRUE);
		}
		cmdline_printchat("Counting scripts. Please wait.");
		if((objectCount == 1) && !(foo->isAvatar()))
		{
			LLViewerObject *reqObject=((LLViewerObject*)foo->getRoot());
			if(reqObject->isAvatar())
			{
				for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin();
					 iter != LLSelectMgr::getInstance()->getSelection()->end(); iter++ )
				{			
					LLSelectNode *nodep = *iter;
					LLViewerObject* objectp = nodep->getObject();
					if (objectp->isRootEdit())
					{
						reqObjectID=objectp->getID();
						LLMessageSystem* msg = gMessageSystem;
						msg->newMessageFast(_PREHASH_ObjectSelect);
						msg->nextBlockFast(_PREHASH_AgentData);
						msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
						msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
						msg->nextBlockFast(_PREHASH_ObjectData);
						msg->addU32Fast(_PREHASH_ObjectLocalID, objectp->getLocalID());
						msg->sendReliable(gAgent.getRegionHost());
						break;
					}
				}
			}
			else
			{
				reqObjectID=reqObject->getID();
				LLMessageSystem* msg = gMessageSystem;
				msg->newMessageFast(_PREHASH_RequestObjectPropertiesFamily);
				msg->nextBlockFast(_PREHASH_AgentData);
				msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
				msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
				msg->nextBlockFast(_PREHASH_ObjectData);
				msg->addU32Fast(_PREHASH_RequestFlags, 0 );
				msg->addUUIDFast(_PREHASH_ObjectID, reqObjectID);
				gAgent.sendReliableMessage();
			}
		}
		serialize(catfayse);
	}
}
开发者ID:EmeraldViewer,项目名称:EmeraldViewer,代码行数:100,代码来源:scriptcounter.cpp


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