本文整理汇总了C++中LLObjectSelectionHandle::getSelectType方法的典型用法代码示例。如果您正苦于以下问题:C++ LLObjectSelectionHandle::getSelectType方法的具体用法?C++ LLObjectSelectionHandle::getSelectType怎么用?C++ LLObjectSelectionHandle::getSelectType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLObjectSelectionHandle
的用法示例。
在下文中一共展示了LLObjectSelectionHandle::getSelectType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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() )
//.........这里部分代码省略.........