From 6f99c42e93ed5a8370ef25f29212f596c89724c6 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 5 Nov 2021 00:02:33 +0200 Subject: SL-13867 Remove unused sFreezeCounter --- indra/newview/llvoavatar.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e085a945a8..d3473e8a3b 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -575,7 +575,6 @@ private: //----------------------------------------------------------------------------- // Static Data //----------------------------------------------------------------------------- -S32 LLVOAvatar::sFreezeCounter = 0; U32 LLVOAvatar::sMaxNonImpostors = 12; // Set from RenderAvatarMaxNonImpostors bool LLVOAvatar::sLimitNonImpostors = false; // True unless RenderAvatarMaxNonImpostors is 0 (unlimited) F32 LLVOAvatar::sRenderDistance = 256.f; @@ -4042,8 +4041,7 @@ void LLVOAvatar::computeUpdatePeriod() && (!isSelf() || visually_muted) && !isUIAvatar() && (sLimitNonImpostors || visually_muted) - && !mNeedsAnimUpdate - && !sFreezeCounter) + && !mNeedsAnimUpdate) { const LLVector4a* ext = mDrawable->getSpatialExtents(); LLVector4a size; @@ -10104,23 +10102,6 @@ LLHost LLVOAvatar::getObjectHost() const } } -//static -void LLVOAvatar::updateFreezeCounter(S32 counter) -{ - if(counter) - { - sFreezeCounter = counter; - } - else if(sFreezeCounter > 0) - { - sFreezeCounter--; - } - else - { - sFreezeCounter = 0; - } -} - BOOL LLVOAvatar::updateLOD() { if (mDrawable.isNull()) -- cgit v1.2.3 From 57a7f63dcce6eb20a05dbc42bfdc9ac51072cb7e Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Fri, 4 Feb 2022 09:55:05 -0800 Subject: SL-98 - Render a "ground plane" in the model upload preview, so users can see any added offset --- indra/newview/llvoavatar.cpp | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 5d994058c2..812a5c4fe6 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1,4 +1,4 @@ -/** +/** * @File llvoavatar.cpp * @brief Implementation of LLVOAvatar class which is a derivation of LLViewerObject * @@ -1673,6 +1673,36 @@ void LLVOAvatar::renderBones(const std::string &selected_joint) } } +void LLVOAvatar::renderGroundPlane(float z_offset) +{ // Not necesarilly general - beware - but it seems to meet the needs of LLModelPreview::render + LLVector3 root_pos = mRoot->getPosition(); + const LLVector4a* ext = mDrawable->getSpatialExtents(); + auto min = ext[0], max = ext[1]; + auto center = (max - min) * 0.5f; + F32 ground = root_pos[2] - center[2] - z_offset; + + LLVector3 vA{min[0], min[1], ground}; + LLVector3 vB{max[0], min[1], ground}; + LLVector3 vC{max[0], max[1], ground}; + LLVector3 vD{min[0], max[1], ground}; + + gGL.diffuseColor3f( 1.0f, 0.0f, 1.0f ); + + gGL.begin(LLRender::LINES); + gGL.vertex3fv(vA.mV); + gGL.vertex3fv(vB.mV); + + gGL.vertex3fv(vB.mV); + gGL.vertex3fv(vC.mV); + + gGL.vertex3fv(vC.mV); + gGL.vertex3fv(vD.mV); + + gGL.vertex3fv(vD.mV); + gGL.vertex3fv(vA.mV); + + gGL.end(); +} void LLVOAvatar::renderJoints() { -- cgit v1.2.3 From 3397ca14766855091b8fd9391527d381e94793b1 Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Fri, 4 Feb 2022 12:46:22 -0800 Subject: SL-98 - Guessing at what might make MS compiler happier. --- indra/newview/llvoavatar.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 812a5c4fe6..7123c0e3dd 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1675,16 +1675,16 @@ void LLVOAvatar::renderBones(const std::string &selected_joint) void LLVOAvatar::renderGroundPlane(float z_offset) { // Not necesarilly general - beware - but it seems to meet the needs of LLModelPreview::render - LLVector3 root_pos = mRoot->getPosition(); + const LLVector3 root_pos = mRoot->getPosition(); const LLVector4a* ext = mDrawable->getSpatialExtents(); - auto min = ext[0], max = ext[1]; - auto center = (max - min) * 0.5f; - F32 ground = root_pos[2] - center[2] - z_offset; - - LLVector3 vA{min[0], min[1], ground}; - LLVector3 vB{max[0], min[1], ground}; - LLVector3 vC{max[0], max[1], ground}; - LLVector3 vD{min[0], max[1], ground}; + const LLVector4a min = ext[0], max = ext[1]; + const F32 center = (max[2] - min[2]) * 0.5f; + const F32 ground = root_pos[2] - center - z_offset; + + const LLVector3 vA{min[0], min[1], ground}; + const LLVector3 vB{max[0], min[1], ground}; + const LLVector3 vC{max[0], max[1], ground}; + const LLVector3 vD{min[0], max[1], ground}; gGL.diffuseColor3f( 1.0f, 0.0f, 1.0f ); -- cgit v1.2.3 From f1df486208f94c649f09dc2dc0cce393208d3771 Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Fri, 4 Feb 2022 13:55:08 -0800 Subject: SL-98 - move new renderGroundPlane from LLVOAvatar to LLModelPreview --- indra/newview/llvoavatar.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7123c0e3dd..7746af5a58 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1673,36 +1673,6 @@ void LLVOAvatar::renderBones(const std::string &selected_joint) } } -void LLVOAvatar::renderGroundPlane(float z_offset) -{ // Not necesarilly general - beware - but it seems to meet the needs of LLModelPreview::render - const LLVector3 root_pos = mRoot->getPosition(); - const LLVector4a* ext = mDrawable->getSpatialExtents(); - const LLVector4a min = ext[0], max = ext[1]; - const F32 center = (max[2] - min[2]) * 0.5f; - const F32 ground = root_pos[2] - center - z_offset; - - const LLVector3 vA{min[0], min[1], ground}; - const LLVector3 vB{max[0], min[1], ground}; - const LLVector3 vC{max[0], max[1], ground}; - const LLVector3 vD{min[0], max[1], ground}; - - gGL.diffuseColor3f( 1.0f, 0.0f, 1.0f ); - - gGL.begin(LLRender::LINES); - gGL.vertex3fv(vA.mV); - gGL.vertex3fv(vB.mV); - - gGL.vertex3fv(vB.mV); - gGL.vertex3fv(vC.mV); - - gGL.vertex3fv(vC.mV); - gGL.vertex3fv(vD.mV); - - gGL.vertex3fv(vD.mV); - gGL.vertex3fv(vA.mV); - - gGL.end(); -} void LLVOAvatar::renderJoints() { -- cgit v1.2.3 From b146de38de69167354da08e37dfd8903f2466f9d Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Tue, 8 Feb 2022 14:59:31 -0800 Subject: SL-98 - Remove dead code --- indra/newview/llvoavatar.cpp | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7746af5a58..f4fa94eade 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -176,8 +176,6 @@ const F32 MAX_STANDOFF_DISTANCE_CHANGE = 32; // Should probably be 4 or 3, but didn't want to change it while change other logic - SJB const S32 SWITCH_TO_BAKED_DISCARD = 5; -const F32 FOOT_COLLIDE_FUDGE = 0.04f; - const F32 HOVER_EFFECT_MAX_SPEED = 3.f; const F32 HOVER_EFFECT_STRENGTH = 0.f; const F32 UNDERWATER_EFFECT_STRENGTH = 0.1f; @@ -600,7 +598,6 @@ S32 LLVOAvatar::sNumVisibleChatBubbles = 0; BOOL LLVOAvatar::sDebugInvisible = FALSE; BOOL LLVOAvatar::sShowAttachmentPoints = FALSE; BOOL LLVOAvatar::sShowAnimationDebug = FALSE; -BOOL LLVOAvatar::sShowFootPlane = FALSE; BOOL LLVOAvatar::sVisibleInFirstPerson = FALSE; F32 LLVOAvatar::sLODFactor = 1.f; F32 LLVOAvatar::sPhysicsLODFactor = 1.f; @@ -5008,42 +5005,6 @@ U32 LLVOAvatar::renderSkinned() return num_indices; } - // render collision normal - // *NOTE: this is disabled (there is no UI for enabling sShowFootPlane) due - // to DEV-14477. the code is left here to aid in tracking down the cause - // of the crash in the future. -brad - if (sShowFootPlane && mDrawable.notNull()) - { - LLVector3 slaved_pos = mDrawable->getPositionAgent(); - LLVector3 foot_plane_normal(mFootPlane.mV[VX], mFootPlane.mV[VY], mFootPlane.mV[VZ]); - F32 dist_from_plane = (slaved_pos * foot_plane_normal) - mFootPlane.mV[VW]; - LLVector3 collide_point = slaved_pos; - collide_point.mV[VZ] -= foot_plane_normal.mV[VZ] * (dist_from_plane + COLLISION_TOLERANCE - FOOT_COLLIDE_FUDGE); - - gGL.begin(LLRender::LINES); - { - F32 SQUARE_SIZE = 0.2f; - gGL.color4f(1.f, 0.f, 0.f, 1.f); - - gGL.vertex3f(collide_point.mV[VX] - SQUARE_SIZE, collide_point.mV[VY] - SQUARE_SIZE, collide_point.mV[VZ]); - gGL.vertex3f(collide_point.mV[VX] + SQUARE_SIZE, collide_point.mV[VY] - SQUARE_SIZE, collide_point.mV[VZ]); - - gGL.vertex3f(collide_point.mV[VX] + SQUARE_SIZE, collide_point.mV[VY] - SQUARE_SIZE, collide_point.mV[VZ]); - gGL.vertex3f(collide_point.mV[VX] + SQUARE_SIZE, collide_point.mV[VY] + SQUARE_SIZE, collide_point.mV[VZ]); - - gGL.vertex3f(collide_point.mV[VX] + SQUARE_SIZE, collide_point.mV[VY] + SQUARE_SIZE, collide_point.mV[VZ]); - gGL.vertex3f(collide_point.mV[VX] - SQUARE_SIZE, collide_point.mV[VY] + SQUARE_SIZE, collide_point.mV[VZ]); - - gGL.vertex3f(collide_point.mV[VX] - SQUARE_SIZE, collide_point.mV[VY] + SQUARE_SIZE, collide_point.mV[VZ]); - gGL.vertex3f(collide_point.mV[VX] - SQUARE_SIZE, collide_point.mV[VY] - SQUARE_SIZE, collide_point.mV[VZ]); - - gGL.vertex3f(collide_point.mV[VX], collide_point.mV[VY], collide_point.mV[VZ]); - gGL.vertex3f(collide_point.mV[VX] + mFootPlane.mV[VX], collide_point.mV[VY] + mFootPlane.mV[VY], collide_point.mV[VZ] + mFootPlane.mV[VZ]); - - } - gGL.end(); - gGL.flush(); - } //-------------------------------------------------------------------- // render all geometry attached to the skeleton //-------------------------------------------------------------------- -- cgit v1.2.3