[ODE] GIMPACT with doubles

Remi Ricard remi.ricard at simlog.com
Tue Oct 31 09:33:02 MST 2006


Hi,

> i tried to build ODE with doubles and gimpact enabled.
> (premake --target vs2005 --with-doubles --with-gimpact --with-tests)
>
> I got following errors:
>
> ode\src\collision_trimesh_box.cpp(1330) : error C2664: 
> 'gim_trimesh_get_triangle_vertices' : cannot convert parameter 3 from 
> 'dVector3' to 'float []'
>          Types pointed to are unrelated; conversion requires 
> reinterpret_cast, C-style cast or function-style cast
>   
-- cut --
> Is there smething I'm doing wrong? Or if I need doubles I just cannot 
> use gimpact?
>   
No, I'm, getting the same error.

What I did was to #include <ode/config.h> in gim_math.h and replace the 
#define of GREAL float
by
#if defined(dSINGLE)
typedef float GREAL;
#elif defined(dDOUBLE)
typedef double GREAL;
#else
#error You must #define dSINGLE or dDOUBLE
#endif

as it is done in include/ode/common.h

Then at 2 place you have to change float to GREAL and everything compile 
correctly

I will create a patch for that soon.



The problem I see now it vec3f can be a double and the "f" can be 
misleading.
Should the name change completely to use dVector3 (which is really an 
array of 4)
or have Gimpact have its own gVec3 ??


Remi


More information about the ODE mailing list