[ODE] collision_trimesh_trimesh.cpp single precision problem

Duncan Frostick duncanf at f2s.com
Wed Oct 13 16:29:11 MST 2004


Ello all, cheers for the help with the matrices, works a treat now - but 
in the process of fixing it one of the things I did was to recompile ODE 
into it's single precision version, which threw up a compile error in 
collision_trimesh_trimesh.cpp:

..\collision_trimesh_trimesh.cpp(404 [and line 416]) : error C2664: 
'SimpleUnclippedTest' : cannot convert parameter 6 from 'dReal' to 
'double &' A reference that is not to 'const' cannot be bound to a 
non-lvalue

I didn't think much of it at first, I just cast the depth variable 
explicitly to (double&) to get it compiled... but now I'm starting 
trying to get things colliding, whenever I call dCollide in nearCallback 
I get this in debug:

Run-Time Check Failure #2 - Stack around the variable 'depth' was corrupted.

I knew immediately it had something to do with my ugly hack and after 
stepping through my code and ODE's it was the lines I'd changed causing 
the trouble.

So, how can I get single precision ODE to compile and not cause the 
trouble with stack corruption? The code I'm using is the latest CVS 
snapshot (ode-040926).

Cheers, Duncan


More information about the ODE mailing list