diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-06-05 21:16:31 +0100 | 
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-06-05 21:16:31 +0100 | 
| commit | f8b9af0216f98a37b4474219b68cad42eaafeb73 (patch) | |
| tree | 67ddc2910460b78f9275f97d7ef731e275cfcd8f /indra | |
| parent | 1c62165a2b920c5381e846a5b6d600644d3fb648 (diff) | |
SL-915 - cleanup of LLSkinningUtil
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llskinningutil.cpp | 17 | ||||
| -rw-r--r-- | indra/newview/llskinningutil.h | 25 | ||||
| -rw-r--r-- | indra/newview/llvovolume.cpp | 2 | 
3 files changed, 13 insertions, 31 deletions
| diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index f4298ede23..14abe9d89a 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -32,26 +32,23 @@  #include "llviewercontrol.h"  #include "llmeshrepository.h"  #include "llvolume.h" +#include "llrigginginfo.h" -// static  void LLSkinningUtil::initClass()  {  } -// static  U32 LLSkinningUtil::getMaxJointCount()  {      U32 result = LL_MAX_JOINTS_PER_MESH_OBJECT;  	return result;  } -// static  U32 LLSkinningUtil::getMeshJointCount(const LLMeshSkinInfo *skin)  {  	return llmin((U32)getMaxJointCount(), (U32)skin->mJointNames.size());  } -// static  void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin)  {      if (skin->mInvalidJointsScrubbed) @@ -72,7 +69,6 @@ void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin      skin->mInvalidJointsScrubbed = true;  } -// static  void LLSkinningUtil::initSkinningMatrixPalette(      LLMatrix4* mat,      S32 count,  @@ -120,7 +116,6 @@ void LLSkinningUtil::initSkinningMatrixPalette(      }  } -// static  void LLSkinningUtil::checkSkinWeights(LLVector4a* weights, U32 num_vertices, const LLMeshSkinInfo* skin)  {  #ifdef SHOW_ASSERT                  // same condition that controls llassert() @@ -160,7 +155,6 @@ void LLSkinningUtil::scrubSkinWeights(LLVector4a* weights, U32 num_vertices, con  	checkSkinWeights(weights, num_vertices, skin);  } -// static  void LLSkinningUtil::getPerVertexSkinMatrix(      F32* weights,      LLMatrix4a* mat, @@ -217,14 +211,7 @@ void LLSkinningUtil::getPerVertexSkinMatrix(      llassert(valid_weights);  } -//static -void LLSkinningUtil::initIsRiggedTo(const LLMeshSkinInfo* skin, LLVOAvatar *avatar, joint_rig_info_tab& rig_info_tab)  -{ -    // AXON REMOVE -} - -//static -void LLSkinningUtil::updateRiggedExtents(const LLMeshSkinInfo* skin, LLVOAvatar *avatar, LLVolumeFace& vol_face) +void LLSkinningUtil::updateRiggingInfo(const LLMeshSkinInfo* skin, LLVOAvatar *avatar, LLVolumeFace& vol_face)  {      S32 num_verts = vol_face.mNumVertices;      if (num_verts>0 && vol_face.mWeights && (skin->mJointNames.size()>0)) diff --git a/indra/newview/llskinningutil.h b/indra/newview/llskinningutil.h index 5fd8a08d7a..47e12f8adc 100644 --- a/indra/newview/llskinningutil.h +++ b/indra/newview/llskinningutil.h @@ -32,22 +32,17 @@ class LLMeshSkinInfo;  class LLMatrix4a;  class LLVolumeFace; -#include "llrigginginfo.h" - -// This should probably just be a namespace -class LLSkinningUtil +namespace LLSkinningUtil  { -public: -    static void initClass(); -    static U32 getMaxJointCount(); -    static U32 getMeshJointCount(const LLMeshSkinInfo *skin); -    static void scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin); -    static void initSkinningMatrixPalette(LLMatrix4* mat, S32 count, const LLMeshSkinInfo* skin, LLVOAvatar *avatar); -    static void checkSkinWeights(LLVector4a* weights, U32 num_vertices, const LLMeshSkinInfo* skin); -    static void scrubSkinWeights(LLVector4a* weights, U32 num_vertices, const LLMeshSkinInfo* skin); -    static void getPerVertexSkinMatrix(F32* weights, LLMatrix4a* mat, bool handle_bad_scale, LLMatrix4a& final_mat, U32 max_joints); -    static void initIsRiggedTo(const LLMeshSkinInfo* skin, LLVOAvatar *avatar, joint_rig_info_tab& rig_info_tab);  -    static void updateRiggedExtents(const LLMeshSkinInfo* skin, LLVOAvatar *avatar, LLVolumeFace& vol_face); +    void initClass(); +    U32 getMaxJointCount(); +    U32 getMeshJointCount(const LLMeshSkinInfo *skin); +    void scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin); +    void initSkinningMatrixPalette(LLMatrix4* mat, S32 count, const LLMeshSkinInfo* skin, LLVOAvatar *avatar); +    void checkSkinWeights(LLVector4a* weights, U32 num_vertices, const LLMeshSkinInfo* skin); +    void scrubSkinWeights(LLVector4a* weights, U32 num_vertices, const LLMeshSkinInfo* skin); +    void getPerVertexSkinMatrix(F32* weights, LLMatrix4a* mat, bool handle_bad_scale, LLMatrix4a& final_mat, U32 max_joints); +    void updateRiggingInfo(const LLMeshSkinInfo* skin, LLVOAvatar *avatar, LLVolumeFace& vol_face);  };  #endif diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 997af104c7..3f44205109 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3581,7 +3581,7 @@ void LLVOVolume::updateRiggingInfo()                  for (S32 f = 0; f < volume->getNumVolumeFaces(); ++f)                  {                      LLVolumeFace& vol_face = volume->getVolumeFace(f); -                    LLSkinningUtil::updateRiggedExtents(skin, avatar, vol_face); +                    LLSkinningUtil::updateRiggingInfo(skin, avatar, vol_face);                      if (vol_face.mJointRiggingInfoTabPtr)                      {                          mergeRigInfoTab(mJointRiggingInfoTab, *vol_face.mJointRiggingInfoTabPtr); | 
