[ODE] [ode] hiding ode from cocoa

Shamyl Zakariya shamyl at zakariya.net
Thu Mar 9 14:10:06 MST 2006


I've done this, and it's easy enough.

All you really have to do is to approach it two ways:

1) Keep as much ODE code *away* from cocoa as you can. After all,  
Cocoa/ObjC sounds like it's being used for the OS X glue layer, so it  
shouldn't be seeing any physics, anyway. In my own projects, I keep  
the Cocoa/ObjC code completely separate from my OpenGL and ODE, as  
well as any other engine-level details.

2) Any places where you simply *must* mix some ODE calls into ObjC/ 
ObjC++ files, see if you can get away with only including <ode/ 
common.h> -- at least as of version 0.5, that file doesn't seem to  
have any 'id' parameter names.

That said, approach #2 is a hack, just keep the two separate! Physics  
logic has no place being mixed with windowing/UI code!

shamyl zakariya™

On Mar 9, 2006, at 3:55 PM, Robert Ramirez wrote:

> hello list.
>
> i am a java programmer currently making the painful
> transition to c++, and hoping to take advantage of the
> great ode library.  I am working on a small,
> cross-platform demo project built using ogre3D and
> ode. the windows version is coming along fine, however
> the mac version is a cocoa application, and therefore
> (i think) i have run into the problem of id() being a
> reserved keyword in cocoa apps.
>
> i searched this list archives and found some posts
> which recommend encapsulating the ode code so that it
> is hidden from the cocoa code.
> I just don't really understand what that means,
> because i don't have enough experience with c++.
>
> if anyone can provide a very basic example of doing
> this so that i can use ode with cocoa, i would be very
> grateful.
>
> thankyou for your time.
>
> -rob
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list