Updated rigged mesh selection/cursor hover handling.

This commit is contained in:
Shyotl
2019-04-11 01:16:50 -05:00
parent 6675bb2276
commit e49b484c2f
35 changed files with 204 additions and 115 deletions

View File

@@ -186,7 +186,7 @@ void LLCharacter::updateMotions(e_update_t update_type)
// It returns false if we need to keep updating anyway.
if (!mMotionController.hidden(true))
{
mMotionController.updateMotions(LLCharacter::NORMAL_UPDATE);
mMotionController.updateMotions();
return;
}
//</singu>

View File

@@ -162,7 +162,7 @@ public:
void pauseAllMotions();
void unpauseAllMotions();
BOOL isPaused() const { return mPaused; }
S32 getPausedFrame() const { return mPausedFrame; }
U32 getPausedFrame() const { return mPausedFrame; }
//<singu>
void requestPause(std::vector<LLAnimPauseRequest>& avatar_pause_handles);
void pauseAllSyncedCharacters(std::vector<LLAnimPauseRequest>& avatar_pause_handles);
@@ -252,7 +252,7 @@ protected:
F32 mLastTime;
BOOL mHasRunOnce;
BOOL mPaused;
S32 mPausedFrame;
U32 mPausedFrame;
F32 mTimeStep;
S32 mTimeStepCount;
F32 mLastInterp;

View File

@@ -657,16 +657,15 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
}
}
// TODO: add this after resolving _WIN32_WINNT issue
// if (!fullscreen)
// {
// TRACKMOUSEEVENT track_mouse_event;
// track_mouse_event.cbSize = sizeof( TRACKMOUSEEVENT );
// track_mouse_event.dwFlags = TME_LEAVE;
// track_mouse_event.hwndTrack = mWindowHandle;
// track_mouse_event.dwHoverTime = HOVER_DEFAULT;
// TrackMouseEvent( &track_mouse_event );
// }
if (!fullscreen)
{
TRACKMOUSEEVENT track_mouse_event;
track_mouse_event.cbSize = sizeof( TRACKMOUSEEVENT );
track_mouse_event.dwFlags = TME_LEAVE;
track_mouse_event.hwndTrack = mWindowHandle;
track_mouse_event.dwHoverTime = HOVER_DEFAULT;
TrackMouseEvent( &track_mouse_event );
}
//-----------------------------------------------------------------------
@@ -2624,21 +2623,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
return 0;
}
/*
// TODO: add this after resolving _WIN32_WINNT issue
case WM_MOUSELEAVE:
case WM_MOUSELEAVE:
{
window_imp->mCallbacks->handleMouseLeave(window_imp);
// TRACKMOUSEEVENT track_mouse_event;
// track_mouse_event.cbSize = sizeof( TRACKMOUSEEVENT );
// track_mouse_event.dwFlags = TME_LEAVE;
// track_mouse_event.hwndTrack = h_wnd;
// track_mouse_event.dwHoverTime = HOVER_DEFAULT;
// TrackMouseEvent( &track_mouse_event );
return 0;
window_imp->mCallbacks->handleMouseLeave(window_imp);
return 0;
}
*/
// Handle mouse movement within the window
case WM_MOUSEMOVE:
{

View File

@@ -557,6 +557,7 @@ void LLControlAvatar::updateAnimations()
LLViewerObject* LLControlAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end,
S32 face,
BOOL pick_transparent,
BOOL pick_rigged,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,
@@ -571,7 +572,7 @@ LLViewerObject* LLControlAvatar::lineSegmentIntersectRiggedAttachments(const LLV
LLVector4a local_intersection;
if (mRootVolp &&
mRootVolp->lineSegmentIntersect(start, local_end, face, pick_transparent, face_hit, &local_intersection, tex_coord, normal, tangent))
mRootVolp->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent))
{
local_end = local_intersection;
if (intersection)

View File

@@ -63,6 +63,7 @@ public:
const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
BOOL pick_rigged = FALSE,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@@ -1963,7 +1963,7 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
const LLVector4a* ext;
LLVector4a pos, size;
static LLCachedControl<bool> sh_override_rigged_bounds("SHOverrideRiggedBounds", false);
static LLCachedControl<bool> sh_override_rigged_bounds("SHOverrideRiggedBounds", true);
LLVOVolume* volume = drawable->getVOVolume();
if (volume && (!sh_override_rigged_bounds || !volume->isAttachment() || !(drawable->isState(LLDrawable::RIGGED) || volume->isRiggedMesh())))
{
@@ -3419,8 +3419,9 @@ public:
LLVector4a *mTangent;
LLDrawable* mHit;
BOOL mPickTransparent;
BOOL mPickRigged;
LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent,
LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, BOOL pick_rigged,
S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
: mStart(start),
mEnd(end),
@@ -3430,7 +3431,8 @@ public:
mNormal(normal),
mTangent(tangent),
mHit(NULL),
mPickTransparent(pick_transparent)
mPickTransparent(pick_transparent),
mPickRigged(pick_rigged)
{
}
@@ -3512,9 +3514,9 @@ public:
if (vobj->isAvatar())
{
LLVOAvatar* avatar = (LLVOAvatar*) vobj;
if (gFloaterTools->getVisible() || LLFloaterInspect::findInstance())
if (mPickRigged)
{
LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent);
LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent);
if (hit)
{
mEnd = intersection;
@@ -3534,7 +3536,7 @@ public:
}
}
if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent))
if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent))
{
mEnd = intersection; // shorten ray so we only find CLOSER hits
if (mIntersection)
@@ -3553,6 +3555,7 @@ public:
LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
BOOL pick_rigged,
S32* face_hit, // return the face hit
LLVector4a* intersection, // return the intersection point
LLVector2* tex_coord, // return the texture coordinates of the intersection point
@@ -3561,7 +3564,7 @@ LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, co
)
{
LLOctreeIntersect intersect(start, end, pick_transparent, face_hit, intersection, tex_coord, normal, tangent);
LLOctreeIntersect intersect(start, end, pick_transparent, pick_rigged, face_hit, intersection, tex_coord, normal, tangent);
LLDrawable* drawable = intersect.check(mOctree);
return drawable;

View File

@@ -392,6 +392,7 @@ public:
LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
BOOL pick_rigged,
S32* face_hit, // return the face hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@@ -165,7 +165,7 @@ BOOL LLToolCompInspect::handleMouseDown(S32 x, S32 y, MASK mask)
else
{
mMouseDown = TRUE;
gViewerWindow->pickAsync(x, y, mask, pickCallback);
gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE);
handled = TRUE;
}
@@ -275,7 +275,7 @@ BOOL LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask)
BOOL LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask)
{
mMouseDown = TRUE;
gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE);
gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE, TRUE);
return TRUE;
}
@@ -399,7 +399,7 @@ BOOL LLToolCompScale::handleHover(S32 x, S32 y, MASK mask)
BOOL LLToolCompScale::handleMouseDown(S32 x, S32 y, MASK mask)
{
mMouseDown = TRUE;
gViewerWindow->pickAsync(x, y, mask, pickCallback);
gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE);
return TRUE;
}
@@ -515,7 +515,7 @@ BOOL LLToolCompCreate::handleMouseDown(S32 x, S32 y, MASK mask)
if ( (mask == MASK_SHIFT) || (mask == MASK_CONTROL) )
{
gViewerWindow->pickAsync(x, y, mask, pickCallback);
gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE);
handled = TRUE;
}
else
@@ -599,7 +599,7 @@ BOOL LLToolCompRotate::handleHover(S32 x, S32 y, MASK mask)
BOOL LLToolCompRotate::handleMouseDown(S32 x, S32 y, MASK mask)
{
mMouseDown = TRUE;
gViewerWindow->pickAsync(x, y, mask, pickCallback);
gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE);
return TRUE;
}

View File

@@ -862,12 +862,12 @@ void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, BOOL drop, EAccep
if (mDrop)
{
// don't allow drag and drop onto transparent objects
pick(gViewerWindow->pickImmediate(x, y, FALSE));
pick(gViewerWindow->pickImmediate(x, y, FALSE, FALSE));
}
else
{
// don't allow drag and drop onto transparent objects
gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE);
gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE);
}
*acceptance = mLastAccept;

View File

@@ -87,7 +87,7 @@ BOOL LLToolFace::handleDoubleClick(S32 x, S32 y, MASK mask)
BOOL LLToolFace::handleMouseDown(S32 x, S32 y, MASK mask)
{
gViewerWindow->pickAsync(x, y, mask, pickCallback);
gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE, TRUE);
return TRUE;
}

View File

@@ -131,7 +131,9 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
gViewerWindow->pickAsync(x, y, mask, pickCallback);
bool pick_rigged = gFloaterTools && gFloaterTools->getVisible();
gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, pick_rigged, /*BOOL pick_unselectable*/ TRUE);
// don't steal focus from UI
return FALSE;
}

View File

@@ -141,7 +141,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask)
if (!gAgent.leftButtonGrabbed())
{
// can grab transparent objects (how touch event propagates, scripters rely on this)
gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE, TRUE);
gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE, FALSE, FALSE, TRUE);
}
return TRUE;
}

View File

@@ -107,9 +107,11 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
mMouseOutsideSlop = FALSE;
mMouseDownX = x;
mMouseDownY = y;
//LLTimer pick_timer;
BOOL pick_rigged = true; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
//left mouse down always picks transparent (but see handleMouseUp)
mPick = gViewerWindow->pickImmediate(x, y, TRUE);
mPick = gViewerWindow->pickImmediate(x, y, TRUE, pick_rigged);
//LL_INFOS() << "pick_rigged is " << (S32) pick_rigged << " pick time elapsed " << pick_timer.getElapsedTimeF32() << LL_ENDL;
mPick.mKeyMask = mask;
mMouseButtonDown = true;
@@ -124,7 +126,10 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
// don't pick transparent so users can't "pay" transparent objects
mPick = gViewerWindow->pickImmediate(x, y, FALSE);
mPick = gViewerWindow->pickImmediate(x, y,
/*BOOL pick_transparent*/ FALSE,
/*BOOL pick_rigged*/ TRUE,
/*BOOL pick_particle*/ TRUE);
mPick.mKeyMask = mask;
// claim not handled so UI focus stays same
@@ -580,7 +585,8 @@ void LLToolPie::selectionPropertiesReceived()
BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
{
mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE);
BOOL pick_rigged = false;
mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE, pick_rigged);
LLViewerObject *parent = NULL;
LLViewerObject *object = mHoverPick.getObject();
//LLSelectMgr::getInstance()->setHoverObject(object, mHoverPick.mObjectFace); // Singu TODO: remove llhoverview.cpp
@@ -633,7 +639,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
else
{
// perform a separate pick that detects transparent objects since they respond to 1-click actions
LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE);
LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE, pick_rigged);
LLViewerObject* click_action_object = click_action_pick.getObject();
@@ -704,9 +710,9 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
// ignoring transparent objects
LLPickInfo savedPick = mPick;
mPick = gViewerWindow->pickImmediate(savedPick.mMousePt.mX, savedPick.mMousePt.mY,
FALSE /* ignore transparent *//*,
FALSE*/ /* ignore particles */); // Singu TODO: Particle picking
FALSE /* ignore transparent */,
FALSE /* ignore rigged */,
FALSE /* ignore particles */);
LLViewerObject* objp = mPick.getObject();
bool is_in_world = mPick.mObjectID.notNull() && objp && !objp->isHUDAttachment(); // We clicked on a non-hud object
bool is_land = mPick.mPickType == LLPickInfo::PICK_LAND; // or on land
@@ -792,8 +798,9 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
// thought they were clicking on whatever they were seeing through it, so
// recompute what was clicked on ignoring transparent objects
mPick = gViewerWindow->pickImmediate(savedPick.mMousePt.mX, savedPick.mMousePt.mY,
FALSE /* ignore transparent *//*,
FALSE*/ /* ignore particles */); // Singu TODO: Particle picking
FALSE /* ignore transparent */,
FALSE /* ignore rigged */,
FALSE /* ignore particles */);
LLViewerObject* objp = mPick.getObject();
LLViewerObject* parentp = objp ? objp->getRootEdit() : NULL;

View File

@@ -67,7 +67,7 @@ BOOL LLToolPipette::handleMouseDown(S32 x, S32 y, MASK mask)
mSuccess = TRUE;
mTooltipMsg.clear();
setMouseCapture(TRUE);
gViewerWindow->pickAsync(x, y, mask, pickCallback);
gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE);
return TRUE;
}

View File

@@ -95,7 +95,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
// Viewer-side pick to find the right sim to create the object on.
// First find the surface the object will be created on.
LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE);
LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE, TRUE);
// Note: use the frontmost non-flora version because (a) plants usually have lots of alpha and (b) pants' Havok
// representations (if any) are NOT the same as their viewer representation.

View File

@@ -69,7 +69,8 @@ LLToolSelect::LLToolSelect( LLToolComposite* composite )
BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask)
{
// do immediate pick query
mPick = gViewerWindow->pickImmediate(x, y, TRUE);
BOOL pick_rigged = true; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
mPick = gViewerWindow->pickImmediate(x, y, TRUE, pick_rigged);
// Pass mousedown to agent
LLTool::handleMouseDown(x, y, mask);

View File

@@ -78,7 +78,8 @@ void dialog_refresh_all(void);
BOOL LLToolSelectRect::handleMouseDown(S32 x, S32 y, MASK mask)
{
handlePick(gViewerWindow->pickImmediate(x, y, TRUE));
BOOL pick_rigged = true; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
handlePick(gViewerWindow->pickImmediate(x, y, TRUE /* pick_transparent */, pick_rigged));
LLTool::handleMouseDown(x, y, mask);

View File

@@ -4526,6 +4526,7 @@ LLViewerObject* LLViewerObject::getRootEdit() const
BOOL LLViewerObject::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face,
BOOL pick_transparent,
BOOL pick_rigged,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,

View File

@@ -283,6 +283,7 @@ public:
virtual BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
BOOL pick_rigged = FALSE,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@@ -180,6 +180,7 @@
#include "llviewernetwork.h"
#include "llpostprocess.h"
#include "llwearablelist.h"
#include "llfloaterinspect.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
@@ -220,7 +221,9 @@ BOOL gShowOverlayTitle = FALSE;
BOOL gPickTransparent = TRUE;
LLViewerObject* gDebugRaycastObject = NULL;
LLVOPartGroup* gDebugRaycastParticle = NULL;
LLVector4a gDebugRaycastIntersection;
LLVector4a gDebugRaycastParticleIntersection;
LLVector2 gDebugRaycastTexCoord;
LLVector4a gDebugRaycastNormal;
LLVector4a gDebugRaycastTangent;
@@ -683,7 +686,7 @@ public:
LLMeshRepository::sHTTPRetryCount));
ypos += y_inc;
addText(xpos, ypos, llformat("%d/%d Mesh LOD Pending/Processing", LLMeshRepository::sLODPending, LLMeshRepository::sLODProcessing));
addText(xpos, ypos, llformat("%d/%d Mesh LOD Pending/Processing", LLMeshRepository::sLODPending, (U32)LLMeshRepository::sLODProcessing));
ypos += y_inc;
addText(xpos, ypos, llformat("%.3f/%.3f MB Mesh Cache Read/Write ", LLMeshRepository::sCacheBytesRead/(1024.f*1024.f), LLMeshRepository::sCacheBytesWritten/(1024.f*1024.f)));
@@ -1103,7 +1106,9 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
if (prim_media_dnd_enabled)
{
LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/ );
LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY,
TRUE /* pick_transparent */,
FALSE /* pick_rigged */);
LLUUID object_id = pick_info.getObjectID();
S32 object_face = pick_info.mObjectFace;
@@ -3094,7 +3099,7 @@ void LLViewerWindow::updateUI()
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST))
{
gDebugRaycastFaceHit = -1;
gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE,
gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE,
&gDebugRaycastFaceHit,
&gDebugRaycastIntersection,
&gDebugRaycastTexCoord,
@@ -3102,6 +3107,7 @@ void LLViewerWindow::updateUI()
&gDebugRaycastTangent,
&gDebugRaycastStart,
&gDebugRaycastEnd);
gDebugRaycastParticle = gPipeline.lineSegmentIntersectParticle(gDebugRaycastStart, gDebugRaycastEnd, &gDebugRaycastParticleIntersection, NULL);
}
updateMouseDelta();
@@ -3244,6 +3250,7 @@ void LLViewerWindow::updateUI()
// only handle hover events when UI is enabled
// if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
if (mMouseInWindow)
{
if( mouse_captor )
@@ -3946,7 +3953,14 @@ BOOL LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewe
return intersect;
}
void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& info), BOOL pick_transparent, BOOL get_surface_info)
void LLViewerWindow::pickAsync( S32 x,
S32 y_from_bot,
MASK mask,
void (*callback)(const LLPickInfo& info),
BOOL pick_transparent,
BOOL pick_rigged,
BOOL pick_unselectable,
BOOL get_surface_info)
{
if (gNoRender)
{
@@ -3961,8 +3975,7 @@ void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback
// "Show Debug Alpha" means no object actually transparent
pick_transparent = TRUE;
}
LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, get_surface_info, callback);
LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, get_surface_info, pick_unselectable, callback);
schedulePick(pick_info);
}
@@ -3994,6 +4007,11 @@ void LLViewerWindow::performPick()
return;
}
if (!gFocusMgr.getAppHasFocus())
{
return;
}
if (!mPicks.empty())
{
std::vector<LLPickInfo>::iterator pick_it;
@@ -4023,13 +4041,18 @@ void LLViewerWindow::returnEmptyPicks()
}
// Performs the GL object/land pick.
LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent)
LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle)
{
if (gNoRender)
{
return LLPickInfo();
}
if (!gFocusMgr.getAppHasFocus())
{
return LLPickInfo();
}
// push back pick info object
BOOL in_build_mode = gFloaterTools && gFloaterTools->getVisible();
if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha)
@@ -4038,10 +4061,9 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans
// "Show Debug Alpha" means no object actually transparent
pick_transparent = TRUE;
}
// shortcut queueing in mPicks and just update mLastPick in place
MASK key_mask = gKeyboard->currentMask(TRUE);
mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, TRUE, NULL);
mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, TRUE, FALSE, NULL);
mLastPick.fetchResults();
return mLastPick;
@@ -4077,6 +4099,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
LLViewerObject *this_object,
S32 this_face,
BOOL pick_transparent,
BOOL pick_rigged,
S32* face_hit,
LLVector4a *intersection,
LLVector2 *uv,
@@ -4147,7 +4170,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
{
if (this_object->isHUDAttachment()) // is a HUD object?
{
if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent,
if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent, pick_rigged,
face_hit, intersection, uv, normal, tangent))
{
found = this_object;
@@ -4155,7 +4178,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
}
else // is a world object
{
if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent,
if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, pick_rigged,
face_hit, intersection, uv, normal, tangent))
{
found = this_object;
@@ -4176,7 +4199,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
if (!found) // if not found in HUD, look in world:
{
found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent,
found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, pick_rigged,
face_hit, intersection, uv, normal, tangent);
if (found && !pick_transparent)
@@ -4321,7 +4344,7 @@ BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, con
// Returns global position
BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global)
BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global, BOOL ignore_distance)
{
LLVector3 mouse_direction_global = mouseDirectionGlobal(x,y);
F32 mouse_dir_scale;
@@ -4330,6 +4353,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
F32 land_z;
const F32 FIRST_PASS_STEP = 1.0f; // meters
const F32 SECOND_PASS_STEP = 0.1f; // meters
const F32 draw_distance = ignore_distance ? MAX_FAR_CLIP : (gAgentCamera.mDrawDistance * 4);
LLVector3d camera_pos_global;
camera_pos_global = gAgentCamera.getCameraPositionGlobal();
@@ -4337,7 +4361,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
LLVector3 probe_point_region;
// walk forwards to find the point
for (mouse_dir_scale = FIRST_PASS_STEP; mouse_dir_scale < gAgentCamera.mDrawDistance * 4; mouse_dir_scale += FIRST_PASS_STEP)
for (mouse_dir_scale = FIRST_PASS_STEP; mouse_dir_scale < draw_distance; mouse_dir_scale += FIRST_PASS_STEP)
{
LLVector3d mouse_direction_global_d;
mouse_direction_global_d.setVec(mouse_direction_global * mouse_dir_scale);
@@ -5965,15 +5989,20 @@ LLPickInfo::LLPickInfo()
mTangent(),
mBinormal(),
mHUDIcon(NULL),
mPickTransparent(FALSE)
mPickTransparent(FALSE),
mPickRigged(FALSE),
mPickParticle(FALSE)
{
}
LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
MASK keyboard_mask,
BOOL pick_transparent,
BOOL pick_uv_coords,
void (*pick_callback)(const LLPickInfo& pick_info))
BOOL pick_transparent,
BOOL pick_rigged,
BOOL pick_particle,
BOOL pick_uv_coords,
BOOL pick_unselectable,
void (*pick_callback)(const LLPickInfo& pick_info))
: mMousePt(mouse_pos),
mKeyMask(keyboard_mask),
mPickCallback(pick_callback),
@@ -5987,7 +6016,10 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
mTangent(),
mBinormal(),
mHUDIcon(NULL),
mPickTransparent(pick_transparent)
mPickTransparent(pick_transparent),
mPickRigged(pick_rigged),
mPickParticle(pick_particle),
mPickUnselectable(pick_unselectable)
{
}
@@ -6005,6 +6037,9 @@ void LLPickInfo::fetchResults()
LLVector4a origin;
origin.load3(LLViewerCamera::getInstance()->getOrigin().mV);
F32 icon_dist = 0.f;
LLVector4a start;
LLVector4a end;
LLVector4a particle_end;
if (hit_icon)
{
LLVector4a delta;
@@ -6013,15 +6048,25 @@ void LLPickInfo::fetchResults()
}
LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f,
NULL, -1, mPickTransparent, &face_hit,
&intersection, &uv, &normal, &tangent);
NULL, -1, mPickTransparent, mPickRigged, &face_hit,
&intersection, &uv, &normal, &tangent, &start, &end);
mPickPt = mMousePt;
U32 te_offset = face_hit > -1 ? face_hit : 0;
//unproject relative clicked coordinate from window coordinate using GL
if (mPickParticle)
{ //get the end point of line segement to use for particle raycast
if (hit_object)
{
particle_end = intersection;
}
else
{
particle_end = end;
}
}
LLViewerObject* objectp = hit_object;
@@ -6047,7 +6092,7 @@ void LLPickInfo::fetchResults()
// put global position into land_pos
LLVector3d land_pos;
if (!gViewerWindow->mousePointOnLandGlobal(mPickPt.mX, mPickPt.mY, &land_pos))
if (!gViewerWindow->mousePointOnLandGlobal(mPickPt.mX, mPickPt.mY, &land_pos, mPickUnselectable))
{
// The selected point is beyond the draw distance or is otherwise
// not selectable. Return before calling mPickCallback().
@@ -6085,6 +6130,18 @@ void LLPickInfo::fetchResults()
}
}
if (mPickParticle)
{ //search for closest particle to click origin out to intersection point
S32 part_face = -1;
LLVOPartGroup* group = gPipeline.lineSegmentIntersectParticle(start, particle_end, NULL, &part_face);
if (group)
{
mParticleOwnerID = group->getPartOwner(part_face);
mParticleSourceID = group->getPartSource(part_face);
}
}
if (mPickCallback)
{
mPickCallback(*this);
@@ -6135,7 +6192,7 @@ void LLPickInfo::getSurfaceInfo()
if (objectp)
{
if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f,
objectp, -1, mPickTransparent,
objectp, -1, mPickTransparent, mPickRigged,
&mObjectFace,
&intersection,
&mSTCoords,

View File

@@ -88,7 +88,10 @@ public:
LLPickInfo(const LLCoordGL& mouse_pos,
MASK keyboard_mask,
BOOL pick_transparent,
BOOL pick_rigged,
BOOL pick_particle,
BOOL pick_surface_info,
BOOL pick_unselectable,
void (*pick_callback)(const LLPickInfo& pick_info));
void fetchResults();
@@ -108,6 +111,8 @@ public:
LLVector3d mPosGlobal;
LLVector3 mObjectOffset;
LLUUID mObjectID;
LLUUID mParticleOwnerID;
LLUUID mParticleSourceID;
S32 mObjectFace;
LLHUDIcon* mHUDIcon;
LLVector3 mIntersection;
@@ -118,6 +123,9 @@ public:
LLVector4 mTangent;
LLVector3 mBinormal;
BOOL mPickTransparent;
BOOL mPickRigged;
BOOL mPickParticle;
BOOL mPickUnselectable;
void getSurfaceInfo();
private:
@@ -344,9 +352,15 @@ public:
void returnEmptyPicks();
void pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& pick_info),
BOOL pick_transparent = FALSE, BOOL get_surface_info = FALSE);
LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent);
void pickAsync( S32 x,
S32 y_from_bot,
MASK mask,
void (*callback)(const LLPickInfo& pick_info),
BOOL pick_transparent = FALSE,
BOOL pick_rigged = FALSE,
BOOL pick_unselectable = FALSE,
BOOL get_surface_info = FALSE);
LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_rigged = FALSE, BOOL pick_particle = FALSE);
static void hoverPickCallback(const LLPickInfo& pick_info);
LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth,
@@ -356,6 +370,7 @@ public:
LLViewerObject *this_object = NULL,
S32 this_face = -1,
BOOL pick_transparent = FALSE,
BOOL pick_rigged = FALSE,
S32* face_hit = NULL,
LLVector4a *intersection = NULL,
LLVector2 *uv = NULL,
@@ -373,7 +388,7 @@ public:
//const LLVector3d& lastNonFloraObjectHitOffset();
// mousePointOnLand() returns true if found point
BOOL mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global);
BOOL mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global, BOOL ignore_distance = FALSE);
BOOL mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y, const LLVector3d &plane_point, const LLVector3 &plane_normal);
LLVector3d clickPointInWorldGlobal(const S32 x, const S32 y_from_bot, LLViewerObject* clicked_object) const;
BOOL clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const;

View File

@@ -2220,6 +2220,7 @@ void LLVOAvatar::renderJoints()
BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face,
BOOL pick_transparent,
BOOL pick_rigged,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,
@@ -2333,15 +2334,14 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end,
S32 face,
BOOL pick_transparent,
BOOL pick_rigged,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,
LLVector4a* normal,
LLVector4a* tangent)
{
static const LLCachedControl<bool> allow_mesh_picking("SGAllowRiggedMeshSelection");
if (!allow_mesh_picking || (isSelf() && !gAgent.needsRenderAvatar()))
if (isSelf() && !gAgent.needsRenderAvatar())
{
return NULL;
}
@@ -2371,7 +2371,7 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
LLViewerObject* attached_object = iter.first;
#endif
if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, face_hit, &local_intersection, tex_coord, normal, tangent))
if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent))
{
local_end = local_intersection;
if (intersection)

View File

@@ -214,14 +214,17 @@ public:
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
BOOL pick_rigged = FALSE,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
LLVector4a* normal = NULL, // return the surface normal at the intersection point
LLVector4a* tangent = NULL); // return the surface tangent at the intersection point
LLViewerObject* lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end,
virtual LLViewerObject* lineSegmentIntersectRiggedAttachments(
const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
BOOL pick_rigged = FALSE,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@@ -798,7 +798,7 @@ void LLVOGrass::updateDrawable(BOOL force_damped)
}
// virtual
BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp,
BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
{

View File

@@ -84,6 +84,7 @@ public:
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
BOOL pick_rigged = FALSE,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@@ -489,6 +489,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face,
BOOL pick_transparent,
BOOL pick_rigged,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,

View File

@@ -80,6 +80,7 @@ public:
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face,
BOOL pick_transparent,
BOOL pick_rigged,
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,

View File

@@ -942,7 +942,7 @@ void LLVOSurfacePatch::getGeomSizesEast(const S32 stride, const S32 east_stride,
}
}
BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp,
BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
{

View File

@@ -88,6 +88,7 @@ public:
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
BOOL pick_rigged = FALSE,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@@ -1205,7 +1205,7 @@ void LLVOTree::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
mDrawable->setPositionGroup(pos);
}
BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp,
BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
{

View File

@@ -116,6 +116,7 @@ public:
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
BOOL pick_rigged = FALSE,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@@ -4284,7 +4284,7 @@ LLVector3 LLVOVolume::volumeDirectionToAgent(const LLVector3& dir) const
}
BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp,
BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
{
@@ -4310,8 +4310,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
if (mDrawable->isState(LLDrawable::RIGGED))
{
static const LLCachedControl<bool> allow_mesh_picking("SGAllowRiggedMeshSelection");
if (allow_mesh_picking && (gFloaterTools->getVisible() || LLFloaterInspect::findInstance()))
if (pick_rigged)
{
updateRiggedVolume(true);
volume = mRiggedVolume;
@@ -4492,7 +4491,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
bool LLVOVolume::treatAsRigged()
{
return (gFloaterTools->getVisible() || LLFloaterInspect::findInstance()) &&
return isSelected() &&
(isAttachment() || isAnimatedObject()) &&
mDrawable.notNull() &&
mDrawable->isState(LLDrawable::RIGGED);
@@ -4574,22 +4573,20 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
}
}
U32 frame = LLFrameTimer::getFrameCount();
if (copy)
{
copyVolumeFaces(volume);
}
else
else if (avatar && avatar->areAnimationsPaused())
{
bool is_paused = avatar && avatar->areAnimationsPaused();
if (is_paused)
{
S32 frames_paused = LLFrameTimer::getFrameCount() - avatar->getMotionController().getPausedFrame();
if (frames_paused > 2)
{
return;
}
}
frame = avatar->getMotionController().getPausedFrame();
}
if (frame == mFrame)
{
return;
}
mFrame = frame;
//build matrix palette
static const size_t kMaxJoints = LL_MAX_JOINTS_PER_MESH_OBJECT;

View File

@@ -61,9 +61,10 @@ enum LLVolumeInterfaceType
class LLRiggedVolume : public LLVolume
{
U32 mFrame;
public:
LLRiggedVolume(const LLVolumeParams& params)
: LLVolume(params, 0.f)
: LLVolume(params, 0.f), mFrame(-1)
{
}
@@ -160,6 +161,7 @@ public:
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
BOOL pick_rigged = FALSE,
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@@ -6388,7 +6388,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start,
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_PARTICLE);
if (part && hasRenderType(part->mDrawableType))
{
LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, face_hit, &position, NULL, NULL, NULL);
LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, FALSE, face_hit, &position, NULL, NULL, NULL);
if (hit)
{
drawable = hit;
@@ -6415,6 +6415,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start,
LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
bool pick_rigged,
S32* face_hit,
LLVector4a* intersection, // return the intersection point
LLVector2* tex_coord, // return the texture coordinates of the intersection point
@@ -6447,7 +6448,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
LLSpatialPartition* part = region->getSpatialPartition(j);
if (part && hasRenderType(part->mDrawableType))
{
LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent);
LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, face_hit, &position, tex_coord, normal, tangent);
if (hit)
{
drawable = hit;
@@ -6504,7 +6505,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_ATTACHMENT);
if (part && hasRenderType(part->mDrawableType))
{
LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent);
LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, face_hit, &position, tex_coord, normal, tangent);
if (hit)
{
LLVector4a delta;
@@ -6592,7 +6593,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, c
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_HUD);
if (part)
{
LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, face_hit, intersection, tex_coord, normal, tangent);
LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, FALSE, face_hit, intersection, tex_coord, normal, tangent);
if (hit)
{
drawable = hit;
@@ -7065,7 +7066,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b
LLVector4a result;
result.clear();
gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE,
gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE,
NULL,
&result);

View File

@@ -198,6 +198,7 @@ public:
//get the object between start and end that's closest to start.
LLViewerObject* lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
bool pick_rigged,
S32* face_hit, // return the face hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point