summaryrefslogtreecommitdiff
path: root/indra/newview/llreflectionmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llreflectionmap.cpp')
-rw-r--r--indra/newview/llreflectionmap.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp
index 261aa51d62..624fbd1758 100644
--- a/indra/newview/llreflectionmap.cpp
+++ b/indra/newview/llreflectionmap.cpp
@@ -169,7 +169,6 @@ void LLReflectionMap::autoAdjustOrigin()
bool LLReflectionMap::intersects(LLReflectionMap* other)
{
- // TODO: incorporate getBox
LLVector4a delta;
delta.setSub(other->mOrigin, mOrigin);
@@ -239,11 +238,13 @@ bool LLReflectionMap::getBox(LLMatrix4& box)
scale.set_scale(glh::vec3f(s.mV));
if (vobjp->mDrawable != nullptr)
{
+ // object to agent space (no scale)
glh::matrix4f rm((F32*)vobjp->mDrawable->getWorldMatrix().mMatrix);
- glh::matrix4f rt((F32*)vobjp->getRelativeXform().mMatrix);
+ // construct object to camera space (with scale)
+ mv = mv * rm * scale;
- mv = mv * rm * scale; // *rt;
+ // inverse is camera space to object unit cube
mv = mv.inverse();
box = LLMatrix4(mv.m);