diff options
author | Dave Parks <davep@lindenlab.com> | 2010-08-31 18:10:02 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-08-31 18:10:02 -0500 |
commit | 1c286f6b0bc3ab3fe02d2ce3cdd80d09f6809c0e (patch) | |
tree | ab0003a2781a85558b8741e78df249d3ba439154 /indra/newview/llface.cpp | |
parent | e68f9e566b5aeb5341f5adea0b8a6ccde86ee93d (diff) |
Merge cleanup.
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r-- | indra/newview/llface.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index a3a3009820..bac636286e 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -936,10 +936,10 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po { const LLMatrix4& vol_mat = getWorldMatrix(); const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset); - LLVector3 normal = vf.mVertices[0].mNormal; - LLVector3 binormal = vf.mVertices[0].mBinormal; + const LLVector4a& normal4a = vf.mNormals[0]; + const LLVector4a& binormal4a = vf.mBinormals[0]; LLVector2 projected_binormal; - planarProjection(projected_binormal, normal, vf.mCenter, binormal); + planarProjection(projected_binormal, normal4a, *vf.mCenter, binormal4a); projected_binormal -= LLVector2(0.5f, 0.5f); // this normally happens in xform() *scale = projected_binormal.length(); // rotate binormal to match what planarProjection() thinks it is, @@ -947,6 +947,10 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po projected_binormal.normalize(); F32 ang = acos(projected_binormal.mV[VY]); ang = (projected_binormal.mV[VX] < 0.f) ? -ang : ang; + + //VECTORIZE THIS + LLVector3 binormal(binormal4a.getF32ptr()); + LLVector3 normal(normal4a.getF32ptr()); binormal.rotVec(ang, normal); LLQuaternion local_rot( binormal % normal, binormal, normal ); *face_rot = local_rot * vol_mat.quaternion(); |