From f8b9af0216f98a37b4474219b68cad42eaafeb73 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 5 Jun 2018 21:16:31 +0100 Subject: SL-915 - cleanup of LLSkinningUtil --- indra/newview/llskinningutil.cpp | 17 ++--------------- indra/newview/llskinningutil.h | 25 ++++++++++--------------- indra/newview/llvovolume.cpp | 2 +- 3 files changed, 13 insertions(+), 31 deletions(-) (limited to 'indra') 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); -- cgit v1.2.3