Commits

oleh_derevenko  committed a9f9050 Draft

Cosmetic: Put vector initialization with NANs back; demo compilation fixed for VS2008

  • Participants
  • Parent commits 4d94f7a

Comments (0)

Files changed (3)

File include/ode/odeconfig.h

   #endif
 #endif
 
+#ifdef dSINGLE
+  #define dNaN ((float)(dInfinity - dInfinity))
+#else
+  #define dNaN (dInfinity - dInfinity)
+#endif
+
 
   /* Visual C does not define these functions */
 #if defined(_MSC_VER)

File ode/demo/demo_chain1.c

 
 static void nearCallback (void *data, dGeomID o1, dGeomID o2)
 {
-  (void)data; // unused
   /* exit without doing anything if the two bodies are connected by a joint */
   dBodyID b1,b2;
   dContact contact;
+  (void)data;
 
   b1 = dGeomGetBody(o1);
   b2 = dGeomGetBody(o2);

File ode/src/ray.cpp

     int flipNormals = (inCaps&&inRadius);
 
     dReal tt=-dInfinity; // Depth to intersection
-    // NAN isn't defined in the windows environment
-    dVector3 tmpNorm = {0, 0, 0}; // ensure we don't leak garbage
+    dVector3 tmpNorm = {dNaN, dNaN, dNaN}; // ensure we don't leak garbage
 
     if (checkCaps) {
         // Make it so we only need to check one cap