summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llhudicon.cpp7
-rw-r--r--indra/newview/llhudtext.cpp7
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp1
-rw-r--r--indra/newview/llspatialpartition.cpp30
-rw-r--r--indra/newview/llvograss.cpp8
5 files changed, 43 insertions, 10 deletions
diff --git a/indra/newview/llhudicon.cpp b/indra/newview/llhudicon.cpp
index 3c5a4de7f8..63040904df 100644
--- a/indra/newview/llhudicon.cpp
+++ b/indra/newview/llhudicon.cpp
@@ -286,7 +286,6 @@ BOOL LLHUDIcon::lineSegmentIntersect(const LLVector3& start, const LLVector3& en
LLVector4a upper_right;
upper_right.setAdd(lower_right, y_scalea);
- F32 t = 0.f;
LLVector4a enda;
enda.load3(end.mV);
LLVector4a starta;
@@ -294,8 +293,10 @@ BOOL LLHUDIcon::lineSegmentIntersect(const LLVector3& start, const LLVector3& en
LLVector4a dir;
dir.setSub(enda, starta);
- if (LLTriangleRayIntersect(upper_right, upper_left, lower_right, starta, dir, NULL, NULL, &t, FALSE) ||
- LLTriangleRayIntersect(upper_left, lower_left, lower_right, starta, dir, NULL, NULL, &t, FALSE))
+ F32 a,b,t;
+
+ if (LLTriangleRayIntersect(upper_right, upper_left, lower_right, starta, dir, a,b,t) ||
+ LLTriangleRayIntersect(upper_left, lower_left, lower_right, starta, dir, a,b,t))
{
if (intersection)
{
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 9ed5d13831..7f9eddc837 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -207,10 +207,11 @@ BOOL LLHUDText::lineSegmentIntersect(const LLVector3& start, const LLVector3& en
}
LLVector3 dir = end-start;
- F32 t = 0.f;
+ F32 a,b,t;
- if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, NULL, NULL, &t, FALSE) ||
- LLTriangleRayIntersect(v[2], v[3], v[0], start, dir, NULL, NULL, &t, FALSE) )
+
+ if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, a, b, t, FALSE) ||
+ LLTriangleRayIntersect(v[2], v[3], v[0], start, dir, a, b, t, FALSE) )
{
if (t <= 1.f)
{
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index a5804aa04e..98fbebbc5d 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -65,6 +65,7 @@
#include "llweb.h"
#include "llwindow.h"
#include "llfloatertools.h" // to enable hide if build tools are up
+#include "llvector4a.h"
// Functions pulled from pipeline.cpp
glh::matrix4f glh_get_current_modelview();
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 470c332b42..60e704d360 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2769,6 +2769,19 @@ void renderLights(LLDrawable* drawablep)
}
}
+class LLRenderOctree : public LLOctreeTraveler<LLVolumeFace::Triangle>
+{
+public:
+ void visit(const LLOctreeNode<LLVolumeFace::Triangle>* branch)
+ {
+ const LLVector3d& c = branch->getCenter();
+ const LLVector3d& s = branch->getSize();
+
+ LLVector3 pos((F32) c.mdV[0], (F32) c.mdV[1], (F32) c.mdV[2]);
+ LLVector3 size((F32) s.mdV[0], (F32) s.mdV[1], (F32) s.mdV[2]);
+ drawBoxOutline(pos, size);
+ }
+};
void renderRaycast(LLDrawable* drawablep)
{
@@ -2787,6 +2800,23 @@ void renderRaycast(LLDrawable* drawablep)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
pushVerts(drawablep->getFace(gDebugRaycastFaceHit), LLVertexBuffer::MAP_VERTEX);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+
+ LLVOVolume* vobj = drawablep->getVOVolume();
+ LLVolume* volume = vobj->getVolume();
+ if (volume && volume->getNumVolumeFaces() > gDebugRaycastFaceHit)
+ {
+ const LLVolumeFace& face = volume->getVolumeFace(gDebugRaycastFaceHit);
+ if (!face.mOctree)
+ {
+ ((LLVolumeFace*) &face)->createOctree();
+ }
+
+ gGL.pushMatrix();
+ glMultMatrixf((F32*) vobj->getRelativeXform().mMatrix);
+ LLRenderOctree render;
+ render.traverse(face.mOctree);
+ gGL.popMatrix();
+ }
}
else if (drawablep->isAvatar())
{
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index 91c9b762c5..fe1e36cbe8 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -647,23 +647,23 @@ BOOL LLVOGrass::lineSegmentIntersect(const LLVector3& start, const LLVector3& en
U32 idx0 = 0,idx1 = 0,idx2 = 0;
- if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, &a, &b, &t, FALSE))
+ if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, a, b, t, FALSE))
{
hit = TRUE;
idx0 = 0; idx1 = 1; idx2 = 2;
}
- else if (LLTriangleRayIntersect(v[1], v[3], v[2], start, dir, &a, &b, &t, FALSE))
+ else if (LLTriangleRayIntersect(v[1], v[3], v[2], start, dir, a, b, t, FALSE))
{
hit = TRUE;
idx0 = 1; idx1 = 3; idx2 = 2;
}
- else if (LLTriangleRayIntersect(v[2], v[1], v[0], start, dir, &a, &b, &t, FALSE))
+ else if (LLTriangleRayIntersect(v[2], v[1], v[0], start, dir, a, b, t, FALSE))
{
normal1 = -normal1;
hit = TRUE;
idx0 = 2; idx1 = 1; idx2 = 0;
}
- else if (LLTriangleRayIntersect(v[2], v[3], v[1], start, dir, &a, &b, &t, FALSE))
+ else if (LLTriangleRayIntersect(v[2], v[3], v[1], start, dir, a, b, t, FALSE))
{
normal1 = -normal1;
hit = TRUE;