[ODE] dGeomRaySet

Martin Vito Cruz sleepinghead at netzero.com
Tue Jun 8 17:22:39 MST 2004


Hi,
I've been playing around with ODE (on Mac OS X), and I've
noticed that test_ray_and_box fails in test_collision.exe.
The patch below seems to fix the problem.  Thanks for taking
a look.

Index: collision_std.cpp
===================================================================
RCS file: /cvsroot/opende/ode/ode/src/collision_std.cpp,v
retrieving revision 1.15
diff -u -r1.15 collision_std.cpp
--- collision_std.cpp   28 May 2004 15:28:42 -0000      1.15
+++ collision_std.cpp   9 Jun 2004 00:21:58 -0000
@@ -444,13 +444,18 @@
    dUASSERT (g && g->type == dRayClass,"argument not a ray");
    dReal* rot = g->R;
    dReal* pos = g->pos;
+  dVector3 n;
    pos[0] = px;
    pos[1] = py;
    pos[2] = pz;

-  rot[0*4+2] = dx;
-  rot[1*4+2] = dy;
-  rot[2*4+2] = dz;
+  n[0] = dx;
+  n[1] = dy;
+  n[2] = dz;
+  dNormalize3(n);
+  rot[0*4+2] = n[0];
+  rot[1*4+2] = n[1];
+  rot[2*4+2] = n[2];
    dGeomMoved (g);
  }



More information about the ODE mailing list