本文整理汇总了C++中LLViewerObject::flagCharacter方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerObject::flagCharacter方法的具体用法?C++ LLViewerObject::flagCharacter怎么用?C++ LLViewerObject::flagCharacter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLViewerObject
的用法示例。
在下文中一共展示了LLViewerObject::flagCharacter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleObjectHit
BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info)
{
mGrabPick = info;
LLViewerObject* objectp = mGrabPick.getObject();
if (gDebugClicks)
{
llinfos << "LLToolGrab handleObjectHit " << info.mMousePt.mX << "," << info.mMousePt.mY << llendl;
}
if (NULL == objectp) // unexpected
{
llwarns << "objectp was NULL; returning FALSE" << llendl;
return FALSE;
}
if (objectp->isAvatar())
{
if (gGrabTransientTool)
{
gBasicToolset->selectTool( gGrabTransientTool );
gGrabTransientTool = NULL;
}
return TRUE;
}
setMouseCapture( TRUE );
// Grabs always start from the root
// objectp = (LLViewerObject *)objectp->getRoot();
LLViewerObject* parent = objectp->getRootEdit();
BOOL script_touch = (objectp->flagHandleTouch()) || (parent && parent->flagHandleTouch());
// Clicks on scripted or physical objects are temporary grabs, so
// not "Build mode"
mHideBuildHighlight = script_touch || objectp->flagUsePhysics();
if (!objectp->flagUsePhysics())
{
if (script_touch)
{
mMode = GRAB_NONPHYSICAL; // if it has a script, use the non-physical grab
}
else
{
// In mouselook, we shouldn't be able to grab non-physical,
// non-touchable objects. If it has a touch handler, we
// do grab it (so llDetectedGrab works), but movement is
// blocked on the server side. JC
if (gAgentCamera.cameraMouselook())
{
mMode = GRAB_LOCKED;
gViewerWindow->hideCursor();
gViewerWindow->moveCursorToCenter();
}
else if (objectp->permMove() && !objectp->isPermanentEnforced())
{
mMode = GRAB_ACTIVE_CENTER;
gViewerWindow->hideCursor();
gViewerWindow->moveCursorToCenter();
}
else
{
mMode = GRAB_LOCKED;
}
}
}
else if( objectp->flagCharacter() || !objectp->permMove() || objectp->isPermanentEnforced())
{
// if mouse is over a physical object without move permission, show feedback if user tries to move it.
mMode = GRAB_LOCKED;
// Don't bail out here, go on and grab so buttons can get
// their "touched" event.
}
else
{
// if mouse is over a physical object with move permission,
// select it and enter "grab" mode (hiding cursor, etc.)
mMode = GRAB_ACTIVE_CENTER;
gViewerWindow->hideCursor();
gViewerWindow->moveCursorToCenter();
}
// Always send "touched" message
mLastMouseX = gViewerWindow->getCurrentMouseX();
mLastMouseY = gViewerWindow->getCurrentMouseY();
mAccumDeltaX = 0;
mAccumDeltaY = 0;
mHasMoved = FALSE;
mOutsideSlop = FALSE;
mVerticalDragging = (info.mKeyMask == MASK_VERTICAL) || gGrabBtnVertical;
//.........这里部分代码省略.........