summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llface.cpp121
-rwxr-xr-xindra/newview/llface.h2
-rwxr-xr-xindra/newview/llfloatergroupinvite.cpp6
-rwxr-xr-xindra/newview/llvovolume.cpp2
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml15
5 files changed, 102 insertions, 44 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index b2e3300ab3..4904da728a 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -785,7 +785,7 @@ bool less_than_max_mag(const LLVector4a& vec)
}
BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
- const LLMatrix4& mat_vert_in, BOOL global_volume)
+ const LLMatrix4& mat_vert_in, const LLMatrix3& mat_normal_in, BOOL global_volume)
{
//get bounding box
if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED))
@@ -794,8 +794,12 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
LLMatrix4a mat_vert;
mat_vert.loadu(mat_vert_in);
+ LLMatrix4a mat_normal;
+ mat_normal.loadu(mat_normal_in);
+
+ //VECTORIZE THIS
LLVector4a min,max;
-
+
if (f >= volume.getNumVolumeFaces())
{
llwarns << "Generating bounding box for invalid face index!" << llendl;
@@ -805,70 +809,109 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
const LLVolumeFace &face = volume.getVolumeFace(f);
min = face.mExtents[0];
max = face.mExtents[1];
-
+
llassert(less_than_max_mag(min));
llassert(less_than_max_mag(max));
//min, max are in volume space, convert to drawable render space
+ LLVector4a center;
+ LLVector4a t;
+ t.setAdd(min, max);
+ t.mul(0.5f);
+ mat_vert.affineTransform(t, center);
+ LLVector4a size;
+ size.setSub(max, min);
+ size.mul(0.5f);
- //get 8 corners of bounding box
- LLVector4Logical mask[6];
+ llassert(less_than_max_mag(min));
+ llassert(less_than_max_mag(max));
- for (U32 i = 0; i < 6; ++i)
+ if (!global_volume)
{
- mask[i].clear();
+ //VECTORIZE THIS
+ LLVector4a scale;
+ scale.load3(mDrawablep->getVObj()->getScale().mV);
+ size.mul(scale);
}
- mask[0].setElement<2>(); //001
- mask[1].setElement<1>(); //010
- mask[2].setElement<1>(); //011
- mask[2].setElement<2>();
- mask[3].setElement<0>(); //100
- mask[4].setElement<0>(); //101
- mask[4].setElement<2>();
- mask[5].setElement<0>(); //110
- mask[5].setElement<1>();
-
- LLVector4a v[8];
+ // Catch potential badness from normalization before it happens
+ //
+ llassert(mat_normal.mMatrix[0].isFinite3() && (mat_normal.mMatrix[0].dot3(mat_normal.mMatrix[0]).getF32() > F_APPROXIMATELY_ZERO));
+ llassert(mat_normal.mMatrix[1].isFinite3() && (mat_normal.mMatrix[1].dot3(mat_normal.mMatrix[1]).getF32() > F_APPROXIMATELY_ZERO));
+ llassert(mat_normal.mMatrix[2].isFinite3() && (mat_normal.mMatrix[2].dot3(mat_normal.mMatrix[2]).getF32() > F_APPROXIMATELY_ZERO));
- v[6] = min;
- v[7] = max;
+ mat_normal.mMatrix[0].normalize3fast();
+ mat_normal.mMatrix[1].normalize3fast();
+ mat_normal.mMatrix[2].normalize3fast();
- for (U32 i = 0; i < 6; ++i)
- {
- v[i].setSelectWithMask(mask[i], min, max);
- }
+ LLVector4a v[4];
- LLVector4a tv[8];
+ //get 4 corners of bounding box
+ mat_normal.rotate(size,v[0]);
+
+ //VECTORIZE THIS
+ LLVector4a scale;
+
+ scale.set(-1.f, -1.f, 1.f);
+ scale.mul(size);
+ mat_normal.rotate(scale, v[1]);
+
+ scale.set(1.f, -1.f, -1.f);
+ scale.mul(size);
+ mat_normal.rotate(scale, v[2]);
+
+ scale.set(-1.f, 1.f, -1.f);
+ scale.mul(size);
+ mat_normal.rotate(scale, v[3]);
- //transform bounding box into drawable space
- for (U32 i = 0; i < 8; ++i)
- {
- mat_vert.affineTransform(v[i], tv[i]);
- }
-
- //find bounding box
LLVector4a& newMin = mExtents[0];
LLVector4a& newMax = mExtents[1];
- newMin = newMax = tv[0];
+ newMin = newMax = center;
- for (U32 i = 1; i < 8; ++i)
+ llassert(less_than_max_mag(center));
+
+ for (U32 i = 0; i < 4; i++)
{
- newMin.setMin(newMin, tv[i]);
- newMax.setMax(newMax, tv[i]);
+ LLVector4a delta;
+ delta.setAbs(v[i]);
+ LLVector4a min;
+ min.setSub(center, delta);
+ LLVector4a max;
+ max.setAdd(center, delta);
+
+ newMin.setMin(newMin,min);
+ newMax.setMax(newMax,max);
+
+ llassert(less_than_max_mag(newMin));
+ llassert(less_than_max_mag(newMax));
}
- LLVector4a t;
- t.setAdd(newMin,newMax);
+ if (!mDrawablep->isActive())
+ {
+ LLVector4a offset;
+ offset.load3(mDrawablep->getRegion()->getOriginAgent().mV);
+ newMin.add(offset);
+ newMax.add(offset);
+
+ llassert(less_than_max_mag(newMin));
+ llassert(less_than_max_mag(newMax));
+ }
+
+ t.setAdd(newMin, newMax);
t.mul(0.5f);
+ llassert(less_than_max_mag(t));
+
+ //VECTORIZE THIS
mCenterLocal.set(t.getF32ptr());
+ llassert(less_than_max_mag(newMin));
+ llassert(less_than_max_mag(newMax));
+
t.setSub(newMax,newMin);
mBoundingSphereRadius = t.getLength3().getF32()*0.5f;
-
updateCenterAgent();
}
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 763634a3ab..0687544d53 100755
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -195,7 +195,7 @@ public:
void setSize(S32 numVertices, S32 num_indices = 0, bool align = false);
BOOL genVolumeBBoxes(const LLVolume &volume, S32 f,
- const LLMatrix4& mat, BOOL global_volume = FALSE);
+ const LLMatrix4& mat, const LLMatrix3& inv_trans_mat, BOOL global_volume = FALSE);
void init(LLDrawable* drawablep, LLViewerObject* objp);
void destroy();
diff --git a/indra/newview/llfloatergroupinvite.cpp b/indra/newview/llfloatergroupinvite.cpp
index 49da4e64b3..0c735dec1f 100755
--- a/indra/newview/llfloatergroupinvite.cpp
+++ b/indra/newview/llfloatergroupinvite.cpp
@@ -30,6 +30,7 @@
#include "llpanelgroupinvite.h"
#include "lltrans.h"
#include "lldraghandle.h"
+#include "llgroupmgr.h"
class LLFloaterGroupInvite::impl
{
@@ -123,6 +124,11 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, uuid_vec_t *agen
LLFloaterGroupInvite *fgi = get_if_there(impl::sInstances,
group_id,
(LLFloaterGroupInvite*)NULL);
+
+ // refresh group information
+ LLGroupMgr::getInstance()->clearGroupData(group_id);
+
+
if (!fgi)
{
fgi = new LLFloaterGroupInvite(group_id);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index e3bd2b8621..dd161f84c1 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1481,7 +1481,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global)
continue;
}
res &= face->genVolumeBBoxes(*volume, i,
- mRelativeXform,
+ mRelativeXform, mRelativeXformInvTrans,
(mVolumeImpl && mVolumeImpl->isVolumeGlobal()) || force_global);
if (rebuild)
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index dc54e5e924..99824862e2 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6273,13 +6273,22 @@ You can only claim public land in the Region you&apos;re in.
<notification
icon="notify.tga"
name="RegionTPAccessBlocked"
- persist="true"
+ persist="false"
type="notify">
<tag>fail</tag>
The region you're trying to visit contains content exceeding your current preferences. You can change your preferences using Me &gt; Preferences &gt; General.
</notification>
<notification
+ icon="notify.tga"
+ name="RegionAboutToShutdown"
+ persist="false"
+ type="notify">
+ <tag>fail</tag>
+ The region you're trying to enter is about to shut down.
+ </notification>
+
+ <notification
icon="notify.tga"
name="URBannedFromRegion"
persist="true"
@@ -6805,7 +6814,7 @@ This will add a bookmark in your inventory so you can quickly IM this Resident.
priority="high"
sound="UISndAlert"
type="notify">
-This region will restart in [MINUTES] minutes.
+The region "[NAME]" will restart in [MINUTES] minutes.
If you stay in this region you will be logged out.
</notification>
@@ -6815,7 +6824,7 @@ If you stay in this region you will be logged out.
priority="high"
sound="UISndAlert"
type="notify">
-This region will restart in [SECONDS] seconds.
+The region "[NAME]" will restart in [SECONDS] seconds.
If you stay in this region you will be logged out.
</notification>