diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index f4298ede23f0eeeae3285136f71783d46bf08363..14abe9d89acf507fc85c19b917cf38792e0c4e59 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 5fd8a08d7a6657e1088f2692904b179fb4d83657..47e12f8adc35e88390797643b28f4afc6aa6c427 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 997af104c7086682c5ef810fdbe9b7b03201c074..3f442051095cc61006bf74cbc67c80e78ae13526 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);