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


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

本文整理汇总了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
	}
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:25,代码来源:llsurface.cpp

示例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);
	}
}
开发者ID:djhonga2001,项目名称:SingularityViewer,代码行数:33,代码来源:llcloud.cpp

示例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";
}
开发者ID:Lirusaito,项目名称:Voodoo-2,代码行数:28,代码来源:llsurface.cpp

示例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);
	}
} 
开发者ID:BillBarnhill,项目名称:SingularityViewer,代码行数:13,代码来源:llsurfacepatch.cpp


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