[ODE] Syntax differences
Anselm Hook
anselm at hook.org
Tue Sep 23 14:24:51 MST 2003
The public C++ is a wrapper around the C interface... it is optional.
The C version is arguably a bit better; there are some slight complexities
with callbacks and suchlike using the C++ wrapper.
- a
On Tue, 23 Sep 2003, smythst wrote:
> I'm currently trying to get my head around ODE's nuances and have been playing
> around with test_chain2.cpp, as it's the simplest of the test files.
>
> However there's something weird about how it creates and uses ODE objects.
> test_chain2.cpp says stuff like :
>
> static dWorld world;
> static dSimpleSpace space (0);
>
> and
>
>
> world.setGravity (0,0,-0.5);
> dWorldSetCFM (world.id(),1e-5);
>
> whereas the documentation, and some of the other test files do it like:
>
> dWorldID world = dWorldCreate();
>
> and
> dWorldSetCFM (world, 1e-5);
>
>
> Why the difference? Is test_chain2.cpp 's way of doing it a legacy from an old
> version of ODE, is there a difference in performance, and which is better?
> I guess what I'm trying to ask is which way should I get into the habbit of
> using, creating the objects myself and accessing their member functions with a
> dot operator, or let ODE do it and just pass in the ID's to global functions
> that it gives me when I ask it to?
>
> Cheers guys.
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
More information about the ODE
mailing list