Menu

#31 Ray, Box fix for Test_Collision

In_STABLE
closed
Bug Fix (53)
5
2012-09-14
2005-10-23
No

From sleepinghead at netzero.com Tue Jun 8 17:22:39 2004
From: sleepinghead at netzero.com (Martin Vito Cruz)
Date: Tue Jun 8 17:21:32 2004
Subject: [ODE] dGeomRaySet
Message-ID:
1D79B248-B9AB-11D8-B4BE-000A9573D532@netzero.com

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);

Discussion


Log in to post a comment.