本文整理汇总了C++中LLObjectSelectionHandle::getObjectCount方法的典型用法代码示例。如果您正苦于以下问题:C++ LLObjectSelectionHandle::getObjectCount方法的具体用法?C++ LLObjectSelectionHandle::getObjectCount怎么用?C++ LLObjectSelectionHandle::getObjectCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLObjectSelectionHandle
的用法示例。
在下文中一共展示了LLObjectSelectionHandle::getObjectCount方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: start
BOOL LLFloaterScriptQueue::start()
{
//llinfos << "LLFloaterCompileQueue::start()" << llendl;
std::string buffer;
LLSelectMgr *mgr = LLSelectMgr::getInstance();
LLObjectSelectionHandle selectHandle = mgr->getSelection();
U32 n_objects = 0;
if (gSavedSettings.getBOOL("EditLinkedParts"))
{
n_objects = selectHandle->getObjectCount();
}
else
{
n_objects = selectHandle->getRootObjectCount();
}
LLStringUtil::format_map_t args;
args["[START]"] = mStartString;
args["[COUNT]"] = llformat ("%d", mObjectIDs.count());
buffer = getString ("Starting", args);
getChild<LLScrollListCtrl>("queue output")->setCommentText(buffer);
return nextObject();
}
示例2: render
void QToolAlign::render()
{
mBBox = get_selection_axis_aligned_bbox();
// Draw bounding box
LLGLSUIDefault gls_ui;
LLGLEnable gl_blend(GL_BLEND);
LLGLEnable gls_alpha_test(GL_ALPHA_TEST);
LLGLDepthTest gls_depth(GL_FALSE);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
// render box
LLColor4 default_normal_color( 0.7f, 0.7f, 0.7f, 0.1f );
gGL.color4fv( default_normal_color.mV );
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getEditSelection();
BOOL can_move = selection->getObjectCount() != 0;
if (can_move)
{
struct f : public LLSelectedObjectFunctor
{
virtual bool apply(LLViewerObject* objectp)
{
return objectp->permMove() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
}
} func;
can_move = selection->applyToObjects(&func);
}
if (can_move)
{
render_bbox(mBBox);
renderManipulators();
}
}
示例3: start
BOOL LLFloaterScriptQueue::start()
{
//llinfos << "LLFloaterCompileQueue::start()" << llendl;
std::string buffer;
LLSelectMgr *mgr = LLSelectMgr::getInstance();
LLObjectSelectionHandle selectHandle = mgr->getSelection();
U32 n_objects = 0;
if (gSavedSettings.getBOOL("EditLinkedParts"))
{
n_objects = selectHandle->getObjectCount();
}
else
{
n_objects = selectHandle->getRootObjectCount();
}
buffer = llformat("Starting %s of %d items.", mStartString.c_str(), n_objects); // *TODO: Translate
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
list->addCommentText(buffer);
return nextObject();
}
示例4: pickCallback
void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
{
if (!LLToolCamera::getInstance()->hasMouseCapture())
{
return;
}
LLToolCamera::getInstance()->mMouseDownX = pick_info.mMousePt.mX;
LLToolCamera::getInstance()->mMouseDownY = pick_info.mMousePt.mY;
gViewerWindow->moveCursorToCenter();
// Potentially recenter if click outside rectangle
LLViewerObject* hit_obj = pick_info.getObject();
// Check for hit the sky, or some other invalid point
if (!hit_obj && pick_info.mPosGlobal.isExactlyZero())
{
LLToolCamera::getInstance()->mValidClickPoint = FALSE;
return;
}
// check for hud attachments
if (hit_obj && hit_obj->isHUDAttachment())
{
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
if (!selection->getObjectCount() || selection->getSelectType() != SELECT_TYPE_HUD)
{
LLToolCamera::getInstance()->mValidClickPoint = FALSE;
return;
}
}
if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode() )
{
BOOL good_customize_avatar_hit = FALSE;
if( hit_obj )
{
LLVOAvatar* avatar = gAgent.getAvatarObject();
if( hit_obj == avatar)
{
// It's you
good_customize_avatar_hit = TRUE;
}
else
if( hit_obj->isAttachment() && hit_obj->permYouOwner() )
{
// It's an attachment that you're wearing
good_customize_avatar_hit = TRUE;
}
}
if( !good_customize_avatar_hit )
{
LLToolCamera::getInstance()->mValidClickPoint = FALSE;
return;
}
if( gMorphView )
{
gMorphView->setCameraDrivenByKeys( FALSE );
}
}
//RN: check to see if this is mouse-driving as opposed to ALT-zoom or Focus tool
else if (pick_info.mKeyMask & MASK_ALT ||
(LLToolMgr::getInstance()->getCurrentTool()->getName() == "Camera"))
{
LLViewerObject* hit_obj = pick_info.getObject();
if (hit_obj)
{
// ...clicked on a world object, so focus at its position
if (!hit_obj->isHUDAttachment())
{
gAgent.setFocusOnAvatar(FALSE, ANIMATE);
gAgent.setFocusGlobal(pick_info);
}
}
else if (!pick_info.mPosGlobal.isExactlyZero())
{
// Hit the ground
gAgent.setFocusOnAvatar(FALSE, ANIMATE);
gAgent.setFocusGlobal(pick_info);
}
static const LLCachedControl<bool> freeze_time("FreezeTime",0);
if (!(pick_info.mKeyMask & MASK_ALT) &&
gAgent.cameraThirdPerson() &&
gViewerWindow->getLeftMouseDown() &&
!freeze_time &&
(hit_obj == gAgent.getAvatarObject() ||
(hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->isSelf())))
{
LLToolCamera::getInstance()->mMouseSteering = TRUE;
}
}
LLToolCamera::getInstance()->mValidClickPoint = TRUE;
if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode() )
//.........这里部分代码省略.........