本文整理汇总了C++中LLObjectSelectionHandle::contains方法的典型用法代码示例。如果您正苦于以下问题:C++ LLObjectSelectionHandle::contains方法的具体用法?C++ LLObjectSelectionHandle::contains怎么用?C++ LLObjectSelectionHandle::contains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLObjectSelectionHandle
的用法示例。
在下文中一共展示了LLObjectSelectionHandle::contains方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handle_media_click
static bool handle_media_click(const LLPickInfo& pick)
{
//FIXME: how do we handle object in different parcel than us?
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
LLPointer<LLViewerObject> objectp = pick.getObject();
if (!parcel ||
objectp.isNull() ||
pick.mObjectFace < 0 ||
pick.mObjectFace >= objectp->getNumTEs())
{
LLSelectMgr::getInstance()->deselect();
LLViewerMediaFocus::getInstance()->clearFocus();
return false;
}
// HACK: This is directly referencing an impl name. BAD!
// This can be removed when we have a truly generic media browser that only
// builds an impl based on the type of url it is passed.
// is media playing on this face?
const LLTextureEntry* tep = objectp->getTE(pick.mObjectFace);
viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(tep->getID());
if (tep
&& media_impl.notNull()
&& media_impl->hasMedia()
&& gSavedSettings.getBOOL("MediaOnAPrimUI"))
{
LLObjectSelectionHandle selection = LLViewerMediaFocus::getInstance()->getSelection();
if (! selection->contains(pick.getObject(), pick.mObjectFace))
{
LLViewerMediaFocus::getInstance()->setFocusFace(TRUE, pick.getObject(), pick.mObjectFace, media_impl);
}
else
{
media_impl->mouseDown(pick.mXYCoords.mX, pick.mXYCoords.mY);
media_impl->mouseCapture(); // the mouse-up will happen when capture is lost
}
return true;
}
LLSelectMgr::getInstance()->deselect();
LLViewerMediaFocus::getInstance()->clearFocus();
return false;
}