[ODE] Re: ODE c++ API

Martin C. Martin martin at metahuman.org
Thu Mar 25 13:49:50 MST 2004


Alright, I resubscribed.

> The current c++ wrappers function as a thin layer ontop of the C API,
 > which i think works well for c++ programmers.

"Thin layer" just means that Russ did a good job with his object 
oriented design, so that IDs that ODE returns corresponded to objects, 
and function calls to methods.  That made the wrapper trivial to 
implement, although it required a surprizing amount of tweaking to get 
it where I wanted.  I suggest you do the same with Python.

 > But, for the purposes of making the python wrappers, they need to be 
thicker,
> and more object oriented.

Hmm, why is this?  Just because "thin is trivial, so thicker is better"?

> The big change i guess would be enclosing the dReals inside a new
> vector or matrix object.

I've never integrated C code into python, but can't it access a 
contiguous set of floats as a vector or an array?  Doesn't it already 
have types that do that?

> If dxSpace is being used by a
> class, then dxSpace must also be exposed to boost,

I don't see why.  Can't Python manipulate dxSpace through an ID, the way 
it presumably does with everything else?  You could store the handle in 
the "user data" field.

- Martin



#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################


More information about the ODE mailing list