Index: code/branches/kicklib2/src/external/bullet/LinearMath/btConvexHull.cpp
===================================================================
--- code/branches/kicklib2/src/external/bullet/LinearMath/btConvexHull.cpp	(revision 8282)
+++ code/branches/kicklib2/src/external/bullet/LinearMath/btConvexHull.cpp	(revision 8284)
@@ -17,7 +17,7 @@
 
 #include "btConvexHull.h"
-#include "LinearMath/btAlignedObjectArray.h"
-#include "LinearMath/btMinMax.h"
-#include "LinearMath/btVector3.h"
+#include "btAlignedObjectArray.h"
+#include "btMinMax.h"
+#include "btVector3.h"
 
 
@@ -97,6 +97,6 @@
 				static btVector3 dif;
 		dif = p1-p0;
-				btScalar dn= dot(plane.normal,dif);
-				btScalar t = -(plane.dist+dot(plane.normal,p0) )/dn;
+				btScalar dn= btDot(plane.normal,dif);
+				btScalar t = -(plane.dist+btDot(plane.normal,p0) )/dn;
 				return p0 + (dif*t);
 }
@@ -104,5 +104,5 @@
 btVector3 PlaneProject(const btPlane &plane, const btVector3 &point)
 {
-	return point - plane.normal * (dot(point,plane.normal)+plane.dist);
+	return point - plane.normal * (btDot(point,plane.normal)+plane.dist);
 }
 
@@ -111,5 +111,5 @@
 	// return the normal of the triangle
 	// inscribed by v0, v1, and v2
-	btVector3 cp=cross(v1-v0,v2-v1);
+	btVector3 cp=btCross(v1-v0,v2-v1);
 	btScalar m=cp.length();
 	if(m==0) return btVector3(1,0,0);
@@ -121,14 +121,14 @@
 {
 	static btVector3 cp;
-	cp = cross(udir,vdir).normalized();
-
-	btScalar distu = -dot(cp,ustart);
-	btScalar distv = -dot(cp,vstart);
+	cp = btCross(udir,vdir).normalized();
+
+	btScalar distu = -btDot(cp,ustart);
+	btScalar distv = -btDot(cp,vstart);
 	btScalar dist = (btScalar)fabs(distu-distv);
 	if(upoint) 
 		{
 		btPlane plane;
-		plane.normal = cross(vdir,cp).normalized();
-		plane.dist = -dot(plane.normal,vstart);
+		plane.normal = btCross(vdir,cp).normalized();
+		plane.dist = -btDot(plane.normal,vstart);
 		*upoint = PlaneLineIntersection(plane,ustart,ustart+udir);
 	}
@@ -136,6 +136,6 @@
 		{
 		btPlane plane;
-		plane.normal = cross(udir,cp).normalized();
-		plane.dist = -dot(plane.normal,ustart);
+		plane.normal = btCross(udir,cp).normalized();
+		plane.dist = -btDot(plane.normal,ustart);
 		*vpoint = PlaneLineIntersection(plane,vstart,vstart+vdir);
 	}
@@ -171,5 +171,5 @@
 int PlaneTest(const btPlane &p, const btVector3 &v);
 int PlaneTest(const btPlane &p, const btVector3 &v) {
-	btScalar a  = dot(v,p.normal)+p.dist;
+	btScalar a  = btDot(v,p.normal)+p.dist;
 	int   flag = (a>planetestepsilon)?OVER:((a<-planetestepsilon)?UNDER:COPLANAR);
 	return flag;
@@ -229,5 +229,5 @@
 		if(allow[i])
 		{
-			if(m==-1 || dot(p[i],dir)>dot(p[m],dir))
+			if(m==-1 || btDot(p[i],dir)>btDot(p[m],dir))
 				m=i;
 		}
@@ -239,6 +239,6 @@
 btVector3 orth(const btVector3 &v)
 {
-	btVector3 a=cross(v,btVector3(0,0,1));
-	btVector3 b=cross(v,btVector3(0,1,0));
+	btVector3 a=btCross(v,btVector3(0,0,1));
+	btVector3 b=btCross(v,btVector3(0,1,0));
 	if (a.length() > b.length())
 	{
@@ -259,5 +259,5 @@
 		if(allow[m]==3) return m;
 		T u = orth(dir);
-		T v = cross(u,dir);
+		T v = btCross(u,dir);
 		int ma=-1;
 		for(btScalar x = btScalar(0.0) ; x<= btScalar(360.0) ; x+= btScalar(45.0))
@@ -314,5 +314,5 @@
 {
 	btVector3 n=TriNormal(vertices[t[0]],vertices[t[1]],vertices[t[2]]);
-	return (dot(n,p-vertices[t[0]]) > epsilon); // EPSILON???
+	return (btDot(n,p-vertices[t[0]]) > epsilon); // EPSILON???
 }
 int hasedge(const int3 &t, int a,int b);
@@ -496,6 +496,6 @@
 	if(p0==p1 || basis[0]==btVector3(0,0,0)) 
 		return int4(-1,-1,-1,-1);
-	basis[1] = cross(btVector3(     btScalar(1),btScalar(0.02), btScalar(0)),basis[0]);
-	basis[2] = cross(btVector3(btScalar(-0.02),     btScalar(1), btScalar(0)),basis[0]);
+	basis[1] = btCross(btVector3(     btScalar(1),btScalar(0.02), btScalar(0)),basis[0]);
+	basis[2] = btCross(btVector3(btScalar(-0.02),     btScalar(1), btScalar(0)),basis[0]);
 	if (basis[1].length() > basis[2].length())
 	{
@@ -513,5 +513,5 @@
 		return int4(-1,-1,-1,-1);
 	basis[1] = verts[p2] - verts[p0];
-	basis[2] = cross(basis[1],basis[0]).normalized();
+	basis[2] = btCross(basis[1],basis[0]).normalized();
 	int p3 = maxdirsterid(verts,verts_count,basis[2],allow);
 	if(p3==p0||p3==p1||p3==p2) p3 = maxdirsterid(verts,verts_count,-basis[2],allow);
@@ -519,5 +519,5 @@
 		return int4(-1,-1,-1,-1);
 	btAssert(!(p0==p1||p0==p2||p0==p3||p1==p2||p1==p3||p2==p3));
-	if(dot(verts[p3]-verts[p0],cross(verts[p1]-verts[p0],verts[p2]-verts[p0])) <0) {Swap(p2,p3);}
+	if(btDot(verts[p3]-verts[p0],btCross(verts[p1]-verts[p0],verts[p2]-verts[p0])) <0) {Swap(p2,p3);}
 	return int4(p0,p1,p2,p3);
 }
@@ -565,5 +565,5 @@
 		btVector3 n=TriNormal(verts[(*t)[0]],verts[(*t)[1]],verts[(*t)[2]]);
 		t->vmax = maxdirsterid(verts,verts_count,n,allow);
-		t->rise = dot(n,verts[t->vmax]-verts[(*t)[0]]);
+		t->rise = btDot(n,verts[t->vmax]-verts[(*t)[0]]);
 	}
 	btHullTriangle *te;
@@ -593,5 +593,5 @@
 			if(!hasvert(*m_tris[j],v)) break;
 			int3 nt=*m_tris[j];
-			if(above(verts,nt,center,btScalar(0.01)*epsilon)  || cross(verts[nt[1]]-verts[nt[0]],verts[nt[2]]-verts[nt[1]]).length()< epsilon*epsilon*btScalar(0.1) )
+			if(above(verts,nt,center,btScalar(0.01)*epsilon)  || btCross(verts[nt[1]]-verts[nt[0]],verts[nt[2]]-verts[nt[1]]).length()< epsilon*epsilon*btScalar(0.1) )
 			{
 				btHullTriangle *nb = m_tris[m_tris[j]->n[0]];
@@ -615,5 +615,5 @@
 			else
 			{
-				t->rise = dot(n,verts[t->vmax]-verts[(*t)[0]]);
+				t->rise = btDot(n,verts[t->vmax]-verts[(*t)[0]]);
 			}
 		}
@@ -877,5 +877,5 @@
 	vcount = 0;
 
-	btScalar recip[3];
+	btScalar recip[3]={0.f,0.f,0.f};
 
 	if ( scale )
@@ -1012,7 +1012,7 @@
 				btScalar z = v[2];
 
-				btScalar dx = fabsf(x - px );
-				btScalar dy = fabsf(y - py );
-				btScalar dz = fabsf(z - pz );
+				btScalar dx = btFabs(x - px );
+				btScalar dy = btFabs(y - py );
+				btScalar dz = btFabs(z - pz );
 
 				if ( dx < normalepsilon && dy < normalepsilon && dz < normalepsilon )
@@ -1136,5 +1136,5 @@
 	ocount = 0;
 
-	for (i=0; i<indexcount; i++)
+	for (i=0; i<int (indexcount); i++)
 	{
 		unsigned int v = indices[i]; // original array index
@@ -1157,5 +1157,5 @@
 			for (int k=0;k<m_vertexIndexMapping.size();k++)
 			{
-				if (tmpIndices[k]==v)
+				if (tmpIndices[k]==int(v))
 					m_vertexIndexMapping[k]=ocount;
 			}
