summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-04-17 16:12:49 -0500
committerGitHub <noreply@github.com>2024-04-17 16:12:49 -0500
commitbc93177ea0788a245554882b6d721eae2e057206 (patch)
tree5b15cf6b55ff8e200e763ae720771f3f91ead8f3 /indra/newview/llviewerwindow.cpp
parentd46811d60d8fca4a9908b4e989b14905345928bd (diff)
1176 integrate llgltfnode with selection manager and llmaniptranslate/rotate (#1258)
* #1176 Somewhat working GLTF Node support for translate tool * #1176 Missing file from last commit * #1176 Better translation for rotated nodes. * #1176 Fix for objects snapping back to original position * #1176 GLTF Samples compatibility pass -- attempt at improving rotation manip support, incidental cleanup, GLTF node debug display * #1176 Clean out some unused and not working functions. * #1176 Fix for mac build, incidental cleanup * Mac build fix
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 1459686f10..a0b0fabb66 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -246,6 +246,8 @@ LLVector2 gDebugRaycastTexCoord;
LLVector4a gDebugRaycastNormal;
LLVector4a gDebugRaycastTangent;
S32 gDebugRaycastFaceHit;
+S32 gDebugRaycastGLTFNodeHit;
+S32 gDebugRaycastGLTFPrimitiveHit;
LLVector4a gDebugRaycastStart;
LLVector4a gDebugRaycastEnd;
@@ -3348,9 +3350,11 @@ void LLViewerWindow::updateUI()
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST))
{
- gDebugRaycastFaceHit = -1;
+ gDebugRaycastFaceHit = gDebugRaycastGLTFNodeHit = gDebugRaycastGLTFPrimitiveHit = -1;
gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, TRUE, FALSE,
&gDebugRaycastFaceHit,
+ &gDebugRaycastGLTFNodeHit,
+ &gDebugRaycastGLTFPrimitiveHit,
&gDebugRaycastIntersection,
&gDebugRaycastTexCoord,
&gDebugRaycastNormal,
@@ -4343,6 +4347,8 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
BOOL pick_unselectable,
BOOL pick_reflection_probe,
S32* face_hit,
+ S32* gltf_node_hit,
+ S32* gltf_primitive_hit,
LLVector4a *intersection,
LLVector2 *uv,
LLVector4a *normal,
@@ -4436,7 +4442,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, pick_rigged, pick_unselectable, pick_reflection_probe,
- face_hit, intersection, uv, normal, tangent);
+ face_hit, gltf_node_hit, gltf_primitive_hit, intersection, uv, normal, tangent);
if (found && !pick_transparent)
{
gDebugRaycastIntersection = *intersection;
@@ -6140,8 +6146,8 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
void LLPickInfo::fetchResults()
{
-
S32 face_hit = -1;
+
LLVector4a intersection, normal;
LLVector4a tangent;
@@ -6164,8 +6170,8 @@ void LLPickInfo::fetchResults()
}
LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f,
- NULL, -1, mPickTransparent, mPickRigged, mPickUnselectable, mPickReflectionProbe, &face_hit,
- &intersection, &uv, &normal, &tangent, &start, &end);
+ nullptr, -1, mPickTransparent, mPickRigged, mPickUnselectable, mPickReflectionProbe, &face_hit, &mGLTFNodeIndex, &mGLTFPrimitiveIndex,
+ &intersection, &uv, &normal, &tangent, &start, &end);
mPickPt = mMousePt;
@@ -6311,6 +6317,8 @@ void LLPickInfo::getSurfaceInfo()
if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f,
objectp, -1, mPickTransparent, mPickRigged, mPickUnselectable, mPickReflectionProbe,
&mObjectFace,
+ &mGLTFNodeIndex,
+ &mGLTFPrimitiveIndex,
&intersection,
&mSTCoords,
&normal,