本文整理汇总了C++中LLPipeline::getSpatialPartition方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPipeline::getSpatialPartition方法的具体用法?C++ LLPipeline::getSpatialPartition怎么用?C++ LLPipeline::getSpatialPartition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPipeline
的用法示例。
在下文中一共展示了LLPipeline::getSpatialPartition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: renderObjectsForSelect
U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parcel_wall, BOOL keep_pick_list)
{
gRenderForSelect = TRUE;
// LLTimer pick_timer;
if (!keep_pick_list)
{
LLViewerObject *objectp;
S32 i;
// Reset all of the GL names to zero.
for (i = 0; i < mObjects.count(); i++)
{
objectp = mObjects[i];
objectp->mGLName = 0;
}
mSelectPickList.clear();
std::vector<LLDrawable*> pick_drawables;
for (i = 0; i < LLPipeline::NUM_PARTITIONS-1; i++)
{
LLSpatialPartition* part = gPipeline.getSpatialPartition(i);
if (part)
{
part->cull(camera, &pick_drawables, TRUE);
}
}
for (std::vector<LLDrawable*>::iterator iter = pick_drawables.begin();
iter != pick_drawables.end(); iter++)
{
LLDrawable* drawablep = *iter;
if( !drawablep )
continue;
LLViewerObject* last_objectp = NULL;
for (S32 face_num = 0; face_num < drawablep->getNumFaces(); face_num++)
{
LLViewerObject* objectp = drawablep->getFace(face_num)->getViewerObject();
if (objectp && objectp != last_objectp)
{
mSelectPickList.insert(objectp);
last_objectp = objectp;
}
}
}
LLHUDText::addPickable(mSelectPickList);
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter)
{
objectp = (LLVOAvatar*) *iter;
if (!objectp->isDead())
{
if (objectp->mDrawable.notNull() && objectp->mDrawable->isVisible())
{
mSelectPickList.insert(objectp);
}
}
}
// add all hud objects to pick list
LLVOAvatar* avatarp = gAgent.getAvatarObject();
if (avatarp)
{
LLViewerJointAttachment* attachmentp;
for (attachmentp = avatarp->mAttachmentPoints.getFirstData();
attachmentp;
attachmentp = avatarp->mAttachmentPoints.getNextData())
{
if (attachmentp->getIsHUDAttachment())
{
LLViewerObject* objectp = attachmentp->getObject();
if (objectp)
{
mSelectPickList.insert(objectp);
for (U32 i = 0; i < objectp->mChildList.size(); i++)
{
LLViewerObject* childp = objectp->mChildList[i];
if (childp)
{
mSelectPickList.insert(childp);
}
}
}
}
}
}
S32 num_pickables = (S32)mSelectPickList.size() + LLHUDIcon::getNumInstances();
if (num_pickables != 0)
{
S32 step = (0x000fffff - GL_NAME_INDEX_OFFSET) / num_pickables;
std::set<LLViewerObject*>::iterator pick_it;
i = 0;
//.........这里部分代码省略.........