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