Yuri Albuquerque 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.

theoretically you should be able to store a struct in a ruby object that 
can contain pointers to anything.

http://github.com/rdp/google_hash

is an example project that has pointers to a C++ object [a google hash 
map].

The trick is wrapping all your ruby code in an extern "C" { } block.

GL.
-r
-- 
Posted via http://www.ruby-forum.com/.