summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath')
-rw-r--r--[-rwxr-xr-x]indra/llmath/CMakeLists.txt0
-rw-r--r--[-rwxr-xr-x]indra/llmath/camera.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/coordframe.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llbbox.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llbbox.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llbboxlocal.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llbboxlocal.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llcalc.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llcalc.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llcalcparser.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llcalcparser.h6
-rw-r--r--[-rwxr-xr-x]indra/llmath/llcamera.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llcamera.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llcoord.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llcoordframe.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llcoordframe.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llinterp.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llline.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llline.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llmath.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llmatrix3a.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llmatrix3a.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llmatrix3a.inl0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llmatrix4a.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llmodularmath.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llmodularmath.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/lloctree.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llperlin.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llperlin.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llplane.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llquantize.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llquaternion.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llquaternion.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llquaternion2.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llquaternion2.inl0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llrect.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llrect.h6
-rw-r--r--[-rwxr-xr-x]indra/llmath/llsdutil_math.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llsdutil_math.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llsimdmath.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llsimdtypes.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llsimdtypes.inl0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llsphere.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llsphere.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/lltreenode.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llvector4a.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llvector4a.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llvector4a.inl0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llvector4logical.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llvolume.cpp47
-rw-r--r--[-rwxr-xr-x]indra/llmath/llvolume.h6
-rw-r--r--[-rwxr-xr-x]indra/llmath/llvolumemgr.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llvolumemgr.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llvolumeoctree.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/llvolumeoctree.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/m3math.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/m3math.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/m4math.cpp13
-rw-r--r--[-rwxr-xr-x]indra/llmath/m4math.h5
-rw-r--r--[-rwxr-xr-x]indra/llmath/raytrace.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/raytrace.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/alignment_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/llbbox_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/llbboxlocal_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/llmodularmath_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/llquaternion_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/llrect_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/m3math_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/mathmisc_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/v2math_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/v3color_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/v3dmath_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/v3math_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/v4color_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/v4coloru_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/v4math_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/tests/xform_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v2math.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v2math.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v3color.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v3color.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v3dmath.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v3dmath.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v3math.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v3math.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v4color.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v4color.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v4coloru.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v4coloru.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v4math.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/v4math.h0
-rw-r--r--[-rwxr-xr-x]indra/llmath/xform.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llmath/xform.h0
93 files changed, 61 insertions, 22 deletions
diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt
index 0614fd92ef..0614fd92ef 100755..100644
--- a/indra/llmath/CMakeLists.txt
+++ b/indra/llmath/CMakeLists.txt
diff --git a/indra/llmath/camera.h b/indra/llmath/camera.h
index 26f3c3d19f..26f3c3d19f 100755..100644
--- a/indra/llmath/camera.h
+++ b/indra/llmath/camera.h
diff --git a/indra/llmath/coordframe.h b/indra/llmath/coordframe.h
index 271bcb433c..271bcb433c 100755..100644
--- a/indra/llmath/coordframe.h
+++ b/indra/llmath/coordframe.h
diff --git a/indra/llmath/llbbox.cpp b/indra/llmath/llbbox.cpp
index 3e2c05a6e6..3e2c05a6e6 100755..100644
--- a/indra/llmath/llbbox.cpp
+++ b/indra/llmath/llbbox.cpp
diff --git a/indra/llmath/llbbox.h b/indra/llmath/llbbox.h
index 28e69b75e1..28e69b75e1 100755..100644
--- a/indra/llmath/llbbox.h
+++ b/indra/llmath/llbbox.h
diff --git a/indra/llmath/llbboxlocal.cpp b/indra/llmath/llbboxlocal.cpp
index bf0c1a7b93..bf0c1a7b93 100755..100644
--- a/indra/llmath/llbboxlocal.cpp
+++ b/indra/llmath/llbboxlocal.cpp
diff --git a/indra/llmath/llbboxlocal.h b/indra/llmath/llbboxlocal.h
index defb899248..defb899248 100755..100644
--- a/indra/llmath/llbboxlocal.h
+++ b/indra/llmath/llbboxlocal.h
diff --git a/indra/llmath/llcalc.cpp b/indra/llmath/llcalc.cpp
index edc6986cc9..edc6986cc9 100755..100644
--- a/indra/llmath/llcalc.cpp
+++ b/indra/llmath/llcalc.cpp
diff --git a/indra/llmath/llcalc.h b/indra/llmath/llcalc.h
index ceb9dce585..ceb9dce585 100755..100644
--- a/indra/llmath/llcalc.h
+++ b/indra/llmath/llcalc.h
diff --git a/indra/llmath/llcalcparser.cpp b/indra/llmath/llcalcparser.cpp
index b4ca320659..b4ca320659 100755..100644
--- a/indra/llmath/llcalcparser.cpp
+++ b/indra/llmath/llcalcparser.cpp
diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h
index faa699ff7b..e2388d6702 100755..100644
--- a/indra/llmath/llcalcparser.h
+++ b/indra/llmath/llcalcparser.h
@@ -167,9 +167,9 @@ private:
F32 _sin(const F32& a) const { return sin(DEG_TO_RAD * a); }
F32 _cos(const F32& a) const { return cos(DEG_TO_RAD * a); }
F32 _tan(const F32& a) const { return tan(DEG_TO_RAD * a); }
- F32 _asin(const F32& a) const { return asin(a * RAD_TO_DEG); }
- F32 _acos(const F32& a) const { return acos(a * RAD_TO_DEG); }
- F32 _atan(const F32& a) const { return atan(a * RAD_TO_DEG); }
+ F32 _asin(const F32& a) const { return asin(a) * RAD_TO_DEG; }
+ F32 _acos(const F32& a) const { return acos(a) * RAD_TO_DEG; }
+ F32 _atan(const F32& a) const { return atan(a) * RAD_TO_DEG; }
F32 _sqrt(const F32& a) const { return sqrt(a); }
F32 _log(const F32& a) const { return log(a); }
F32 _exp(const F32& a) const { return exp(a); }
diff --git a/indra/llmath/llcamera.cpp b/indra/llmath/llcamera.cpp
index ff90532f75..ff90532f75 100755..100644
--- a/indra/llmath/llcamera.cpp
+++ b/indra/llmath/llcamera.cpp
diff --git a/indra/llmath/llcamera.h b/indra/llmath/llcamera.h
index 321b8ddcc4..321b8ddcc4 100755..100644
--- a/indra/llmath/llcamera.h
+++ b/indra/llmath/llcamera.h
diff --git a/indra/llmath/llcoord.h b/indra/llmath/llcoord.h
index 9b76268afd..9b76268afd 100755..100644
--- a/indra/llmath/llcoord.h
+++ b/indra/llmath/llcoord.h
diff --git a/indra/llmath/llcoordframe.cpp b/indra/llmath/llcoordframe.cpp
index 1bf51ca0eb..1bf51ca0eb 100755..100644
--- a/indra/llmath/llcoordframe.cpp
+++ b/indra/llmath/llcoordframe.cpp
diff --git a/indra/llmath/llcoordframe.h b/indra/llmath/llcoordframe.h
index 909adf260c..909adf260c 100755..100644
--- a/indra/llmath/llcoordframe.h
+++ b/indra/llmath/llcoordframe.h
diff --git a/indra/llmath/llinterp.h b/indra/llmath/llinterp.h
index 5187646179..5187646179 100755..100644
--- a/indra/llmath/llinterp.h
+++ b/indra/llmath/llinterp.h
diff --git a/indra/llmath/llline.cpp b/indra/llmath/llline.cpp
index cfee315b55..cfee315b55 100755..100644
--- a/indra/llmath/llline.cpp
+++ b/indra/llmath/llline.cpp
diff --git a/indra/llmath/llline.h b/indra/llmath/llline.h
index e1cbc1323e..e1cbc1323e 100755..100644
--- a/indra/llmath/llline.h
+++ b/indra/llmath/llline.h
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index 93b9f22b25..93b9f22b25 100755..100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
diff --git a/indra/llmath/llmatrix3a.cpp b/indra/llmath/llmatrix3a.cpp
index ab077abcb0..ab077abcb0 100755..100644
--- a/indra/llmath/llmatrix3a.cpp
+++ b/indra/llmath/llmatrix3a.cpp
diff --git a/indra/llmath/llmatrix3a.h b/indra/llmath/llmatrix3a.h
index 9916cfd2da..9916cfd2da 100755..100644
--- a/indra/llmath/llmatrix3a.h
+++ b/indra/llmath/llmatrix3a.h
diff --git a/indra/llmath/llmatrix3a.inl b/indra/llmath/llmatrix3a.inl
index 37819fea3c..37819fea3c 100755..100644
--- a/indra/llmath/llmatrix3a.inl
+++ b/indra/llmath/llmatrix3a.inl
diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h
index d141298f69..d141298f69 100755..100644
--- a/indra/llmath/llmatrix4a.h
+++ b/indra/llmath/llmatrix4a.h
diff --git a/indra/llmath/llmodularmath.cpp b/indra/llmath/llmodularmath.cpp
index cdc20028bf..cdc20028bf 100755..100644
--- a/indra/llmath/llmodularmath.cpp
+++ b/indra/llmath/llmodularmath.cpp
diff --git a/indra/llmath/llmodularmath.h b/indra/llmath/llmodularmath.h
index 0d4d28fadc..0d4d28fadc 100755..100644
--- a/indra/llmath/llmodularmath.h
+++ b/indra/llmath/llmodularmath.h
diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h
index 280d2653d3..280d2653d3 100755..100644
--- a/indra/llmath/lloctree.h
+++ b/indra/llmath/lloctree.h
diff --git a/indra/llmath/llperlin.cpp b/indra/llmath/llperlin.cpp
index e1da2bf92b..e1da2bf92b 100755..100644
--- a/indra/llmath/llperlin.cpp
+++ b/indra/llmath/llperlin.cpp
diff --git a/indra/llmath/llperlin.h b/indra/llmath/llperlin.h
index 40cf19d1ec..40cf19d1ec 100755..100644
--- a/indra/llmath/llperlin.h
+++ b/indra/llmath/llperlin.h
diff --git a/indra/llmath/llplane.h b/indra/llmath/llplane.h
index 64a3eed0e5..64a3eed0e5 100755..100644
--- a/indra/llmath/llplane.h
+++ b/indra/llmath/llplane.h
diff --git a/indra/llmath/llquantize.h b/indra/llmath/llquantize.h
index 10c950abbb..10c950abbb 100755..100644
--- a/indra/llmath/llquantize.h
+++ b/indra/llmath/llquantize.h
diff --git a/indra/llmath/llquaternion.cpp b/indra/llmath/llquaternion.cpp
index 47374c287f..47374c287f 100755..100644
--- a/indra/llmath/llquaternion.cpp
+++ b/indra/llmath/llquaternion.cpp
diff --git a/indra/llmath/llquaternion.h b/indra/llmath/llquaternion.h
index aa0b1752f4..aa0b1752f4 100755..100644
--- a/indra/llmath/llquaternion.h
+++ b/indra/llmath/llquaternion.h
diff --git a/indra/llmath/llquaternion2.h b/indra/llmath/llquaternion2.h
index fd9c0cf3ab..fd9c0cf3ab 100755..100644
--- a/indra/llmath/llquaternion2.h
+++ b/indra/llmath/llquaternion2.h
diff --git a/indra/llmath/llquaternion2.inl b/indra/llmath/llquaternion2.inl
index 2a6987552d..2a6987552d 100755..100644
--- a/indra/llmath/llquaternion2.inl
+++ b/indra/llmath/llquaternion2.inl
diff --git a/indra/llmath/llrect.cpp b/indra/llmath/llrect.cpp
index 4083c99768..4083c99768 100755..100644
--- a/indra/llmath/llrect.cpp
+++ b/indra/llmath/llrect.cpp
diff --git a/indra/llmath/llrect.h b/indra/llmath/llrect.h
index c51e0e0ae6..58f02d4d2b 100755..100644
--- a/indra/llmath/llrect.h
+++ b/indra/llmath/llrect.h
@@ -118,8 +118,10 @@ public:
if (end_y < mBottom) clip_y = end_y - mBottom;
// clip_? and delta_? should have same sign, since starting point is in rect
// so ratios will be positive
- F32 ratio_x = ((F32)clip_x / (F32)delta_x);
- F32 ratio_y = ((F32)clip_y / (F32)delta_y);
+ F32 ratio_x = 0;
+ F32 ratio_y = 0;
+ if (delta_x != 0) ratio_x = ((F32)clip_x / (F32)delta_x);
+ if (delta_y != 0) ratio_y = ((F32)clip_y / (F32)delta_y);
if (ratio_x > ratio_y)
{
// clip along x direction
diff --git a/indra/llmath/llsdutil_math.cpp b/indra/llmath/llsdutil_math.cpp
index 591f7fde36..591f7fde36 100755..100644
--- a/indra/llmath/llsdutil_math.cpp
+++ b/indra/llmath/llsdutil_math.cpp
diff --git a/indra/llmath/llsdutil_math.h b/indra/llmath/llsdutil_math.h
index 0ea78cd231..0ea78cd231 100755..100644
--- a/indra/llmath/llsdutil_math.h
+++ b/indra/llmath/llsdutil_math.h
diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h
index cebd2ace7d..cebd2ace7d 100755..100644
--- a/indra/llmath/llsimdmath.h
+++ b/indra/llmath/llsimdmath.h
diff --git a/indra/llmath/llsimdtypes.h b/indra/llmath/llsimdtypes.h
index bd991d0e71..bd991d0e71 100755..100644
--- a/indra/llmath/llsimdtypes.h
+++ b/indra/llmath/llsimdtypes.h
diff --git a/indra/llmath/llsimdtypes.inl b/indra/llmath/llsimdtypes.inl
index e905c84954..e905c84954 100755..100644
--- a/indra/llmath/llsimdtypes.inl
+++ b/indra/llmath/llsimdtypes.inl
diff --git a/indra/llmath/llsphere.cpp b/indra/llmath/llsphere.cpp
index a8d6200488..a8d6200488 100755..100644
--- a/indra/llmath/llsphere.cpp
+++ b/indra/llmath/llsphere.cpp
diff --git a/indra/llmath/llsphere.h b/indra/llmath/llsphere.h
index 7c60a11406..7c60a11406 100755..100644
--- a/indra/llmath/llsphere.h
+++ b/indra/llmath/llsphere.h
diff --git a/indra/llmath/lltreenode.h b/indra/llmath/lltreenode.h
index 0b479c4564..0b479c4564 100755..100644
--- a/indra/llmath/lltreenode.h
+++ b/indra/llmath/lltreenode.h
diff --git a/indra/llmath/llvector4a.cpp b/indra/llmath/llvector4a.cpp
index 570fa41a43..570fa41a43 100755..100644
--- a/indra/llmath/llvector4a.cpp
+++ b/indra/llmath/llvector4a.cpp
diff --git a/indra/llmath/llvector4a.h b/indra/llmath/llvector4a.h
index 79d0a44551..79d0a44551 100755..100644
--- a/indra/llmath/llvector4a.h
+++ b/indra/llmath/llvector4a.h
diff --git a/indra/llmath/llvector4a.inl b/indra/llmath/llvector4a.inl
index 69d3d01efe..69d3d01efe 100755..100644
--- a/indra/llmath/llvector4a.inl
+++ b/indra/llmath/llvector4a.inl
diff --git a/indra/llmath/llvector4logical.h b/indra/llmath/llvector4logical.h
index c5698f7cea..c5698f7cea 100755..100644
--- a/indra/llmath/llvector4logical.h
+++ b/indra/llmath/llvector4logical.h
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 41ee3941ac..d932eb53a0 100755..100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2202,7 +2202,7 @@ BOOL LLVolume::generate()
{
rot_mat.rotate(*profile++, tmp);
dst->setAdd(tmp,offset);
- llassert(dst->isFinite3());
+ llassert(dst->isFinite3()); // MAINT-5660; don't know why this happens, does not affect Release builds
++dst;
}
}
@@ -2536,6 +2536,8 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
U32 cur_influence = 0;
LLVector4 wght(0,0,0,0);
+ U32 joints[4] = {0,0,0,0};
+ LLVector4 joints_with_weights(0,0,0,0);
while (joint != END_INFLUENCES && idx < weights.size())
{
@@ -2543,7 +2545,9 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
influence |= ((U16) weights[idx++] << 8);
F32 w = llclamp((F32) influence / 65535.f, 0.f, 0.99999f);
- wght.mV[cur_influence++] = (F32) joint + w;
+ wght.mV[cur_influence] = w;
+ joints[cur_influence] = joint;
+ cur_influence++;
if (cur_influence >= 4)
{
@@ -2554,8 +2558,16 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
joint = weights[idx++];
}
}
-
- face.mWeights[cur_vertex].loadua(wght.mV);
+ F32 wsum = wght.mV[VX] + wght.mV[VY] + wght.mV[VZ] + wght.mV[VW];
+ if (wsum <= 0.f)
+ {
+ wght = LLVector4(0.99999f,0.f,0.f,0.f);
+ }
+ for (U32 k=0; k<4; k++)
+ {
+ joints_with_weights[k] = (F32) joints[k] + wght[k];
+ }
+ face.mWeights[cur_vertex].loadua(joints_with_weights.mV);
cur_vertex++;
}
@@ -5651,7 +5663,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
tc->mV[0] = (*p)[0]+0.5f;
tc->mV[1] = (*p)[1]+0.5f;
- llassert(src->isFinite3());
+ llassert(src->isFinite3()); // MAINT-5660; don't know why this happens, does not affect Release builds
update_min_max(min,max,*src);
update_min_max(min_uv, max_uv, *tc);
@@ -6072,7 +6084,7 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con
if (new_verts > mNumAllocatedVertices)
{
- //double buffer size on expansion
+ // double buffer size on expansion
new_verts *= 2;
S32 new_tc_size = ((new_verts*8)+0xF) & ~0xF;
@@ -6088,18 +6100,21 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con
mNormals = mPositions+new_verts;
mTexCoords = (LLVector2*) (mNormals+new_verts);
- //positions
- LLVector4a::memcpyNonAliased16((F32*) mPositions, (F32*) old_buf, old_vsize);
-
- //normals
- LLVector4a::memcpyNonAliased16((F32*) mNormals, (F32*) (old_buf+mNumVertices), old_vsize);
+ if (old_buf != NULL)
+ {
+ // copy old positions into new buffer
+ LLVector4a::memcpyNonAliased16((F32*)mPositions, (F32*)old_buf, old_vsize);
- //tex coords
- LLVector4a::memcpyNonAliased16((F32*) mTexCoords, (F32*) (old_buf+mNumVertices*2), old_tc_size);
+ // normals
+ LLVector4a::memcpyNonAliased16((F32*)mNormals, (F32*)(old_buf + mNumVertices), old_vsize);
- //just clear tangents
- ll_aligned_free_16(mTangents);
- mTangents = NULL;
+ // tex coords
+ LLVector4a::memcpyNonAliased16((F32*)mTexCoords, (F32*)(old_buf + mNumVertices * 2), old_tc_size);
+ }
+
+ // just clear tangents
+ ll_aligned_free_16(mTangents);
+ mTangents = NULL;
ll_aligned_free<64>(old_buf);
mNumAllocatedVertices = new_verts;
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index e1161682b5..1da2d0c6b1 100755..100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -972,6 +972,7 @@ protected:
~LLVolume(); // use unref
public:
+ typedef std::vector<LLVolumeFace> face_list_t;
struct FaceParams
{
@@ -1045,6 +1046,10 @@ public:
// conversion if *(LLVolume*) to LLVolume&
const LLVolumeFace &getVolumeFace(const S32 f) const {return mVolumeFaces[f];} // DO NOT DELETE VOLUME WHILE USING THIS REFERENCE, OR HOLD A POINTER TO THIS VOLUMEFACE
+ LLVolumeFace &getVolumeFace(const S32 f) {return mVolumeFaces[f];} // DO NOT DELETE VOLUME WHILE USING THIS REFERENCE, OR HOLD A POINTER TO THIS VOLUMEFACE
+
+ face_list_t& getVolumeFaces() { return mVolumeFaces; }
+
U32 mFaceMask; // bit array of which faces exist in this volume
LLVector3 mLODScaleBias; // vector for biasing LOD based on scale
@@ -1084,7 +1089,6 @@ public:
BOOL mGenerateSingleFace;
- typedef std::vector<LLVolumeFace> face_list_t;
face_list_t mVolumeFaces;
public:
diff --git a/indra/llmath/llvolumemgr.cpp b/indra/llmath/llvolumemgr.cpp
index 3b8f08e0c6..3b8f08e0c6 100755..100644
--- a/indra/llmath/llvolumemgr.cpp
+++ b/indra/llmath/llvolumemgr.cpp
diff --git a/indra/llmath/llvolumemgr.h b/indra/llmath/llvolumemgr.h
index c75906f675..c75906f675 100755..100644
--- a/indra/llmath/llvolumemgr.h
+++ b/indra/llmath/llvolumemgr.h
diff --git a/indra/llmath/llvolumeoctree.cpp b/indra/llmath/llvolumeoctree.cpp
index fb232d5f6c..fb232d5f6c 100755..100644
--- a/indra/llmath/llvolumeoctree.cpp
+++ b/indra/llmath/llvolumeoctree.cpp
diff --git a/indra/llmath/llvolumeoctree.h b/indra/llmath/llvolumeoctree.h
index 13150028d8..13150028d8 100755..100644
--- a/indra/llmath/llvolumeoctree.h
+++ b/indra/llmath/llvolumeoctree.h
diff --git a/indra/llmath/m3math.cpp b/indra/llmath/m3math.cpp
index 802ddb9e57..802ddb9e57 100755..100644
--- a/indra/llmath/m3math.cpp
+++ b/indra/llmath/m3math.cpp
diff --git a/indra/llmath/m3math.h b/indra/llmath/m3math.h
index 2be5452f8d..2be5452f8d 100755..100644
--- a/indra/llmath/m3math.h
+++ b/indra/llmath/m3math.h
diff --git a/indra/llmath/m4math.cpp b/indra/llmath/m4math.cpp
index 6a1b4143cf..d89c482804 100755..100644
--- a/indra/llmath/m4math.cpp
+++ b/indra/llmath/m4math.cpp
@@ -274,6 +274,19 @@ const LLMatrix4& LLMatrix4::invert(void)
return *this;
}
+// Convenience func for simplifying comparison-heavy code by
+// intentionally stomping values in [-FLT_EPS,FLT_EPS] to 0.0f
+//
+void LLMatrix4::condition(void)
+{
+ U32 i;
+ U32 j;
+ for (i = 0; i < 3;i++)
+ for (j = 0; j < 3;j++)
+ mMatrix[i][j] = ((mMatrix[i][j] > -FLT_EPSILON)
+ && (mMatrix[i][j] < FLT_EPSILON)) ? 0.0f : mMatrix[i][j];
+}
+
LLVector4 LLMatrix4::getFwdRow4() const
{
return LLVector4(mMatrix[VX][VX], mMatrix[VX][VY], mMatrix[VX][VZ], mMatrix[VX][VW]);
diff --git a/indra/llmath/m4math.h b/indra/llmath/m4math.h
index a7dce10397..a77c5bc76d 100755..100644
--- a/indra/llmath/m4math.h
+++ b/indra/llmath/m4math.h
@@ -180,6 +180,11 @@ public:
const LLMatrix4& setTranslation(const LLVector4 &translation);
const LLMatrix4& setTranslation(const LLVector3 &translation);
+ // Convenience func for simplifying comparison-heavy code by
+ // intentionally stomping values [-FLT_EPS,FLT_EPS] to 0.0
+ //
+ void condition(void);
+
///////////////////////////
//
// Get properties of a matrix
diff --git a/indra/llmath/raytrace.cpp b/indra/llmath/raytrace.cpp
index f38fe49bcb..f38fe49bcb 100755..100644
--- a/indra/llmath/raytrace.cpp
+++ b/indra/llmath/raytrace.cpp
diff --git a/indra/llmath/raytrace.h b/indra/llmath/raytrace.h
index 2d32af0c86..2d32af0c86 100755..100644
--- a/indra/llmath/raytrace.h
+++ b/indra/llmath/raytrace.h
diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp
index 5ee3c45502..5ee3c45502 100755..100644
--- a/indra/llmath/tests/alignment_test.cpp
+++ b/indra/llmath/tests/alignment_test.cpp
diff --git a/indra/llmath/tests/llbbox_test.cpp b/indra/llmath/tests/llbbox_test.cpp
index fd0dbb58fc..fd0dbb58fc 100755..100644
--- a/indra/llmath/tests/llbbox_test.cpp
+++ b/indra/llmath/tests/llbbox_test.cpp
diff --git a/indra/llmath/tests/llbboxlocal_test.cpp b/indra/llmath/tests/llbboxlocal_test.cpp
index f31e4126c4..f31e4126c4 100755..100644
--- a/indra/llmath/tests/llbboxlocal_test.cpp
+++ b/indra/llmath/tests/llbboxlocal_test.cpp
diff --git a/indra/llmath/tests/llmodularmath_test.cpp b/indra/llmath/tests/llmodularmath_test.cpp
index 063d3ef79f..063d3ef79f 100755..100644
--- a/indra/llmath/tests/llmodularmath_test.cpp
+++ b/indra/llmath/tests/llmodularmath_test.cpp
diff --git a/indra/llmath/tests/llquaternion_test.cpp b/indra/llmath/tests/llquaternion_test.cpp
index 3490829743..3490829743 100755..100644
--- a/indra/llmath/tests/llquaternion_test.cpp
+++ b/indra/llmath/tests/llquaternion_test.cpp
diff --git a/indra/llmath/tests/llrect_test.cpp b/indra/llmath/tests/llrect_test.cpp
index d740173e69..d740173e69 100755..100644
--- a/indra/llmath/tests/llrect_test.cpp
+++ b/indra/llmath/tests/llrect_test.cpp
diff --git a/indra/llmath/tests/m3math_test.cpp b/indra/llmath/tests/m3math_test.cpp
index 1ca2b005d9..1ca2b005d9 100755..100644
--- a/indra/llmath/tests/m3math_test.cpp
+++ b/indra/llmath/tests/m3math_test.cpp
diff --git a/indra/llmath/tests/mathmisc_test.cpp b/indra/llmath/tests/mathmisc_test.cpp
index f12140cf8f..f12140cf8f 100755..100644
--- a/indra/llmath/tests/mathmisc_test.cpp
+++ b/indra/llmath/tests/mathmisc_test.cpp
diff --git a/indra/llmath/tests/v2math_test.cpp b/indra/llmath/tests/v2math_test.cpp
index 4d6a2eca93..4d6a2eca93 100755..100644
--- a/indra/llmath/tests/v2math_test.cpp
+++ b/indra/llmath/tests/v2math_test.cpp
diff --git a/indra/llmath/tests/v3color_test.cpp b/indra/llmath/tests/v3color_test.cpp
index 29d1c483ab..29d1c483ab 100755..100644
--- a/indra/llmath/tests/v3color_test.cpp
+++ b/indra/llmath/tests/v3color_test.cpp
diff --git a/indra/llmath/tests/v3dmath_test.cpp b/indra/llmath/tests/v3dmath_test.cpp
index 20b26faa12..20b26faa12 100755..100644
--- a/indra/llmath/tests/v3dmath_test.cpp
+++ b/indra/llmath/tests/v3dmath_test.cpp
diff --git a/indra/llmath/tests/v3math_test.cpp b/indra/llmath/tests/v3math_test.cpp
index e4ae1c10ef..e4ae1c10ef 100755..100644
--- a/indra/llmath/tests/v3math_test.cpp
+++ b/indra/llmath/tests/v3math_test.cpp
diff --git a/indra/llmath/tests/v4color_test.cpp b/indra/llmath/tests/v4color_test.cpp
index d7eec3c87f..d7eec3c87f 100755..100644
--- a/indra/llmath/tests/v4color_test.cpp
+++ b/indra/llmath/tests/v4color_test.cpp
diff --git a/indra/llmath/tests/v4coloru_test.cpp b/indra/llmath/tests/v4coloru_test.cpp
index 12e607a820..12e607a820 100755..100644
--- a/indra/llmath/tests/v4coloru_test.cpp
+++ b/indra/llmath/tests/v4coloru_test.cpp
diff --git a/indra/llmath/tests/v4math_test.cpp b/indra/llmath/tests/v4math_test.cpp
index 191ac864df..191ac864df 100755..100644
--- a/indra/llmath/tests/v4math_test.cpp
+++ b/indra/llmath/tests/v4math_test.cpp
diff --git a/indra/llmath/tests/xform_test.cpp b/indra/llmath/tests/xform_test.cpp
index 49870eef3c..49870eef3c 100755..100644
--- a/indra/llmath/tests/xform_test.cpp
+++ b/indra/llmath/tests/xform_test.cpp
diff --git a/indra/llmath/v2math.cpp b/indra/llmath/v2math.cpp
index a0cd642853..a0cd642853 100755..100644
--- a/indra/llmath/v2math.cpp
+++ b/indra/llmath/v2math.cpp
diff --git a/indra/llmath/v2math.h b/indra/llmath/v2math.h
index 8d5db96f5e..8d5db96f5e 100755..100644
--- a/indra/llmath/v2math.h
+++ b/indra/llmath/v2math.h
diff --git a/indra/llmath/v3color.cpp b/indra/llmath/v3color.cpp
index d38f48b11e..d38f48b11e 100755..100644
--- a/indra/llmath/v3color.cpp
+++ b/indra/llmath/v3color.cpp
diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h
index daf3a6857b..daf3a6857b 100755..100644
--- a/indra/llmath/v3color.h
+++ b/indra/llmath/v3color.h
diff --git a/indra/llmath/v3dmath.cpp b/indra/llmath/v3dmath.cpp
index a50cb3c6ca..a50cb3c6ca 100755..100644
--- a/indra/llmath/v3dmath.cpp
+++ b/indra/llmath/v3dmath.cpp
diff --git a/indra/llmath/v3dmath.h b/indra/llmath/v3dmath.h
index 4938273d5b..4938273d5b 100755..100644
--- a/indra/llmath/v3dmath.h
+++ b/indra/llmath/v3dmath.h
diff --git a/indra/llmath/v3math.cpp b/indra/llmath/v3math.cpp
index e7107dee16..e7107dee16 100755..100644
--- a/indra/llmath/v3math.cpp
+++ b/indra/llmath/v3math.cpp
diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h
index f3fbce4843..f3fbce4843 100755..100644
--- a/indra/llmath/v3math.h
+++ b/indra/llmath/v3math.h
diff --git a/indra/llmath/v4color.cpp b/indra/llmath/v4color.cpp
index 79a64b24f2..79a64b24f2 100755..100644
--- a/indra/llmath/v4color.cpp
+++ b/indra/llmath/v4color.cpp
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index 0d632f59be..0d632f59be 100755..100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
diff --git a/indra/llmath/v4coloru.cpp b/indra/llmath/v4coloru.cpp
index f1a2518cf3..f1a2518cf3 100755..100644
--- a/indra/llmath/v4coloru.cpp
+++ b/indra/llmath/v4coloru.cpp
diff --git a/indra/llmath/v4coloru.h b/indra/llmath/v4coloru.h
index fddad34978..fddad34978 100755..100644
--- a/indra/llmath/v4coloru.h
+++ b/indra/llmath/v4coloru.h
diff --git a/indra/llmath/v4math.cpp b/indra/llmath/v4math.cpp
index 2782cf2966..2782cf2966 100755..100644
--- a/indra/llmath/v4math.cpp
+++ b/indra/llmath/v4math.cpp
diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h
index 623c8b2003..623c8b2003 100755..100644
--- a/indra/llmath/v4math.h
+++ b/indra/llmath/v4math.h
diff --git a/indra/llmath/xform.cpp b/indra/llmath/xform.cpp
index 5d8b93d5e8..5d8b93d5e8 100755..100644
--- a/indra/llmath/xform.cpp
+++ b/indra/llmath/xform.cpp
diff --git a/indra/llmath/xform.h b/indra/llmath/xform.h
index 54b0f6d9ec..54b0f6d9ec 100755..100644
--- a/indra/llmath/xform.h
+++ b/indra/llmath/xform.h