summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llmatrix4a.h6
-rw-r--r--indra/llmath/llvector4a.h7
-rw-r--r--indra/llmath/llvolume.cpp12
3 files changed, 20 insertions, 5 deletions
diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h
index 216334752a..baa3a89176 100644
--- a/indra/llmath/llmatrix4a.h
+++ b/indra/llmath/llmatrix4a.h
@@ -176,4 +176,10 @@ inline void matMul(const LLMatrix4a &a, const LLMatrix4a &b, LLMatrix4a &res)
res.mMatrix[3] = row3;
}
+inline std::ostream& operator<<(std::ostream& s, const LLMatrix4a& m)
+{
+ s << "[" << m.mMatrix[0] << ", " << m.mMatrix[1] << ", " << m.mMatrix[2] << ", " << m.mMatrix[3] << "]";
+ return s;
+}
+
#endif
diff --git a/indra/llmath/llvector4a.h b/indra/llmath/llvector4a.h
index 79d0a44551..222f3cf235 100644
--- a/indra/llmath/llvector4a.h
+++ b/indra/llmath/llvector4a.h
@@ -320,7 +320,7 @@ public:
inline const LLVector4a& operator= ( const LLQuad& rhs );
inline operator LLQuad() const;
-
+
private:
LLQuad mQ;
} LL_ALIGN_POSTFIX(16);
@@ -331,4 +331,9 @@ inline void update_min_max(LLVector4a& min, LLVector4a& max, const LLVector4a& p
max.setMax(max, p);
}
+inline std::ostream& operator<<(std::ostream& s, const LLVector4a& v)
+{
+ s << "(" << v[0] << ", " << v[1] << ", " << v[2] << ", " << v[3] << ")";
+ return s;
+}
#endif
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 648f9a8d93..4613e17605 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -1,5 +1,4 @@
/**
-
* @file llvolume.cpp
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
@@ -2638,6 +2637,7 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
}
//calculate bounding box
+ // VFExtents change
LLVector4a& min = face.mExtents[0];
LLVector4a& max = face.mExtents[1];
@@ -4767,6 +4767,7 @@ LLVolumeFace::~LLVolumeFace()
{
ll_aligned_free_16(mExtents);
mExtents = NULL;
+ mCenter = NULL;
freeData();
}
@@ -5569,7 +5570,7 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
// S32 i;
S32 grid_size = (profile.size()-1)/4;
-
+ // VFExtents change
LLVector4a& min = mExtents[0];
LLVector4a& max = mExtents[1];
@@ -5846,7 +5847,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
LLVector2 cuv;
LLVector2 min_uv, max_uv;
-
+ // VFExtents change
LLVector4a& min = mExtents[0];
LLVector4a& max = mExtents[1];
@@ -6471,14 +6472,17 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat
if (offset == 0 && i == 0)
{ //initialize bounding box
+ // VFExtents change
mExtents[0] = mExtents[1] = dst_pos[i];
}
else
{
//stretch bounding box
+ // VFExtents change
update_min_max(mExtents[0], mExtents[1], dst_pos[i]);
}
}
+ LL_DEBUGS("RiggedBox") << "appendFace got extents " << mExtents[0] << ", " << mExtents[1] << " from dst_pos " << LL_ENDL;
new_count = mNumIndices + face.mNumIndices;
@@ -6641,7 +6645,7 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
{
update_min_max(face_min, face_max, *cur_pos++);
}
-
+ // VFExtents change
mExtents[0] = face_min;
mExtents[1] = face_max;