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


C++ LLPipeline::addObject方法代码示例

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


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

示例1: processUpdateCore

void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, 
										   void** user_data, 
										   U32 i, 
										   const EObjectUpdateType update_type, 
										   LLDataPacker* dpp, 
										   BOOL just_created)
{
	LLMessageSystem* msg = gMessageSystem;

	// ignore returned flags
	objectp->processUpdateMessage(msg, user_data, i, update_type, dpp);

	if (objectp->isDead())
	{
		// The update failed
		return;
	}
	updateActive(objectp);

	// Also sets the approx. pixel area
	objectp->setPixelAreaAndAngle(gAgent);

	// Update the image levels of textures for this object.
	objectp->updateTextures(gAgent);

	if (just_created) 
	{
		gPipeline.addObject(objectp);
	}
	else
	{
		primbackup::getInstance()->prim_update(objectp);
	}

	// RN: this must be called after we have a drawable 
	// (from gPipeline.addObject)
	// so that the drawable parent is set properly
	findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort());

	// If we're just wandering around, don't create new objects selected.
	if (just_created 
		&& update_type != OUT_TERSE_IMPROVED 
		&& objectp->mCreateSelected)
	{
		if ( gToolMgr->getCurrentTool() != gToolPie )
		{
			//llinfos << "DEBUG selecting " << objectp->mID << " " 
			//		<< objectp->mLocalID << llendl;
			gSelectMgr->selectObjectAndFamily(objectp);
			dialog_refresh_all();
		}

		objectp->mCreateSelected = false;
		gViewerWindow->getWindow()->decBusyCount();
		gViewerWindow->getWindow()->setCursor( UI_CURSOR_ARROW );

		primbackup::getInstance()->newprim(objectp);
	}
}
开发者ID:Boy,项目名称:netbook,代码行数:59,代码来源:llviewerobjectlist.cpp

示例2: setSurface

void LLSurfacePatch::setSurface(LLSurface *surfacep)
{
	mSurfacep = surfacep;
	if (mVObjp == (LLVOSurfacePatch *)NULL)
	{
		llassert(mSurfacep->mType == 'l');

		mVObjp = (LLVOSurfacePatch *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_SURFACE_PATCH, mSurfacep->getRegion());
		mVObjp->setPatch(this);
		mVObjp->setPositionRegion(mCenterRegion);
		gPipeline.addObject(mVObjp);
	}
} 
开发者ID:Nora28,项目名称:imprudence,代码行数:13,代码来源:llsurfacepatch.cpp

示例3: init

void LLSky::init(const LLVector3 &sun_direction)
{
	mVOSkyp = (LLVOSky *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_SKY, gAgent.getRegion());
	mVOSkyp->initSunDirection(sun_direction, LLVector3());
	gPipeline.addObject((LLViewerObject *)mVOSkyp);

	mVOStarsp = (LLVOStars *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_STARS, gAgent.getRegion());
	gPipeline.addObject((LLViewerObject *)mVOStarsp);
	
	mVOGroundp = (LLVOGround*)gObjectList.createObjectViewer(LLViewerObject::LL_VO_GROUND, gAgent.getRegion());
	LLVOGround *groundp = mVOGroundp;
	gPipeline.addObject((LLViewerObject *)groundp);

	gSky.setFogRatio(gSavedSettings.getF32("RenderFogRatio"));
	
	////////////////////////////
	//
	// Legacy code, ignore
	//
	//

	// Get the parameters.
	mSunDefaultPosition = gSavedSettings.getVector3("SkySunDefaultPosition");


	if (gSavedSettings.getBOOL("SkyOverrideSimSunPosition") || mOverrideSimSunPosition)
	{
		setSunDirection(mSunDefaultPosition, LLVector3(0.f, 0.f, 0.f));
	}
	else
	{
		setSunDirection(sun_direction, LLVector3(0.f, 0.f, 0.f));
	}
	
	mUpdatedThisFrame = TRUE;
}
开发者ID:Boy,项目名称:netbook,代码行数:36,代码来源:llsky.cpp

示例4: processUpdateCore

void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, 
										   void** user_data, 
										   U32 i, 
										   const EObjectUpdateType update_type, 
										   LLDataPacker* dpp, 
										   BOOL just_created)
{
	LLMessageSystem* msg = gMessageSystem;

	// ignore returned flags
	objectp->processUpdateMessage(msg, user_data, i, update_type, dpp);
		
	if (objectp->isDead())
	{
		// The update failed
		return;
	}

	updateActive(objectp);

	if (just_created) 
	{
		gPipeline.addObject(objectp);
	}

	// Also sets the approx. pixel area
	objectp->setPixelAreaAndAngle(gAgent);

	// RN: this must be called after we have a drawable 
	// (from gPipeline.addObject)
	// so that the drawable parent is set properly
	findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort());
	
	LLVector3 pScale=objectp->getScale();
	if(objectp->permYouOwner())
	{
		if(objectp->permModify() && objectp->permCopy() && objectp->permTransfer())
		{
			if (gImportTracker.getState() != ImportTracker::IDLE && objectp)
			{
				if((gImportTracker.getState() == ImportTracker::WAND && just_created && objectp->mCreateSelected) || (pScale.mV[VX] == 0.52345f && pScale.mV[VY] == 0.52346f && pScale.mV[VZ] == 0.52347f
					&& gImportTracker.getState() == ImportTracker::BUILDING))
				gImportTracker.get_update(objectp->mLocalID, just_created, objectp->mCreateSelected);
			}
		}
	}

	// If we're just wandering around, don't create new objects selected.
	if (just_created 
		&& update_type != OUT_TERSE_IMPROVED 
		&& objectp->mCreateSelected)
	{
		if(JCExportTracker::getInstance()->getStatus() == JCExportTracker::EXPORTING &&
		   JCExportTracker::getInstance()->expected_surrogate_pos.count(objectp->getPosition()) > 0)
		{
			//the surrogate prim has been created, notify JCExportTracker
			JCExportTracker::getInstance()->queued_surrogates.push_back(objectp);
			JCExportTracker::getInstance()->surrogate_roots.push_back(objectp);
		}
		else if ( LLToolMgr::getInstance()->getCurrentTool() != LLToolPie::getInstance() )
		{
			//llinfos << "DEBUG selecting " << objectp->mID << " "
			//		<< objectp->mLocalID << llendl;
			LLSelectMgr::getInstance()->selectObjectAndFamily(objectp);
			dialog_refresh_all();
		}

		objectp->mCreateSelected = false;
		gViewerWindow->getWindow()->decBusyCount();
		gViewerWindow->getWindow()->setCursor( UI_CURSOR_ARROW );
	}
}
开发者ID:kow,项目名称:pleiaviewer,代码行数:72,代码来源:llviewerobjectlist.cpp

示例5: processUpdateCore

void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, 
										   void** user_data, 
										   U32 i, 
										   const EObjectUpdateType update_type, 
										   LLDataPacker* dpp, 
										   BOOL just_created)
{
	LLMessageSystem* msg = gMessageSystem;

	// ignore returned flags
	objectp->processUpdateMessage(msg, user_data, i, update_type, dpp);
		
	if (objectp->isDead())
	{
		// The update failed
		return;
	}

	updateActive(objectp);

	if (just_created) 
	{
		gPipeline.addObject(objectp);
	}
	else if( LLXmlImport::sImportInProgress 
		&& objectp->permYouOwner()
		&& LLXmlImport::sExpectedUpdate == objectp->getID()) 
	{
		LLXmlImport::onUpdatePrim(objectp);
	}
	

	// Also sets the approx. pixel area
	objectp->setPixelAreaAndAngle(gAgent);

	// RN: this must be called after we have a drawable 
	// (from gPipeline.addObject)
	// so that the drawable parent is set properly
	findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort());
	
	// <edit>
	if (just_created
		&& update_type != OUT_TERSE_IMPROVED
		&& LLXmlImport::sImportInProgress)
	{
		LLViewerObject* parent = (LLViewerObject*)objectp->getParent();
		if(parent)
		{
			if(parent->getID() == gAgent.getID())
			{
				LLXmlImport::onNewAttachment(objectp);
			}
		}
	}
	//</edit>

	// If we're just wandering around, don't create new objects selected.
	if (just_created 
		&& update_type != OUT_TERSE_IMPROVED 
		&& objectp->mCreateSelected)
	{
		if ( LLToolMgr::getInstance()->getCurrentTool() != LLToolPie::getInstance() )
		{
			// llinfos << "DEBUG selecting " << objectp->mID << " " 
			// << objectp->mLocalID << llendl;
			LLSelectMgr::getInstance()->selectObjectAndFamily(objectp);
			dialog_refresh_all();
		}

		objectp->mCreateSelected = false;
		gViewerWindow->getWindow()->decBusyCount();
		gViewerWindow->getWindow()->setCursor( UI_CURSOR_ARROW );
		
		// <edit>
		if(LLXmlImport::sImportInProgress)
		{
			if( objectp->permYouOwner()
				&& (objectp->getPCode() == LLXmlImport::sSupplyParams->getPCode())
				&& (objectp->getScale() == LLXmlImport::sSupplyParams->getScale()))
			{
				LLXmlImport::onNewPrim(objectp);
			}
		}
		// </edit>	
	}
}
开发者ID:fractured-crystal,项目名称:SssnowGlobeeE,代码行数:86,代码来源:llviewerobjectlist.cpp


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