From b2a06578187af5446b5e24379abc8764f0cd731f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 16 Jun 2017 16:03:06 +0100 Subject: SL-697 - global scale function for LLControlAvatar, to support arbitrary scaling of animated objects. Not currently used. --- indra/llcharacter/lljoint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcharacter/lljoint.cpp') diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index a3d5679f65..89335a20f5 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -881,7 +881,7 @@ void LLJoint::setWorldRotation( const LLQuaternion& rot ) //-------------------------------------------------------------------- const LLVector3& LLJoint::getScale() { - return mXform.getScale(); + return mXform.getScale(); } //-------------------------------------------------------------------- -- cgit v1.2.3 From f954abd9dfbf8f7147e1f5b352c8eadc6a074555 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 20 Apr 2018 13:37:07 +0100 Subject: MAINT-8549, MAINT-8554 - improvements to animesh ARC, restrict joint position overrides to +/-5m --- indra/llcharacter/lljoint.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/llcharacter/lljoint.cpp') diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 89335a20f5..abc5a95c8d 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -435,6 +435,15 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh // return; //} + LLVector3 constrained_pos = LLVector3(llclamp(pos[0],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET), + llclamp(pos[1],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET), + llclamp(pos[2],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET)); + if (constrained_pos != pos) + { + LL_DEBUGS("Avatar") << "attachment pos override constrained to " + << constrained_pos << " was " << pos << LL_ENDL; + } + LLVector3 before_pos; LLUUID before_mesh_id; bool has_active_override_before = hasAttachmentPosOverride( before_pos, before_mesh_id ); @@ -446,7 +455,7 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh } m_posBeforeOverrides = getPosition(); } - m_attachmentPosOverrides.add(mesh_id,pos); + m_attachmentPosOverrides.add(mesh_id,constrained_pos); LLVector3 after_pos; LLUUID after_mesh_id; hasAttachmentPosOverride(after_pos, after_mesh_id); @@ -455,7 +464,7 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh active_override_changed = true; if (do_debug_joint(getName())) { - LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " addAttachmentPosOverride for mesh " << mesh_id << " pos " << pos << LL_ENDL; + LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " addAttachmentPosOverride for mesh " << mesh_id << " pos " << constrained_pos << LL_ENDL; } updatePos(av_info); } -- cgit v1.2.3 From bc773adf618eb531fdccacd95f4cd51f6b87497a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 24 Apr 2018 16:55:55 +0100 Subject: MAINT-8549 - refactoring of streaming cost and related calculations --- indra/llcharacter/lljoint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcharacter/lljoint.cpp') diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index abc5a95c8d..9d10f53bed 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -440,7 +440,7 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh llclamp(pos[2],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET)); if (constrained_pos != pos) { - LL_DEBUGS("Avatar") << "attachment pos override constrained to " + LL_DEBUGS("Avatar") << mesh_id << " joint " << getName() << " attachment pos override constrained to " << constrained_pos << " was " << pos << LL_ENDL; } -- cgit v1.2.3 From b42b0a9fb9b9aa777c73729f3313a0f1584def86 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 14 May 2018 14:15:10 +0100 Subject: MAINT-8554 - disabled joint position clamping for now --- indra/llcharacter/lljoint.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llcharacter/lljoint.cpp') diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 9d10f53bed..07fcd99701 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -435,6 +435,7 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh // return; //} +#if 0 // AXON MAINT-8554 - this may be overly restrictive for large models LLVector3 constrained_pos = LLVector3(llclamp(pos[0],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET), llclamp(pos[1],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET), llclamp(pos[2],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET)); @@ -443,6 +444,9 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh LL_DEBUGS("Avatar") << mesh_id << " joint " << getName() << " attachment pos override constrained to " << constrained_pos << " was " << pos << LL_ENDL; } +#else + LLVector3 constrained_pos = pos; +#endif LLVector3 before_pos; LLUUID before_mesh_id; -- cgit v1.2.3 From e86839fac19753d0fa4006296c7f8909fe781013 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 1 Jun 2018 15:08:59 +0100 Subject: SL-915 - WIP on dynamic joint box tracking --- indra/llcharacter/lljoint.cpp | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'indra/llcharacter/lljoint.cpp') diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 07fcd99701..68355cbbdc 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -96,6 +96,46 @@ void LLVector3OverrideMap::clear() m_map.clear(); } +//----------------------------------------------------------------------------- +// LLJointRiggingInfo +//----------------------------------------------------------------------------- +LLJointRiggingInfo::LLJointRiggingInfo() +{ + mRiggedExtents[0].clear(); + mRiggedExtents[1].clear(); + mIsRiggedTo = false; +} + +bool LLJointRiggingInfo::isRiggedTo() const +{ + return mIsRiggedTo; +} + +void LLJointRiggingInfo::setIsRiggedTo(bool val) +{ + mIsRiggedTo = val; +} + +LLVector4a *LLJointRiggingInfo::getRiggedExtents() +{ + return mRiggedExtents; +} + +const LLVector4a *LLJointRiggingInfo::getRiggedExtents() const +{ + return mRiggedExtents; +} + +// Combine two rigging info states. +// - isRiggedTo if either of the source infos are rigged to +// - box is union of the two sources +void LLJointRiggingInfo::merge(const LLJointRiggingInfo& other) +{ + mIsRiggedTo = mIsRiggedTo || other.mIsRiggedTo; + update_min_max(mRiggedExtents[0], mRiggedExtents[1], other.mRiggedExtents[0]); + update_min_max(mRiggedExtents[0], mRiggedExtents[1], other.mRiggedExtents[1]); +} + //----------------------------------------------------------------------------- // LLJoint() // Class Constructor @@ -597,6 +637,19 @@ void LLJoint::showAttachmentPosOverrides(const std::string& av_info) const } } +//-------------------------------------------------------------------- +// getRiggingInfo() +//-------------------------------------------------------------------- +LLJointRiggingInfo& LLJoint::getRiggingInfo() +{ + return mRiggingInfo; +} + +const LLJointRiggingInfo& LLJoint::getRiggingInfo() const +{ + return mRiggingInfo; +} + //-------------------------------------------------------------------- // updatePos() //-------------------------------------------------------------------- -- cgit v1.2.3 From 228525aa27b05cc1aa8be27de4ae59f5ec590ae3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 4 Jun 2018 14:43:06 +0100 Subject: SL-915 - tracking joint is rigged state --- indra/llcharacter/lljoint.cpp | 53 ------------------------------------------- 1 file changed, 53 deletions(-) (limited to 'indra/llcharacter/lljoint.cpp') diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 68355cbbdc..07fcd99701 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -96,46 +96,6 @@ void LLVector3OverrideMap::clear() m_map.clear(); } -//----------------------------------------------------------------------------- -// LLJointRiggingInfo -//----------------------------------------------------------------------------- -LLJointRiggingInfo::LLJointRiggingInfo() -{ - mRiggedExtents[0].clear(); - mRiggedExtents[1].clear(); - mIsRiggedTo = false; -} - -bool LLJointRiggingInfo::isRiggedTo() const -{ - return mIsRiggedTo; -} - -void LLJointRiggingInfo::setIsRiggedTo(bool val) -{ - mIsRiggedTo = val; -} - -LLVector4a *LLJointRiggingInfo::getRiggedExtents() -{ - return mRiggedExtents; -} - -const LLVector4a *LLJointRiggingInfo::getRiggedExtents() const -{ - return mRiggedExtents; -} - -// Combine two rigging info states. -// - isRiggedTo if either of the source infos are rigged to -// - box is union of the two sources -void LLJointRiggingInfo::merge(const LLJointRiggingInfo& other) -{ - mIsRiggedTo = mIsRiggedTo || other.mIsRiggedTo; - update_min_max(mRiggedExtents[0], mRiggedExtents[1], other.mRiggedExtents[0]); - update_min_max(mRiggedExtents[0], mRiggedExtents[1], other.mRiggedExtents[1]); -} - //----------------------------------------------------------------------------- // LLJoint() // Class Constructor @@ -637,19 +597,6 @@ void LLJoint::showAttachmentPosOverrides(const std::string& av_info) const } } -//-------------------------------------------------------------------- -// getRiggingInfo() -//-------------------------------------------------------------------- -LLJointRiggingInfo& LLJoint::getRiggingInfo() -{ - return mRiggingInfo; -} - -const LLJointRiggingInfo& LLJoint::getRiggingInfo() const -{ - return mRiggingInfo; -} - //-------------------------------------------------------------------- // updatePos() //-------------------------------------------------------------------- -- cgit v1.2.3 From 56458152aca5a25663377fc9dde087de78bfb412 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 8 Aug 2018 22:11:32 +0100 Subject: SL-704 - code cleanup, mostly old AXON comments. --- indra/llcharacter/lljoint.cpp | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'indra/llcharacter/lljoint.cpp') diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 07fcd99701..e2f512f86e 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -428,26 +428,6 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh { return; } - // BENTO - // Not clear pelvis overrides are meaningful/useful. - //if (mName == "mPelvis") - //{ - // return; - //} - -#if 0 // AXON MAINT-8554 - this may be overly restrictive for large models - LLVector3 constrained_pos = LLVector3(llclamp(pos[0],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET), - llclamp(pos[1],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET), - llclamp(pos[2],-LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET)); - if (constrained_pos != pos) - { - LL_DEBUGS("Avatar") << mesh_id << " joint " << getName() << " attachment pos override constrained to " - << constrained_pos << " was " << pos << LL_ENDL; - } -#else - LLVector3 constrained_pos = pos; -#endif - LLVector3 before_pos; LLUUID before_mesh_id; bool has_active_override_before = hasAttachmentPosOverride( before_pos, before_mesh_id ); @@ -459,7 +439,7 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh } m_posBeforeOverrides = getPosition(); } - m_attachmentPosOverrides.add(mesh_id,constrained_pos); + m_attachmentPosOverrides.add(mesh_id,pos); LLVector3 after_pos; LLUUID after_mesh_id; hasAttachmentPosOverride(after_pos, after_mesh_id); @@ -468,7 +448,7 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh active_override_changed = true; if (do_debug_joint(getName())) { - LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " addAttachmentPosOverride for mesh " << mesh_id << " pos " << constrained_pos << LL_ENDL; + LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " addAttachmentPosOverride for mesh " << mesh_id << " pos " << pos << LL_ENDL; } updatePos(av_info); } -- cgit v1.2.3