summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2021-09-20 18:58:09 +0000
committerDave Parks <davep@lindenlab.com>2021-09-20 18:58:09 +0000
commitf79890669dcf8e44b5ec3ce1abbd1d1fdd34eb3b (patch)
tree749f11a7763fbe38a2ecfc51479db23faecaaf0d /indra/llcharacter
parentc09532ac13a3ca2f1ca0854cf00594a26ddcb593 (diff)
SL-16006 and SL-16009 Rigged mesh rendering optimization pass
Diffstat (limited to 'indra/llcharacter')
-rw-r--r--indra/llcharacter/lljoint.cpp8
-rw-r--r--indra/llcharacter/lljoint.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index dee642310e..d72282ab42 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -922,6 +922,13 @@ const LLMatrix4 &LLJoint::getWorldMatrix()
return mXform.getWorldMatrix();
}
+const LLMatrix4a& LLJoint::getWorldMatrix4a()
+{
+ updateWorldMatrixParent();
+
+ return mWorldMatrix;
+}
+
//--------------------------------------------------------------------
// setWorldMatrix()
@@ -1003,6 +1010,7 @@ void LLJoint::updateWorldMatrix()
{
sNumUpdates++;
mXform.updateMatrix(FALSE);
+ mWorldMatrix.loadu(mXform.getWorldMatrix());
mDirtyFlags = 0x0;
}
}
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 1b646b641f..ba821667c7 100644
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -38,6 +38,7 @@
#include "m4math.h"
#include "llquaternion.h"
#include "xform.h"
+#include "llmatrix4a.h"
const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15;
// Need to set this to count of animate-able joints,
@@ -123,6 +124,7 @@ protected:
// explicit transformation members
LLXformMatrix mXform;
+ LLMatrix4a mWorldMatrix;
LLVector3 mDefaultPosition;
LLVector3 mDefaultScale;
@@ -259,6 +261,8 @@ public:
const LLMatrix4 &getWorldMatrix();
void setWorldMatrix( const LLMatrix4& mat );
+ const LLMatrix4a& getWorldMatrix4a();
+
void updateWorldMatrixChildren();
void updateWorldMatrixParent();