From 6e37ec08f678451a526f34218cb070d117cdf60a Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Mon, 14 Jun 2010 23:13:10 -0500
Subject: [PATCH] Builds with LLConvexDecompInter as a static lib.

---
 indra/cmake/CMakeLists.txt                           | 2 ++
 indra/llcommon/llassettype.h                         | 2 --
 indra/llinventory/llinventorytype.h                  | 3 ---
 indra/llmath/llvolume.cpp                            | 8 ++++----
 indra/llmath/llvolume.h                              | 4 ++--
 indra/newview/CMakeLists.txt                         | 3 +++
 indra/newview/llassetuploadresponders.h              | 1 +
 indra/newview/lldrawpoolavatar.h                     | 1 +
 indra/newview/llinventorybridge.h                    | 1 +
 indra/newview/lltooldraganddrop.cpp                  | 2 +-
 indra/newview/lltooldraganddrop.h                    | 1 +
 indra/newview/llvovolume.cpp                         | 2 +-
 indra/newview/skins/default/xui/en/floater_about.xml | 4 +++-
 13 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 4fc25dcc241..8612c463760 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -34,6 +34,7 @@ set(cmake_SOURCE_FILES
     FindXmlRpcEpi.cmake
     FMOD.cmake
     FreeType.cmake
+    GLOD.cmake
     GStreamer010Plugin.cmake
     GooglePerfTools.cmake
     JPEG.cmake
@@ -41,6 +42,7 @@ set(cmake_SOURCE_FILES
     LLAudio.cmake
     LLCharacter.cmake
     LLCommon.cmake
+    LLConvexDecompInter.cmake
     LLCrashLogger.cmake
     LLDatabase.cmake
     LLImage.cmake
diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h
index ebc43134cbe..27d35e95ffc 100644
--- a/indra/llcommon/llassettype.h
+++ b/indra/llcommon/llassettype.h
@@ -114,10 +114,8 @@ class LL_COMMON_API LLAssetType
 
 		AT_LINK_FOLDER = 25,
 			// Inventory folder link
-#if LL_MESH_ENABLED
 		AT_MESH = 49,
 		    // Mesh data in our proprietary SLM format
-#endif
 
 		AT_COUNT = 50,
 
diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h
index d2fc67ef645..17ed3df951d 100644
--- a/indra/llinventory/llinventorytype.h
+++ b/indra/llinventory/llinventorytype.h
@@ -67,10 +67,7 @@ class LLInventoryType
 		IT_WEARABLE = 18,
 		IT_ANIMATION = 19,
 		IT_GESTURE = 20,
-
-#if LL_MESH_ENABLED
 		IT_MESH = 22,
-#endif
 		IT_COUNT = 23,
 
 		IT_NONE = -1
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 10cef533b01..53f484fb791 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -5355,9 +5355,9 @@ bool LLVolumeFace::VertexMapData::operator==(const LLVolumeFace::VertexData& rhs
 		getNormal().equal3(rhs.getNormal());
 }
 
-bool LLVolumeFace::VertexMapData::ComparePosition::operator()(const LLVector4a& a, const LLVector4a& b) const
+bool LLVolumeFace::VertexMapData::ComparePosition::operator()(const LLVector3& a, const LLVector3& b) const
 {
-	return a.less3(b);			
+	return a < b;			
 }
 
 void LLVolumeFace::optimize(F32 angle_cutoff)
@@ -5375,7 +5375,7 @@ void LLVolumeFace::optimize(F32 angle_cutoff)
 		getVertexData(index, cv);
 		
 		BOOL found = FALSE;
-		VertexMapData::PointMap::iterator point_iter = point_map.find(cv.getPosition());
+		VertexMapData::PointMap::iterator point_iter = point_map.find(LLVector3(cv.getPosition().getF32()));
 		if (point_iter != point_map.end())
 		{ //duplicate point might exist
 			for (U32 j = 0; j < point_iter->second.size(); ++j)
@@ -5407,7 +5407,7 @@ void LLVolumeFace::optimize(F32 angle_cutoff)
 			}
 			else
 			{
-				point_map[d.getPosition()].push_back(d);
+				point_map[LLVector3(d.getPosition().getF32())].push_back(d);
 			}
 		}
 	}
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 98db7f31c0e..4aef3be9737 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -873,10 +873,10 @@ class LLVolumeFace
 
 		struct ComparePosition
 		{
-			bool operator()(const LLVector4a& a, const LLVector4a& b) const;
+			bool operator()(const LLVector3& a, const LLVector3& b) const;
 		};
 
-		typedef std::map<LLVector4a, std::vector<VertexMapData>, VertexMapData::ComparePosition > PointMap;
+		typedef std::map<LLVector3, std::vector<VertexMapData>, VertexMapData::ComparePosition > PointMap;
 	};
 
 	void optimize(F32 angle_cutoff = 2.f);
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index d2ae81180be..9de1d4aca5c 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -16,6 +16,7 @@ include(FindOpenGL)
 include(LLAudio)
 include(LLCharacter)
 include(LLCommon)
+include(LLConvexDecompInter)
 include(LLImage)
 include(LLImageJ2COJ)
 include(LLInventory)
@@ -49,6 +50,7 @@ include_directories(
     ${LLAUDIO_INCLUDE_DIRS}
     ${LLCHARACTER_INCLUDE_DIRS}
     ${LLCOMMON_INCLUDE_DIRS}
+    ${LLCONVEXDECOMPINTER_INCLUDE_DIRS}
     ${LLIMAGE_INCLUDE_DIRS}
     ${LLINVENTORY_INCLUDE_DIRS}
     ${LLMATH_INCLUDE_DIRS}
@@ -1683,6 +1685,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
     ${CRYPTO_LIBRARIES}
     ${LLLOGIN_LIBRARIES}
     ${GOOGLE_PERFTOOLS_LIBRARIES}
+    ${LLCONVEXDECOMPINTER_LIBRARIES}
     )
 
 build_version(viewer)
diff --git a/indra/newview/llassetuploadresponders.h b/indra/newview/llassetuploadresponders.h
index 9abaccfde09..5890fbbc088 100644
--- a/indra/newview/llassetuploadresponders.h
+++ b/indra/newview/llassetuploadresponders.h
@@ -34,6 +34,7 @@
 #define LL_LLASSETUPLOADRESPONDER_H
 
 #include "llhttpclient.h"
+#include "llvolume.h" //for LL_MESH_ENABLED
 
 // Abstract class for supporting asset upload
 // via capabilities
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index 46ffc42f040..b01394534b3 100644
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -34,6 +34,7 @@
 #define LL_LLDRAWPOOLAVATAR_H
 
 #include "lldrawpool.h"
+#include "llvolume.h" // for LL_MESH_ENABLED
 
 class LLVOAvatar;
 class LLGLSLShader;
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 8de7d631738..0e3b5bc3c9d 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -40,6 +40,7 @@
 #include "llinventoryobserver.h"
 #include "llviewercontrol.h"
 #include "llwearable.h"
+#include "llvolume.h"  //for LL_MESH_ENABLED
 
 class LLInventoryPanel;
 class LLInventoryModel;
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index d679ccd3d8d..c4ecba1aa20 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1037,7 +1037,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
 	hit_obj->sendTEUpdate();
 }
 
-#if LL_MESH_EANBLED
+#if LL_MESH_ENABLED
 void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj,
 								 LLInventoryItem* item,
 								 LLToolDragAndDrop::ESource source,
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index ceeaa8c8209..09da4c29554 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -43,6 +43,7 @@
 #include "llpermissions.h"
 #include "llwindow.h"
 #include "llviewerinventory.h"
+#include "llvolume.h" //for LL_MESH_ENABLED
 
 class LLToolDragAndDrop;
 class LLViewerRegion;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index d66aa567a8c..8f51edc1de1 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1594,7 +1594,7 @@ void LLVOVolume::updateFaceSize(S32 idx)
 	LLFace* facep = mDrawable->getFace(idx);
 	if (idx >= getVolume()->getNumVolumeFaces())
 	{
-		facep->setSize(0,0);
+		facep->setSize(0,0, true);
 	}
 	else
 	{
diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml
index 294a68255d8..860cff6664f 100644
--- a/indra/newview/skins/default/xui/en/floater_about.xml
+++ b/indra/newview/skins/default/xui/en/floater_about.xml
@@ -160,10 +160,12 @@ xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
 zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler.
 google-perftools Copyright (c) 2005, Google Inc.
 
+Second Life Viewer uses Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (and its Licensors). All Rights Reserved. See www.havok.com for details.
+
 All rights reserved.  See licenses.txt for details.
 
 Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
-      </text_editor>
+        </text_editor>
       </panel>
     </tab_container>
 </floater>
-- 
GitLab