本文整理汇总了C++中LLPipeline::createObject方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPipeline::createObject方法的具体用法?C++ LLPipeline::createObject怎么用?C++ LLPipeline::createObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPipeline
的用法示例。
在下文中一共展示了LLPipeline::createObject方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initTextures
void LLSurface::initTextures()
{
///////////////////////
//
// Main surface texture
//
createSTexture();
///////////////////////
//
// Water texture
//
if (gSavedSettings.getBOOL("RenderWater") )
{
createWaterTexture();
mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
gPipeline.createObject(mWaterObjp);
LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
// <FS:CR> Aurora Sim
//water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT); // region doesn't have a valid water height yet
water_pos_global += LLVector3d(mRegionp->getWidth()/2, mRegionp->getWidth()/2, DEFAULT_WATER_HEIGHT);
mWaterObjp->setPositionGlobal(water_pos_global);
// </FS:CR> Aurora Sim
}
}
示例2: updatePuffs
void LLCloudGroup::updatePuffs(const F32 dt)
{
mDensity = mCloudLayerp->getDensityRegion(mCenterRegion);
if (!mVOCloudsp)
{
mVOCloudsp = (LLVOClouds *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_CLOUDS, mCloudLayerp->getRegion());
if(mVOCloudsp)
{
mVOCloudsp->setCloudGroup(this);
mVOCloudsp->setPositionRegion(mCenterRegion);
mVOCloudsp->setScale(LLVector3(256.f/CLOUD_GROUPS_PER_EDGE + CLOUD_PUFF_WIDTH,
256.f/CLOUD_GROUPS_PER_EDGE + CLOUD_PUFF_WIDTH,
CLOUD_HEIGHT_RANGE + CLOUD_PUFF_HEIGHT)*0.5f);
gPipeline.createObject(mVOCloudsp);
}
}
LLVector3 velocity;
LLVector3d vel_d;
// Update the positions of all of the clouds
for (U32 i = 0; i < mCloudPuffs.size(); i++)
{
LLCloudPuff &puff = mCloudPuffs[i];
velocity = mCloudLayerp->getRegion()->mWind.getCloudVelocity(mCloudLayerp->getRegion()->getPosRegionFromGlobal(puff.mPositionGlobal));
velocity *= CLOUD_VELOCITY_SCALE*CLOUD_UPDATE_RATE;
vel_d.setVec(velocity);
mCloudPuffs[i].mPositionGlobal += vel_d;
mCloudPuffs[i].mAlpha += mCloudPuffs[i].mRate * dt;
mCloudPuffs[i].mAlpha = llmin(1.f, mCloudPuffs[i].mAlpha);
mCloudPuffs[i].mAlpha = llmax(0.f, mCloudPuffs[i].mAlpha);
}
}
示例3: rebuildWater
//static added one block for openregion ----- voodoo
void LLSurface::rebuildWater()
{
//lldebugs << "Rebuilding Water...";
//BOOL renderwater = gSavedSettings.getBOOL("RenderWater") && LLWorld::getInstance()->getAllowRenderWater();
if(!mWaterObjp.isNull())
//if(prev_renderwater && !renderwater)
{
//lldebugs << "Removing Water";
//Remove the old
gObjectList.killObject(mWaterObjp);
}
if (gSavedSettings.getBOOL("RenderWater") && gHippoLimits->mRenderWater)
//if (!prev_renderwater && renderwater)
{
//lldebugs << "Building Water";
createWaterTexture();
mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
gPipeline.createObject(mWaterObjp);
LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT);
//water_pos_global += LLVector3d(mRegionp->getWidth()/2, mRegionp->getWidth()/2, DEFAULT_WATER_HEIGHT);
mWaterObjp->setPositionGlobal(water_pos_global);
}
//lldebugs << "Rebuilding Water Complete";
}
示例4: 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.createObject(mVObjp);
}
}