Solaris was having problems with sqrtf and friends again.
authorKent Mein <mein@cs.umn.edu>
Fri, 3 Oct 2008 13:16:10 +0000 (13:16 +0000)
committerKent Mein <mein@cs.umn.edu>
Fri, 3 Oct 2008 13:16:10 +0000 (13:16 +0000)
I changed sqrtf to sqrt in elbeem
in bullet2 I added defines found in floatpatch.h eventually
we should make a "floatpatch.h" that all of blender can use.

Kent

extern/bullet2/src/LinearMath/btScalar.h
intern/elbeem/intern/mvmcoords.cpp

index fa0262940ef33d1e7ba9949ba78d7bd50cdad14b..c24e4644005ce551fc8e93daa1645438441d70b5 100644 (file)
@@ -35,6 +35,10 @@ inline int   btGetVersion()
 #define BT_DEBUG
 #endif
 
+/* XXX Need to fix these... needed for SunOS 5.8 */
+#define sinf(a)         sin((double)(a))
+#define cosf(a)         cos((double)(a))
+#define fabsf(a)        fabs((double)(a))
 
 #ifdef WIN32
 
index ac954b956d046b055e16418a4411857ed0b5cd21..03f6482ae84003c93dfe674015937903b2cf1475 100644 (file)
@@ -98,9 +98,9 @@ void MeanValueMeshCoords::computeWeights(vector<ntlVec3Gfx> &reference_vertices,
                if(mvmFullDebug) errMsg("MeanValueMeshCoords::computeWeights","c="<<c<<" phi="<<phi<<" d="<<d);
                //if (c[0] > 1. || c[0] < 0. || c[1] > 1. || c[1] < 0. || c[2] > 1. || c[2] < 0.) continue;
 
-               s[0] = sqrtf((float)(1.-c[0]*c[0]));
-               s[1] = sqrtf((float)(1.-c[1]*c[1]));
-               s[2] = sqrtf((float)(1.-c[2]*c[2]));
+               s[0] = sqrt((float)(1.-c[0]*c[0]));
+               s[1] = sqrt((float)(1.-c[1]*c[1]));
+               s[2] = sqrt((float)(1.-c[2]*c[2]));
 
                if(mvmFullDebug) errMsg("MeanValueMeshCoords::computeWeights","s");
                if (s[0] <= cEPS || s[1] <= cEPS || s[2] <= cEPS) {