aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmath
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llmath')
-rw-r--r--linden/indra/llmath/camera.h1
-rw-r--r--linden/indra/llmath/coordframe.h1
-rw-r--r--linden/indra/llmath/llbboxlocal.cpp1
-rw-r--r--linden/indra/llmath/llbboxlocal.h1
-rw-r--r--linden/indra/llmath/llcamera.cpp1
-rw-r--r--linden/indra/llmath/llcamera.h1
-rw-r--r--linden/indra/llmath/llcoord.h1
-rw-r--r--linden/indra/llmath/llcoordframe.cpp1
-rw-r--r--linden/indra/llmath/llcoordframe.h1
-rw-r--r--linden/indra/llmath/llcrc.cpp1
-rw-r--r--linden/indra/llmath/llcrc.h1
-rw-r--r--linden/indra/llmath/llinterp.h1
-rw-r--r--linden/indra/llmath/llmath.h1
-rw-r--r--linden/indra/llmath/llmath.vcproj6
-rw-r--r--linden/indra/llmath/llmd5.cpp3
-rw-r--r--linden/indra/llmath/llmd5.h1
-rw-r--r--linden/indra/llmath/lloctree.h1
-rw-r--r--linden/indra/llmath/llperlin.cpp1
-rw-r--r--linden/indra/llmath/llperlin.h1
-rw-r--r--linden/indra/llmath/llplane.h1
-rw-r--r--linden/indra/llmath/llquantize.h1
-rw-r--r--linden/indra/llmath/llquaternion.cpp1
-rw-r--r--linden/indra/llmath/llquaternion.h1
-rw-r--r--linden/indra/llmath/llrand.cpp1
-rw-r--r--linden/indra/llmath/llrand.h1
-rw-r--r--linden/indra/llmath/llrect.cpp1
-rw-r--r--linden/indra/llmath/llrect.h1
-rw-r--r--linden/indra/llmath/lltreenode.h1
-rw-r--r--linden/indra/llmath/lluuid.cpp6
-rw-r--r--linden/indra/llmath/lluuid.h2
-rw-r--r--linden/indra/llmath/llvolume.cpp5
-rw-r--r--linden/indra/llmath/llvolume.h29
-rw-r--r--linden/indra/llmath/llvolumemgr.cpp3
-rw-r--r--linden/indra/llmath/llvolumemgr.h1
-rw-r--r--linden/indra/llmath/m3math.cpp1
-rw-r--r--linden/indra/llmath/m3math.h1
-rw-r--r--linden/indra/llmath/m4math.cpp67
-rw-r--r--linden/indra/llmath/m4math.h22
-rw-r--r--linden/indra/llmath/raytrace.cpp1
-rw-r--r--linden/indra/llmath/raytrace.h1
-rw-r--r--linden/indra/llmath/v2math.cpp1
-rw-r--r--linden/indra/llmath/v2math.h1
-rw-r--r--linden/indra/llmath/v3color.cpp50
-rw-r--r--linden/indra/llmath/v3color.h3
-rw-r--r--linden/indra/llmath/v3dmath.cpp1
-rw-r--r--linden/indra/llmath/v3dmath.h1
-rw-r--r--linden/indra/llmath/v3math.cpp1
-rw-r--r--linden/indra/llmath/v3math.h1
-rw-r--r--linden/indra/llmath/v4color.cpp50
-rw-r--r--linden/indra/llmath/v4color.h3
-rw-r--r--linden/indra/llmath/v4coloru.cpp1
-rw-r--r--linden/indra/llmath/v4coloru.h1
-rw-r--r--linden/indra/llmath/v4math.cpp1
-rw-r--r--linden/indra/llmath/v4math.h12
-rw-r--r--linden/indra/llmath/xform.cpp1
-rw-r--r--linden/indra/llmath/xform.h1
56 files changed, 239 insertions, 64 deletions
diff --git a/linden/indra/llmath/camera.h b/linden/indra/llmath/camera.h
index e9963e9..3aa86d5 100644
--- a/linden/indra/llmath/camera.h
+++ b/linden/indra/llmath/camera.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007 Linden Research, Inc. 5 * Copyright (c) 2000-2007 Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/coordframe.h b/linden/indra/llmath/coordframe.h
index 81d630e..611387d 100644
--- a/linden/indra/llmath/coordframe.h
+++ b/linden/indra/llmath/coordframe.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007 Linden Research, Inc. 5 * Copyright (c) 2000-2007 Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llbboxlocal.cpp b/linden/indra/llmath/llbboxlocal.cpp
index b197241..505c7e6 100644
--- a/linden/indra/llmath/llbboxlocal.cpp
+++ b/linden/indra/llmath/llbboxlocal.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llbboxlocal.h b/linden/indra/llmath/llbboxlocal.h
index cb71a4f..4fdc01f 100644
--- a/linden/indra/llmath/llbboxlocal.h
+++ b/linden/indra/llmath/llbboxlocal.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llcamera.cpp b/linden/indra/llmath/llcamera.cpp
index bc13c90..2197066 100644
--- a/linden/indra/llmath/llcamera.cpp
+++ b/linden/indra/llmath/llcamera.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llcamera.h b/linden/indra/llmath/llcamera.h
index 82b6130..b5f78f4 100644
--- a/linden/indra/llmath/llcamera.h
+++ b/linden/indra/llmath/llcamera.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llcoord.h b/linden/indra/llmath/llcoord.h
index 6aa6b64..a1ed130 100644
--- a/linden/indra/llmath/llcoord.h
+++ b/linden/indra/llmath/llcoord.h
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2001-2007, Linden Research, Inc. 4 * Copyright (c) 2001-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llcoordframe.cpp b/linden/indra/llmath/llcoordframe.cpp
index c7d18bb..1650dd2 100644
--- a/linden/indra/llmath/llcoordframe.cpp
+++ b/linden/indra/llmath/llcoordframe.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llcoordframe.h b/linden/indra/llmath/llcoordframe.h
index d15f3e5..2777cbe 100644
--- a/linden/indra/llmath/llcoordframe.h
+++ b/linden/indra/llmath/llcoordframe.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llcrc.cpp b/linden/indra/llmath/llcrc.cpp
index 1c0aa5d..cc0f955 100644
--- a/linden/indra/llmath/llcrc.cpp
+++ b/linden/indra/llmath/llcrc.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llcrc.h b/linden/indra/llmath/llcrc.h
index 7c267d6..06ddac2 100644
--- a/linden/indra/llmath/llcrc.h
+++ b/linden/indra/llmath/llcrc.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llinterp.h b/linden/indra/llmath/llinterp.h
index 3cc0b18..724fb31 100644
--- a/linden/indra/llmath/llinterp.h
+++ b/linden/indra/llmath/llinterp.h
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2001-2007, Linden Research, Inc. 4 * Copyright (c) 2001-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llmath.h b/linden/indra/llmath/llmath.h
index 7009557..dbd825d 100644
--- a/linden/indra/llmath/llmath.h
+++ b/linden/indra/llmath/llmath.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llmath.vcproj b/linden/indra/llmath/llmath.vcproj
index 82feb25..4876065 100644
--- a/linden/indra/llmath/llmath.vcproj
+++ b/linden/indra/llmath/llmath.vcproj
@@ -224,9 +224,6 @@
224 Filter="h;hpp;hxx;hm;inl;inc;xsd" 224 Filter="h;hpp;hxx;hm;inl;inc;xsd"
225 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 225 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
226 <File 226 <File
227 RelativePath=".\linden_math.h">
228 </File>
229 <File
230 RelativePath=".\llbboxlocal.h"> 227 RelativePath=".\llbboxlocal.h">
231 </File> 228 </File>
232 <File 229 <File
@@ -245,6 +242,9 @@
245 RelativePath=".\llinterp.h"> 242 RelativePath=".\llinterp.h">
246 </File> 243 </File>
247 <File 244 <File
245 RelativePath=".\llmath.h">
246 </File>
247 <File
248 RelativePath=".\llmd5.h"> 248 RelativePath=".\llmd5.h">
249 </File> 249 </File>
250 <File 250 <File
diff --git a/linden/indra/llmath/llmd5.cpp b/linden/indra/llmath/llmd5.cpp
index 267381c..aad4617 100644
--- a/linden/indra/llmath/llmd5.cpp
+++ b/linden/indra/llmath/llmd5.cpp
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2001-2007, Linden Research, Inc. 4 * Copyright (c) 2001-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -258,7 +259,7 @@ LLMD5::LLMD5(const unsigned char *string, const unsigned int number)
258 init(); 259 init();
259 update(string, (U32)strlen((const char *) string)); /* Flawfinder: ignore */ 260 update(string, (U32)strlen((const char *) string)); /* Flawfinder: ignore */
260 update((const unsigned char *) colon, (U32)strlen(colon)); /* Flawfinder: ignore */ 261 update((const unsigned char *) colon, (U32)strlen(colon)); /* Flawfinder: ignore */
261 snprintf(tbuf, sizeof(tbuf), "%i", number); /* Flawfinder: ignore */ 262 snprintf(tbuf, sizeof(tbuf), "%i", number); /* Flawfinder: ignore */
262 update((const unsigned char *) tbuf, (U32)strlen(tbuf)); /* Flawfinder: ignore */ 263 update((const unsigned char *) tbuf, (U32)strlen(tbuf)); /* Flawfinder: ignore */
263 finalize(); 264 finalize();
264} 265}
diff --git a/linden/indra/llmath/llmd5.h b/linden/indra/llmath/llmd5.h
index 7b185b6..20c32ed 100644
--- a/linden/indra/llmath/llmd5.h
+++ b/linden/indra/llmath/llmd5.h
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2001-2007, Linden Research, Inc. 4 * Copyright (c) 2001-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/lloctree.h b/linden/indra/llmath/lloctree.h
index 22f298c..81b9d8c 100644
--- a/linden/indra/llmath/lloctree.h
+++ b/linden/indra/llmath/lloctree.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2005-2007, Linden Research, Inc. 5 * Copyright (c) 2005-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llperlin.cpp b/linden/indra/llmath/llperlin.cpp
index 553b6a1..38b4d0d 100644
--- a/linden/indra/llmath/llperlin.cpp
+++ b/linden/indra/llmath/llperlin.cpp
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2001-2007, Linden Research, Inc. 4 * Copyright (c) 2001-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llperlin.h b/linden/indra/llmath/llperlin.h
index dcd6506..e5fc4b0 100644
--- a/linden/indra/llmath/llperlin.h
+++ b/linden/indra/llmath/llperlin.h
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2001-2007, Linden Research, Inc. 4 * Copyright (c) 2001-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llplane.h b/linden/indra/llmath/llplane.h
index 44721f3..0e0e17d 100644
--- a/linden/indra/llmath/llplane.h
+++ b/linden/indra/llmath/llplane.h
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2001-2007, Linden Research, Inc. 4 * Copyright (c) 2001-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llquantize.h b/linden/indra/llmath/llquantize.h
index 6045911..a4fd67a 100644
--- a/linden/indra/llmath/llquantize.h
+++ b/linden/indra/llmath/llquantize.h
@@ -5,6 +5,7 @@
5 * 5 *
6 * Copyright (c) 2001-2007, Linden Research, Inc. 6 * Copyright (c) 2001-2007, Linden Research, Inc.
7 * 7 *
8 * Second Life Viewer Source Code
8 * The source code in this file ("Source Code") is provided by Linden Lab 9 * The source code in this file ("Source Code") is provided by Linden Lab
9 * to you under the terms of the GNU General Public License, version 2.0 10 * to you under the terms of the GNU General Public License, version 2.0
10 * ("GPL"), unless you have obtained a separate licensing agreement 11 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llquaternion.cpp b/linden/indra/llmath/llquaternion.cpp
index 1111ca5..abc9e42 100644
--- a/linden/indra/llmath/llquaternion.cpp
+++ b/linden/indra/llmath/llquaternion.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llquaternion.h b/linden/indra/llmath/llquaternion.h
index 1e3f2b6..66a8b40 100644
--- a/linden/indra/llmath/llquaternion.h
+++ b/linden/indra/llmath/llquaternion.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llrand.cpp b/linden/indra/llmath/llrand.cpp
index ae52010..f62bd71 100644
--- a/linden/indra/llmath/llrand.cpp
+++ b/linden/indra/llmath/llrand.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llrand.h b/linden/indra/llmath/llrand.h
index 1bf055e..4a3dca6 100644
--- a/linden/indra/llmath/llrand.h
+++ b/linden/indra/llmath/llrand.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llrect.cpp b/linden/indra/llmath/llrect.cpp
index 390573e..d9efe45 100644
--- a/linden/indra/llmath/llrect.cpp
+++ b/linden/indra/llmath/llrect.cpp
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2001-2007, Linden Research, Inc. 4 * Copyright (c) 2001-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/llrect.h b/linden/indra/llmath/llrect.h
index fd45d3c..a17ab39 100644
--- a/linden/indra/llmath/llrect.h
+++ b/linden/indra/llmath/llrect.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/lltreenode.h b/linden/indra/llmath/lltreenode.h
index ba3c867..a42a156 100644
--- a/linden/indra/llmath/lltreenode.h
+++ b/linden/indra/llmath/lltreenode.h
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2005-2007, Linden Research, Inc. 4 * Copyright (c) 2005-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/lluuid.cpp b/linden/indra/llmath/lluuid.cpp
index b943fd9..78dc8e6 100644
--- a/linden/indra/llmath/lluuid.cpp
+++ b/linden/indra/llmath/lluuid.cpp
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2000-2007, Linden Research, Inc. 4 * Copyright (c) 2000-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -174,6 +175,11 @@ void LLUUID::toCompressedString(char *out) const
174 out[UUID_BYTES] = '\0'; 175 out[UUID_BYTES] = '\0';
175} 176}
176 177
178std::string LLUUID::getString() const
179{
180 return asString();
181}
182
177std::string LLUUID::asString() const 183std::string LLUUID::asString() const
178{ 184{
179 char str[UUID_STR_SIZE]; /* Flawfinder: ignore */ 185 char str[UUID_STR_SIZE]; /* Flawfinder: ignore */
diff --git a/linden/indra/llmath/lluuid.h b/linden/indra/llmath/lluuid.h
index aeda734..99cd585 100644
--- a/linden/indra/llmath/lluuid.h
+++ b/linden/indra/llmath/lluuid.h
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2000-2007, Linden Research, Inc. 4 * Copyright (c) 2000-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -104,6 +105,7 @@ public:
104 void toCompressedString(char *out) const; // Does not allocate memory, needs 17 characters (including \0) 105 void toCompressedString(char *out) const; // Does not allocate memory, needs 17 characters (including \0)
105 106
106 std::string asString() const; 107 std::string asString() const;
108 std::string getString() const;
107 109
108 U16 getCRC16() const; 110 U16 getCRC16() const;
109 U32 getCRC32() const; 111 U32 getCRC32() const;
diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp
index e42413a..bb3b24d 100644
--- a/linden/indra/llmath/llvolume.cpp
+++ b/linden/indra/llmath/llvolume.cpp
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2002-2007, Linden Research, Inc. 4 * Copyright (c) 2002-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -215,7 +216,7 @@ void LLProfile::genNGon(S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 spl
215 t_fraction = (begin - t_first)*sides; 216 t_fraction = (begin - t_first)*sides;
216 217
217 // Only use if it's not almost exactly on an edge. 218 // Only use if it's not almost exactly on an edge.
218 if (t_fraction < 0.99f) 219 if (t_fraction < 0.9999f)
219 { 220 {
220 LLVector3 new_pt = lerp(pt1, pt2, t_fraction); 221 LLVector3 new_pt = lerp(pt1, pt2, t_fraction);
221 F32 pt_x = new_pt.mV[VX]; 222 F32 pt_x = new_pt.mV[VX];
@@ -266,7 +267,7 @@ void LLProfile::genNGon(S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 spl
266 267
267 // Find the fraction that we need to add to the end point. 268 // Find the fraction that we need to add to the end point.
268 t_fraction = (end - (t - t_step))*sides; 269 t_fraction = (end - (t - t_step))*sides;
269 if (t_fraction > 0.01f) 270 if (t_fraction > 0.0001f)
270 { 271 {
271 LLVector3 new_pt = lerp(pt1, pt2, t_fraction); 272 LLVector3 new_pt = lerp(pt1, pt2, t_fraction);
272 F32 pt_x = new_pt.mV[VX]; 273 F32 pt_x = new_pt.mV[VX];
diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h
index 91f7c9b..7137346 100644
--- a/linden/indra/llmath/llvolume.h
+++ b/linden/indra/llmath/llvolume.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -61,12 +62,12 @@ const S32 MAX_LOD = 3;
61const F32 MIN_VOLUME_PROFILE_WIDTH = 0.05f; 62const F32 MIN_VOLUME_PROFILE_WIDTH = 0.05f;
62const F32 MIN_VOLUME_PATH_WIDTH = 0.05f; 63const F32 MIN_VOLUME_PATH_WIDTH = 0.05f;
63 64
64const F32 CUT_QUANTA = 0.005f; 65const F32 CUT_QUANTA = 0.00002f;
65const F32 SCALE_QUANTA = 0.01f; 66const F32 SCALE_QUANTA = 0.01f;
66const F32 SHEAR_QUANTA = 0.01f; 67const F32 SHEAR_QUANTA = 0.01f;
67const F32 TAPER_QUANTA = 0.01f; 68const F32 TAPER_QUANTA = 0.01f;
68const F32 REV_QUANTA = 0.015f; 69const F32 REV_QUANTA = 0.015f;
69 70const F32 HOLLOW_QUANTA = 0.00002f;
70 71
71//============================================================================ 72//============================================================================
72 73
@@ -184,7 +185,7 @@ public:
184 { 185 {
185 } 186 }
186 187
187 LLProfileParams(U8 curve, U8 begin, U8 end, U8 hollow) 188 LLProfileParams(U8 curve, U16 begin, U16 end, U16 hollow)
188 { 189 {
189 mCurveType = curve; 190 mCurveType = curve;
190 F32 temp_f32 = begin * CUT_QUANTA; 191 F32 temp_f32 = begin * CUT_QUANTA;
@@ -199,7 +200,7 @@ public:
199 temp_f32 = 1.f; 200 temp_f32 = 1.f;
200 } 201 }
201 mEnd = 1.f - temp_f32; 202 mEnd = 1.f - temp_f32;
202 temp_f32 = hollow * SCALE_QUANTA; 203 temp_f32 = hollow * HOLLOW_QUANTA;
203 if (temp_f32 > 1.f) 204 if (temp_f32 > 1.f)
204 { 205 {
205 temp_f32 = 1.f; 206 temp_f32 = 1.f;
@@ -229,9 +230,9 @@ public:
229 const U8& getCurveType () const { return mCurveType; } 230 const U8& getCurveType () const { return mCurveType; }
230 231
231 void setCurveType(const U32 type) { mCurveType = type;} 232 void setCurveType(const U32 type) { mCurveType = type;}
232 void setBegin(const F32 begin) { mBegin = (begin >= 1.0f) ? 0.0f : ((int) (begin * 1000))/1000.0f;} 233 void setBegin(const F32 begin) { mBegin = (begin >= 1.0f) ? 0.0f : ((int) (begin * 100000))/100000.0f;}
233 void setEnd(const F32 end) { mEnd = (end <= 0.0f) ? 1.0f : ((int) (end * 1000))/1000.0f;} 234 void setEnd(const F32 end) { mEnd = (end <= 0.0f) ? 1.0f : ((int) (end * 100000))/100000.0f;}
234 void setHollow(const F32 hollow) { mHollow = ((int) (hollow * 1000))/1000.0f;} 235 void setHollow(const F32 hollow) { mHollow = ((int) (hollow * 100000))/100000.0f;}
235 236
236 friend std::ostream& operator<<(std::ostream &s, const LLProfileParams &profile_params); 237 friend std::ostream& operator<<(std::ostream &s, const LLProfileParams &profile_params);
237 238
@@ -315,11 +316,11 @@ public:
315 mTaper.setVec(tx,ty); 316 mTaper.setVec(tx,ty);
316 } 317 }
317 318
318 LLPathParams(U8 curve, U8 begin, U8 end, U8 scx, U8 scy, U8 shx, U8 shy, U8 twistend, U8 twistbegin, U8 radiusoffset, U8 tx, U8 ty, U8 revolutions, U8 skew) 319 LLPathParams(U8 curve, U16 begin, U16 end, U8 scx, U8 scy, U8 shx, U8 shy, U8 twistend, U8 twistbegin, U8 radiusoffset, U8 tx, U8 ty, U8 revolutions, U8 skew)
319 { 320 {
320 mCurveType = curve; 321 mCurveType = curve;
321 mBegin = (F32)(begin * SCALE_QUANTA); 322 mBegin = (F32)(begin * CUT_QUANTA);
322 mEnd = (F32)(100.f - end) * SCALE_QUANTA; 323 mEnd = (F32)(100.f - end) * CUT_QUANTA;
323 if (mEnd > 1.f) 324 if (mEnd > 1.f)
324 mEnd = 1.f; 325 mEnd = 1.f;
325 mScale.setVec((F32) (200 - scx) * SCALE_QUANTA,(F32) (200 - scy) * SCALE_QUANTA); 326 mScale.setVec((F32) (200 - scx) * SCALE_QUANTA,(F32) (200 - scy) * SCALE_QUANTA);
diff --git a/linden/indra/llmath/llvolumemgr.cpp b/linden/indra/llmath/llvolumemgr.cpp
index 2aa480c..eac407f 100644
--- a/linden/indra/llmath/llvolumemgr.cpp
+++ b/linden/indra/llmath/llvolumemgr.cpp
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2002-2007, Linden Research, Inc. 4 * Copyright (c) 2002-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -297,7 +298,7 @@ F32 LLVolumeLODGroup::dump()
297 } 298 }
298 usage = usage / (F32)NUM_LODS; 299 usage = usage / (F32)NUM_LODS;
299 300
300 snprintf(dump_str, sizeof(dump_str), "%.3f %d %d %d %d", usage, mAccessCount[0], mAccessCount[1], mAccessCount[2], mAccessCount[3]); /* Flawfinder: ignore */ 301 snprintf(dump_str, sizeof(dump_str), "%.3f %d %d %d %d", usage, mAccessCount[0], mAccessCount[1], mAccessCount[2], mAccessCount[3]); /* Flawfinder: ignore */
301 302
302 llinfos << dump_str << llendl; 303 llinfos << dump_str << llendl;
303 return usage; 304 return usage;
diff --git a/linden/indra/llmath/llvolumemgr.h b/linden/indra/llmath/llvolumemgr.h
index 9cb1f63..aa00c4e 100644
--- a/linden/indra/llmath/llvolumemgr.h
+++ b/linden/indra/llmath/llvolumemgr.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/m3math.cpp b/linden/indra/llmath/m3math.cpp
index 4d93af6..09a18d2 100644
--- a/linden/indra/llmath/m3math.cpp
+++ b/linden/indra/llmath/m3math.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/m3math.h b/linden/indra/llmath/m3math.h
index 494856a..94c9b65 100644
--- a/linden/indra/llmath/m3math.h
+++ b/linden/indra/llmath/m3math.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/m4math.cpp b/linden/indra/llmath/m4math.cpp
index ee7e6f3..b6d91a1 100644
--- a/linden/indra/llmath/m4math.cpp
+++ b/linden/indra/llmath/m4math.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -673,31 +674,55 @@ LLVector4 operator*(const LLMatrix4 &a, const LLVector4 &b)
673} 674}
674*/ 675*/
675 676
677// Operates "to the left" on row-vector a
678//
679// This used to be in the header file but was not actually inlined in practice.
680// When avatar vertex programs are off, this function is a hot spot in profiles
681// due to software skinning in LLViewerJointMesh::updateGeometry(). JC
682LLVector3 operator*(const LLVector3 &a, const LLMatrix4 &b)
683{
684 // This is better than making a temporary LLVector3. This eliminates an
685 // unnecessary LLVector3() constructor and also helps the compiler to
686 // realize that the output floats do not alias the input floats, hence
687 // eliminating redundant loads of a.mV[0], etc. JC
688 return LLVector3(a.mV[VX] * b.mMatrix[VX][VX] +
689 a.mV[VY] * b.mMatrix[VY][VX] +
690 a.mV[VZ] * b.mMatrix[VZ][VX] +
691 b.mMatrix[VW][VX],
692
693 a.mV[VX] * b.mMatrix[VX][VY] +
694 a.mV[VY] * b.mMatrix[VY][VY] +
695 a.mV[VZ] * b.mMatrix[VZ][VY] +
696 b.mMatrix[VW][VY],
697
698 a.mV[VX] * b.mMatrix[VX][VZ] +
699 a.mV[VY] * b.mMatrix[VY][VZ] +
700 a.mV[VZ] * b.mMatrix[VZ][VZ] +
701 b.mMatrix[VW][VZ]);
702}
676 703
677LLVector4 operator*(const LLVector4 &a, const LLMatrix4 &b) 704LLVector4 operator*(const LLVector4 &a, const LLMatrix4 &b)
678{ 705{
679 // Operate "to the left" on row-vector a 706 // Operate "to the left" on row-vector a
680 LLVector4 vec; 707 return LLVector4(a.mV[VX] * b.mMatrix[VX][VX] +
681 vec.mV[VX] = a.mV[VX] * b.mMatrix[VX][VX] + 708 a.mV[VY] * b.mMatrix[VY][VX] +
682 a.mV[VY] * b.mMatrix[VY][VX] + 709 a.mV[VZ] * b.mMatrix[VZ][VX] +
683 a.mV[VZ] * b.mMatrix[VZ][VX] + 710 a.mV[VW] * b.mMatrix[VW][VX],
684 a.mV[VW] * b.mMatrix[VW][VX]; 711
685 712 a.mV[VX] * b.mMatrix[VX][VY] +
686 vec.mV[VY] = a.mV[VX] * b.mMatrix[VX][VY] + 713 a.mV[VY] * b.mMatrix[VY][VY] +
687 a.mV[VY] * b.mMatrix[VY][VY] + 714 a.mV[VZ] * b.mMatrix[VZ][VY] +
688 a.mV[VZ] * b.mMatrix[VZ][VY] + 715 a.mV[VW] * b.mMatrix[VW][VY],
689 a.mV[VW] * b.mMatrix[VW][VY]; 716
690 717 a.mV[VX] * b.mMatrix[VX][VZ] +
691 vec.mV[VZ] = a.mV[VX] * b.mMatrix[VX][VZ] + 718 a.mV[VY] * b.mMatrix[VY][VZ] +
692 a.mV[VY] * b.mMatrix[VY][VZ] + 719 a.mV[VZ] * b.mMatrix[VZ][VZ] +
693 a.mV[VZ] * b.mMatrix[VZ][VZ] + 720 a.mV[VW] * b.mMatrix[VW][VZ],
694 a.mV[VW] * b.mMatrix[VW][VZ]; 721
695 722 a.mV[VX] * b.mMatrix[VX][VW] +
696 vec.mV[VW] = a.mV[VX] * b.mMatrix[VX][VW] + 723 a.mV[VY] * b.mMatrix[VY][VW] +
697 a.mV[VY] * b.mMatrix[VY][VW] + 724 a.mV[VZ] * b.mMatrix[VZ][VW] +
698 a.mV[VZ] * b.mMatrix[VZ][VW] + 725 a.mV[VW] * b.mMatrix[VW][VW]);
699 a.mV[VW] * b.mMatrix[VW][VW];
700 return vec;
701} 726}
702 727
703LLVector4 rotate_vector(const LLVector4 &a, const LLMatrix4 &b) 728LLVector4 rotate_vector(const LLVector4 &a, const LLMatrix4 &b)
diff --git a/linden/indra/llmath/m4math.h b/linden/indra/llmath/m4math.h
index 7de29ed..24f9f86 100644
--- a/linden/indra/llmath/m4math.h
+++ b/linden/indra/llmath/m4math.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -266,27 +267,6 @@ inline const LLMatrix4& LLMatrix4::identity()
266 return (*this); 267 return (*this);
267} 268}
268 269
269inline LLVector3 operator*(const LLVector3 &a, const LLMatrix4 &b)
270{
271 // Converts a to LLVector4 and applies full transformation
272 // Operates "to the left" on row-vector a
273 LLVector3 vec;
274 vec.mV[VX] = a.mV[VX] * b.mMatrix[VX][VX] +
275 a.mV[VY] * b.mMatrix[VY][VX] +
276 a.mV[VZ] * b.mMatrix[VZ][VX] +
277 b.mMatrix[VW][VX];
278
279 vec.mV[VY] = a.mV[VX] * b.mMatrix[VX][VY] +
280 a.mV[VY] * b.mMatrix[VY][VY] +
281 a.mV[VZ] * b.mMatrix[VZ][VY] +
282 b.mMatrix[VW][VY];
283
284 vec.mV[VZ] = a.mV[VX] * b.mMatrix[VX][VZ] +
285 a.mV[VY] * b.mMatrix[VY][VZ] +
286 a.mV[VZ] * b.mMatrix[VZ][VZ] +
287 b.mMatrix[VW][VZ];
288 return vec;
289}
290 270
291/* 271/*
292inline LLMatrix4 operator*(const LLMatrix4 &a, const LLMatrix4 &b) 272inline LLMatrix4 operator*(const LLMatrix4 &a, const LLMatrix4 &b)
diff --git a/linden/indra/llmath/raytrace.cpp b/linden/indra/llmath/raytrace.cpp
index 64bf616..634542d 100644
--- a/linden/indra/llmath/raytrace.cpp
+++ b/linden/indra/llmath/raytrace.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/raytrace.h b/linden/indra/llmath/raytrace.h
index 58cca69..f68002f 100644
--- a/linden/indra/llmath/raytrace.h
+++ b/linden/indra/llmath/raytrace.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/v2math.cpp b/linden/indra/llmath/v2math.cpp
index cee0f73..e41227b 100644
--- a/linden/indra/llmath/v2math.cpp
+++ b/linden/indra/llmath/v2math.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/v2math.h b/linden/indra/llmath/v2math.h
index c978fc0..bcfe016 100644
--- a/linden/indra/llmath/v2math.h
+++ b/linden/indra/llmath/v2math.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/v3color.cpp b/linden/indra/llmath/v3color.cpp
index 9428093..5464a0b 100644
--- a/linden/indra/llmath/v3color.cpp
+++ b/linden/indra/llmath/v3color.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -61,3 +62,52 @@ std::ostream& operator<<(std::ostream& s, const LLColor3 &a)
61 s << "{ " << a.mV[VX] << ", " << a.mV[VY] << ", " << a.mV[VZ] << " }"; 62 s << "{ " << a.mV[VX] << ", " << a.mV[VY] << ", " << a.mV[VZ] << " }";
62 return s; 63 return s;
63} 64}
65
66void LLColor3::calcHSL(F32* hue, F32* saturation, F32* luminance) const
67{
68 F32 var_R = mV[VRED];
69 F32 var_G = mV[VGREEN];
70 F32 var_B = mV[VBLUE];
71
72 F32 var_Min = ( var_R < ( var_G < var_B ? var_G : var_B ) ? var_R : ( var_G < var_B ? var_G : var_B ) );
73 F32 var_Max = ( var_R > ( var_G > var_B ? var_G : var_B ) ? var_R : ( var_G > var_B ? var_G : var_B ) );
74
75 F32 del_Max = var_Max - var_Min;
76
77 F32 L = ( var_Max + var_Min ) / 2.0f;
78 F32 H = 0.0f;
79 F32 S = 0.0f;
80
81 if ( del_Max == 0.0f )
82 {
83 H = 0.0f;
84 S = 0.0f;
85 }
86 else
87 {
88 if ( L < 0.5 )
89 S = del_Max / ( var_Max + var_Min );
90 else
91 S = del_Max / ( 2.0f - var_Max - var_Min );
92
93 F32 del_R = ( ( ( var_Max - var_R ) / 6.0f ) + ( del_Max / 2.0f ) ) / del_Max;
94 F32 del_G = ( ( ( var_Max - var_G ) / 6.0f ) + ( del_Max / 2.0f ) ) / del_Max;
95 F32 del_B = ( ( ( var_Max - var_B ) / 6.0f ) + ( del_Max / 2.0f ) ) / del_Max;
96
97 if ( var_R >= var_Max )
98 H = del_B - del_G;
99 else
100 if ( var_G >= var_Max )
101 H = ( 1.0f / 3.0f ) + del_R - del_B;
102 else
103 if ( var_B >= var_Max )
104 H = ( 2.0f / 3.0f ) + del_G - del_R;
105
106 if ( H < 0.0f ) H += 1.0f;
107 if ( H > 1.0f ) H -= 1.0f;
108 }
109
110 if (hue) *hue = H;
111 if (saturation) *saturation = S;
112 if (luminance) *luminance = L;
113} \ No newline at end of file
diff --git a/linden/indra/llmath/v3color.h b/linden/indra/llmath/v3color.h
index 06a94db..8f9224d 100644
--- a/linden/indra/llmath/v3color.h
+++ b/linden/indra/llmath/v3color.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -71,6 +72,8 @@ public:
71 mV[1] = (F32) sd[1].asReal();; 72 mV[1] = (F32) sd[1].asReal();;
72 mV[2] = (F32) sd[2].asReal();; 73 mV[2] = (F32) sd[2].asReal();;
73 } 74 }
75
76 void calcHSL(F32* hue, F32* saturation, F32* luminance) const;
74 77
75 const LLColor3& setToBlack(); // Clears LLColor3 to (0, 0, 0) 78 const LLColor3& setToBlack(); // Clears LLColor3 to (0, 0, 0)
76 const LLColor3& setToWhite(); // Zero LLColor3 to (0, 0, 0) 79 const LLColor3& setToWhite(); // Zero LLColor3 to (0, 0, 0)
diff --git a/linden/indra/llmath/v3dmath.cpp b/linden/indra/llmath/v3dmath.cpp
index 5d3aad0..059f9c6 100644
--- a/linden/indra/llmath/v3dmath.cpp
+++ b/linden/indra/llmath/v3dmath.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/v3dmath.h b/linden/indra/llmath/v3dmath.h
index da13cc3..c101cc8 100644
--- a/linden/indra/llmath/v3dmath.h
+++ b/linden/indra/llmath/v3dmath.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/v3math.cpp b/linden/indra/llmath/v3math.cpp
index a97b6d8..f42fe1c 100644
--- a/linden/indra/llmath/v3math.cpp
+++ b/linden/indra/llmath/v3math.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/v3math.h b/linden/indra/llmath/v3math.h
index e7134eb..bf211e2 100644
--- a/linden/indra/llmath/v3math.h
+++ b/linden/indra/llmath/v3math.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/v4color.cpp b/linden/indra/llmath/v4color.cpp
index 2732a60..281e5f1 100644
--- a/linden/indra/llmath/v4color.cpp
+++ b/linden/indra/llmath/v4color.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -224,6 +225,55 @@ LLColor4 vec3to4(const LLColor3 &vec)
224 return temp; 225 return temp;
225} 226}
226 227
228void LLColor4::calcHSL(F32* hue, F32* saturation, F32* luminance) const
229{
230 F32 var_R = mV[VRED];
231 F32 var_G = mV[VGREEN];
232 F32 var_B = mV[VBLUE];
233
234 F32 var_Min = ( var_R < ( var_G < var_B ? var_G : var_B ) ? var_R : ( var_G < var_B ? var_G : var_B ) );
235 F32 var_Max = ( var_R > ( var_G > var_B ? var_G : var_B ) ? var_R : ( var_G > var_B ? var_G : var_B ) );
236
237 F32 del_Max = var_Max - var_Min;
238
239 F32 L = ( var_Max + var_Min ) / 2.0f;
240 F32 H = 0.0f;
241 F32 S = 0.0f;
242
243 if ( del_Max == 0.0f )
244 {
245 H = 0.0f;
246 S = 0.0f;
247 }
248 else
249 {
250 if ( L < 0.5 )
251 S = del_Max / ( var_Max + var_Min );
252 else
253 S = del_Max / ( 2.0f - var_Max - var_Min );
254
255 F32 del_R = ( ( ( var_Max - var_R ) / 6.0f ) + ( del_Max / 2.0f ) ) / del_Max;
256 F32 del_G = ( ( ( var_Max - var_G ) / 6.0f ) + ( del_Max / 2.0f ) ) / del_Max;
257 F32 del_B = ( ( ( var_Max - var_B ) / 6.0f ) + ( del_Max / 2.0f ) ) / del_Max;
258
259 if ( var_R >= var_Max )
260 H = del_B - del_G;
261 else
262 if ( var_G >= var_Max )
263 H = ( 1.0f / 3.0f ) + del_R - del_B;
264 else
265 if ( var_B >= var_Max )
266 H = ( 2.0f / 3.0f ) + del_G - del_R;
267
268 if ( H < 0.0f ) H += 1.0f;
269 if ( H > 1.0f ) H -= 1.0f;
270 }
271
272 if (hue) *hue = H;
273 if (saturation) *saturation = S;
274 if (luminance) *luminance = L;
275}
276
227// static 277// static
228BOOL LLColor4::parseColor(const char* buf, LLColor4* color) 278BOOL LLColor4::parseColor(const char* buf, LLColor4* color)
229{ 279{
diff --git a/linden/indra/llmath/v4color.h b/linden/indra/llmath/v4color.h
index d4130d6..d79b6c8 100644
--- a/linden/indra/llmath/v4color.h
+++ b/linden/indra/llmath/v4color.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -73,6 +74,8 @@ class LLColor4
73 mV[3] = (F32) sd[3].asReal(); 74 mV[3] = (F32) sd[3].asReal();
74 } 75 }
75 76
77 void calcHSL(F32* hue, F32* saturation, F32* luminance) const;
78
76 const LLColor4& setToBlack(); // zero LLColor4 to (0, 0, 0, 1) 79 const LLColor4& setToBlack(); // zero LLColor4 to (0, 0, 0, 1)
77 const LLColor4& setToWhite(); // zero LLColor4 to (0, 0, 0, 1) 80 const LLColor4& setToWhite(); // zero LLColor4 to (0, 0, 0, 1)
78 81
diff --git a/linden/indra/llmath/v4coloru.cpp b/linden/indra/llmath/v4coloru.cpp
index 848a082..90399b5 100644
--- a/linden/indra/llmath/v4coloru.cpp
+++ b/linden/indra/llmath/v4coloru.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/v4coloru.h b/linden/indra/llmath/v4coloru.h
index a5124d0..08e723a 100644
--- a/linden/indra/llmath/v4coloru.h
+++ b/linden/indra/llmath/v4coloru.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/v4math.cpp b/linden/indra/llmath/v4math.cpp
index a4af47d..fa52d95 100644
--- a/linden/indra/llmath/v4math.cpp
+++ b/linden/indra/llmath/v4math.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/v4math.h b/linden/indra/llmath/v4math.h
index f768ba7..f3c2ccc 100644
--- a/linden/indra/llmath/v4math.h
+++ b/linden/indra/llmath/v4math.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc. 5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -45,7 +46,8 @@ class LLVector4
45 public: 46 public:
46 F32 mV[LENGTHOFVECTOR4]; 47 F32 mV[LENGTHOFVECTOR4];
47 LLVector4(); // Initializes LLVector4 to (0, 0, 0, 1) 48 LLVector4(); // Initializes LLVector4 to (0, 0, 0, 1)
48 explicit LLVector4(const F32 *vec); // Initializes LLVector4 to (vec[0]. vec[1], vec[2], 1) 49 explicit LLVector4(const F32 *vec); // Initializes LLVector4 to (vec[0]. vec[1], vec[2], vec[3])
50 explicit LLVector4(const F64 *vec); // Initialized LLVector4 to ((F32) vec[0], (F32) vec[1], (F32) vec[3], (F32) vec[4]);
49 explicit LLVector4(const LLVector3 &vec); // Initializes LLVector4 to (vec, 1) 51 explicit LLVector4(const LLVector3 &vec); // Initializes LLVector4 to (vec, 1)
50 explicit LLVector4(const LLVector3 &vec, F32 w); // Initializes LLVector4 to (vec, w) 52 explicit LLVector4(const LLVector3 &vec, F32 w); // Initializes LLVector4 to (vec, w)
51 LLVector4(F32 x, F32 y, F32 z); // Initializes LLVector4 to (x. y, z, 1) 53 LLVector4(F32 x, F32 y, F32 z); // Initializes LLVector4 to (x. y, z, 1)
@@ -155,6 +157,14 @@ inline LLVector4::LLVector4(const F32 *vec)
155 mV[VW] = vec[VW]; 157 mV[VW] = vec[VW];
156} 158}
157 159
160inline LLVector4::LLVector4(const F64 *vec)
161{
162 mV[VX] = (F32) vec[VX];
163 mV[VY] = (F32) vec[VY];
164 mV[VZ] = (F32) vec[VZ];
165 mV[VW] = (F32) vec[VW];
166}
167
158inline LLVector4::LLVector4(const LLVector3 &vec) 168inline LLVector4::LLVector4(const LLVector3 &vec)
159{ 169{
160 mV[VX] = vec.mV[VX]; 170 mV[VX] = vec.mV[VX];
diff --git a/linden/indra/llmath/xform.cpp b/linden/indra/llmath/xform.cpp
index fc2e060..71c2755 100644
--- a/linden/indra/llmath/xform.cpp
+++ b/linden/indra/llmath/xform.cpp
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2001-2007, Linden Research, Inc. 4 * Copyright (c) 2001-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement
diff --git a/linden/indra/llmath/xform.h b/linden/indra/llmath/xform.h
index af28e43..605b1b5 100644
--- a/linden/indra/llmath/xform.h
+++ b/linden/indra/llmath/xform.h
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2001-2007, Linden Research, Inc. 4 * Copyright (c) 2001-2007, Linden Research, Inc.
5 * 5 *
6 * Second Life Viewer Source Code
6 * The source code in this file ("Source Code") is provided by Linden Lab 7 * The source code in this file ("Source Code") is provided by Linden Lab
7 * to you under the terms of the GNU General Public License, version 2.0 8 * to you under the terms of the GNU General Public License, version 2.0
8 * ("GPL"), unless you have obtained a separate licensing agreement 9 * ("GPL"), unless you have obtained a separate licensing agreement