本文整理汇总了C++中LLDrawable::getSpatialGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ LLDrawable::getSpatialGroup方法的具体用法?C++ LLDrawable::getSpatialGroup怎么用?C++ LLDrawable::getSpatialGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLDrawable
的用法示例。
在下文中一共展示了LLDrawable::getSpatialGroup方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
}
}
示例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();
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);
}
}
}
示例3: setVisible
void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results, BOOL for_select)
{
if (!gPipeline.hasRenderType(mDrawableType))
{
return;
}
//HACK don't draw attachments for avatars that haven't been visible in more than a frame
LLViewerObject *vobj = mDrawable->getVObj();
if (vobj && vobj->isAttachment() && !vobj->isHUDAttachment())
{
LLDrawable* av;
LLDrawable* parent = mDrawable->getParent();
if (parent)
{
LLViewerObject* objparent = parent->getVObj();
av = objparent->mDrawable;
LLSpatialGroup* group = av->getSpatialGroup();
BOOL impostor = FALSE;
BOOL loaded = FALSE;
if (objparent->isAvatar())
{
LLVOAvatar* avatarp = (LLVOAvatar*) objparent;
if (avatarp->isVisible())
{
impostor = objparent->isAvatar() && ((LLVOAvatar*) objparent)->isImpostor();
loaded = objparent->isAvatar() && ((LLVOAvatar*) objparent)->isFullyLoaded();
}
else
{
return;
}
}
if (!group ||
LLDrawable::getCurrentFrame() - av->mVisible > 1 ||
impostor ||
!loaded)
{
return;
}
}
}
LLSpatialGroup* group = (LLSpatialGroup*) mOctree->getListener(0);
group->rebound();
LLVector4a center;
center.setAdd(mExtents[0], mExtents[1]);
center.mul(0.5f);
LLVector4a size;
size.setSub(mExtents[1], mExtents[0]);
size.mul(0.5f);
if ((LLPipeline::sShadowRender && camera_in.AABBInFrustum(center, size)) ||
LLPipeline::sImpostorRender ||
(camera_in.AABBInFrustumNoFarClip(center, size) &&
AABBSphereIntersect(mExtents[0], mExtents[1], camera_in.getOrigin(), camera_in.mFrustumCornerDist)))
{
if (!LLPipeline::sImpostorRender &&
!LLPipeline::sShadowRender &&
LLPipeline::calcPixelArea(center, size, camera_in) < FORCE_INVISIBLE_AREA)
{
return;
}
LLDrawable::setVisible(camera_in);
if (for_select)
{
results->push_back(mDrawable);
if (mDrawable->getVObj())
{
LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); iter++)
{
LLViewerObject* child = *iter;
LLDrawable* drawable = child->mDrawable;
results->push_back(drawable);
}
}
}
else
{
LLCamera trans_camera = transformCamera(camera_in);
LLOctreeMarkNotCulled culler(&trans_camera);
culler.traverse(mOctree);
}
}
}