You need to either build your own C wrapper around the C++ and expose that
in Ruby as you cannot just map C++ objects to Ruby's C-API.

Or you use a tool like Rice ( http://rice.rubyforge.org ) or SWIG to wrap
the C++ into Ruby.

I would also recommend looking into Rb++ ( http://rbplusplus.rubyforge.org )
which IMO (though slightly biased) is easier to deal with than SWIG.

Jason

On Thu, Dec 17, 2009 at 10:42 AM, Yuri Albuquerque
<yuridenommus / gmail.com>wrote:

> I'm trying to make an interface between PhysX and Ruby and I got stucked
> on the very beggining. XD
>
> I have an NxPhysicsSDK pointer, pointing to an object (duh) and I would
> like to store this pointer into an Ruby VALUE object. I don't really
> need to see it's value outside the extension class (being clear:
> everything would be encapsulated), but I only find conversions from C
> pointers, not C++ objects.
>
> Does anyone have a tip?
> --
> Posted via http://www.ruby-forum.com/.
>
>