本文整理汇总了C++中LLVOVolume::isAttachment方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVOVolume::isAttachment方法的具体用法?C++ LLVOVolume::isAttachment怎么用?C++ LLVOVolume::isAttachment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLVOVolume
的用法示例。
在下文中一共展示了LLVOVolume::isAttachment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateSimulation
void LLViewerPartSim::updateSimulation()
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);
static LLFrameTimer update_timer;
const F32 dt = llmin(update_timer.getElapsedTimeAndResetF32(), 0.1f);
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES)))
{
return;
}
LLFastTimer ftm(LLFastTimer::FTM_SIMULATE_PARTICLES);
// Start at a random particle system so the same
// particle system doesn't always get first pick at the
// particles. Theoretically we'd want to do this in distance
// order or something, but sorting particle sources will be a big
// pain.
S32 i;
S32 count = (S32) mViewerPartSources.size();
S32 start = (S32)ll_frand((F32)count);
S32 dir = 1;
S32 deldir = 0;
if (ll_frand() > 0.5f)
{
dir = -1;
deldir = -1;
}
S32 num_updates = 0;
for (i = start; num_updates < count;)
{
if (i >= count)
{
i = 0;
}
if (i < 0)
{
i = count - 1;
}
if (!mViewerPartSources[i]->isDead())
{
BOOL upd = TRUE;
if (!LLPipeline::sRenderAttachedParticles)
{
LLViewerObject* vobj = mViewerPartSources[i]->mSourceObjectp;
if (vobj && (vobj->getPCode() == LL_PCODE_VOLUME))
{
LLVOVolume* vvo = (LLVOVolume *)vobj;
if (vvo && vvo->isAttachment())
{
upd = FALSE;
}
}
}
if (upd)
{
mViewerPartSources[i]->update(dt);
}
}
if (mViewerPartSources[i]->isDead())
{
mViewerPartSources.erase(mViewerPartSources.begin() + i);
count--;
i+=deldir;
}
else
{
i += dir;
}
num_updates++;
}
count = (S32) mViewerPartGroups.size();
for (i = 0; i < count; i++)
{
LLViewerObject* vobj = mViewerPartGroups[i]->mVOPartGroupp;
S32 visirate = 1;
if (vobj)
{
LLSpatialGroup* group = vobj->mDrawable->getSpatialGroup();
if (group && !group->isVisible()) // && !group->isState(LLSpatialGroup::OBJECT_DIRTY))
{
visirate = 8;
}
}
if ((LLDrawable::getCurrentFrame()+mViewerPartGroups[i]->mID)%visirate == 0)
{
if (vobj)
{
gPipeline.markRebuild(vobj->mDrawable, LLDrawable::REBUILD_ALL, TRUE);
}
mViewerPartGroups[i]->updateParticles(dt * visirate);
//.........这里部分代码省略.........