本文整理汇总了C++中LLSpatialGroup::dirtyGeom方法的典型用法代码示例。如果您正苦于以下问题:C++ LLSpatialGroup::dirtyGeom方法的具体用法?C++ LLSpatialGroup::dirtyGeom怎么用?C++ LLSpatialGroup::dirtyGeom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLSpatialGroup
的用法示例。
在下文中一共展示了LLSpatialGroup::dirtyGeom方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: destroy
void LLFace::destroy()
{
if (gDebugGL)
{
gPipeline.checkReferences(this);
}
if(mTexture.notNull())
{
mTexture->removeFace(this) ;
}
if (mDrawPoolp)
{
#if MESH_ENABLED
if (this->isState(LLFace::RIGGED) && mDrawPoolp->getType() == LLDrawPool::POOL_AVATAR)
{
((LLDrawPoolAvatar*) mDrawPoolp)->removeRiggedFace(this);
}
else
#endif //MESH_ENABLED
{
mDrawPoolp->removeFace(this);
}
mDrawPoolp = NULL;
}
if (mTextureMatrix)
{
delete mTextureMatrix;
mTextureMatrix = NULL;
if (mDrawablep.notNull())
{
LLSpatialGroup* group = mDrawablep->getSpatialGroup();
if (group)
{
group->dirtyGeom();
gPipeline.markRebuild(group, TRUE);
}
}
}
setDrawInfo(NULL);
mDrawablep = NULL;
mVObjp = NULL;
}
示例2: rebuild
//static
void LLManip::rebuild(LLViewerObject* vobj)
{
LLDrawable* drawablep = vobj->mDrawable;
if (drawablep && drawablep->getVOVolume())
{
gPipeline.markRebuild(drawablep,LLDrawable::REBUILD_VOLUME, TRUE);
drawablep->setState(LLDrawable::MOVE_UNDAMPED); // force to UNDAMPED
drawablep->updateMove();
LLSpatialGroup* group = drawablep->getSpatialGroup();
if (group)
{
group->dirtyGeom();
}
}
}
示例3: rebuild
//static
void LLManip::rebuild(LLViewerObject* vobj)
{
LLDrawable* drawablep = vobj->mDrawable;
if (drawablep && drawablep->getVOVolume())
{
gPipeline.markRebuild(drawablep,LLDrawable::REBUILD_VOLUME, TRUE);
drawablep->setState(LLDrawable::MOVE_UNDAMPED); // force to UNDAMPED
drawablep->updateMove();
LLSpatialGroup* group = drawablep->getSpatialGroup();
if (group)
{
group->dirtyGeom();
gPipeline.markRebuild(group, TRUE);
}
LLViewerObject::const_child_list_t& child_list = vobj->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(), endIter = child_list.end();
iter != endIter; ++iter)
{
LLViewerObject* child = *iter;
rebuild(child);
}
}
}
示例4: updateGeometry
BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
{
LLFastTimer ftm(LLFastTimer::FTM_UPDATE_PARTICLES);
LLVector3 at;
LLVector3 position_agent;
LLVector3 camera_agent = gCamera->getOrigin();
S32 num_parts = mViewerPartGroupp->getCount();
LLFace *facep;
LLSpatialGroup* group = drawable->getSpatialGroup();
if (!group && num_parts)
{
drawable->movePartition();
group = drawable->getSpatialGroup();
}
if (!num_parts)
{
if (group && drawable->getNumFaces())
{
group->dirtyGeom();
}
drawable->setNumFaces(0, NULL, getTEImage(0));
LLPipeline::sCompiles++;
return TRUE;
}
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES)))
{
return TRUE;
}
if (num_parts > drawable->getNumFaces())
{
drawable->setNumFacesFast(num_parts+num_parts/4, NULL, getTEImage(0));
}
F32 tot_area = 0;
F32 max_area = LLViewerPartSim::getMaxPartCount() * MAX_PARTICLE_AREA_SCALE;
F32 pixel_meter_ratio = gCamera->getPixelMeterRatio();
pixel_meter_ratio *= pixel_meter_ratio;
S32 count=0;
S32 i;
mDepth = 0.f;
for (i = 0; i < num_parts; i++)
{
const LLViewerPart &part = *((LLViewerPart*) mViewerPartGroupp->mParticles[i]);
LLVector3 part_pos_agent(part.mPosAgent);
at = part_pos_agent - camera_agent;
F32 camera_dist_squared = at.magVecSquared();
F32 inv_camera_dist_squared;
if (camera_dist_squared > 1.f)
inv_camera_dist_squared = 1.f / camera_dist_squared;
else
inv_camera_dist_squared = 1.f;
F32 area = part.mScale.mV[0] * part.mScale.mV[1] * inv_camera_dist_squared;
tot_area += area;
if (tot_area > max_area)
{
break;
}
count++;
facep = drawable->getFace(i);
if (!facep)
{
llwarns << "No face found for index " << i << "!" << llendl;
continue;
}
facep->setTEOffset(i);
const F32 NEAR_PART_DIST_SQ = 5.f*5.f; // Only discard particles > 5 m from the camera
const F32 MIN_PART_AREA = .005f*.005f; // only less than 5 mm x 5 mm at 1 m from camera
if (camera_dist_squared > NEAR_PART_DIST_SQ && area < MIN_PART_AREA)
{
facep->setSize(0, 0);
continue;
}
facep->setSize(4, 6);
facep->setViewerObject(this);
if (part.mFlags & LLPartData::LL_PART_EMISSIVE_MASK)
{
facep->setState(LLFace::FULLBRIGHT);
}
else
{
facep->clearState(LLFace::FULLBRIGHT);
}
//.........这里部分代码省略.........