Quick question...

Official forum for the Chipmunk2D Physics Library.
Post Reply
Jernau Gurgeh
Posts: 2
Joined: Wed Oct 10, 2007 7:41 am
Contact:

Quick question...

Post by Jernau Gurgeh »

Hi. Is there a simple way to retrieve the verts of a given Shape::Poly (their positions relative to Space, or - at least - to Body to which the Shape is bound)? I'm trying to slap together some sort of sandbox app in Ruby+Gosu+Chipmunk, but there doesn't seem to be a lot of documentation for Ruby API going around. Any suggestions?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Quick question...

Post by slembcke »

I guess I wasn't really planning on adding one, though it wouldn't be hard to do. I could make accessors for them, but setters are out of the question unfortunately.

Are you using OpenGL? You could just compile a display list at the same time that you create the shape. That's what I've done on occasion.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Jernau Gurgeh
Posts: 2
Joined: Wed Oct 10, 2007 7:41 am
Contact:

Re: Quick question...

Post by Jernau Gurgeh »

slembcke wrote:I could make accessors for them, but setters are out of the question unfortunately.
Accessors (readers - to be precise) are just what I need. Maybe my approach is totally wrong, but I thought it could be useful (for prototyping purposes, for instance) to be able to draw an object just by iterating through its verts and plotting lines between them.
slembcke wrote:Are you using OpenGL? You could just compile a display list at the same time that you create the shape. That's what I've done on occasion.
Since this is one of my first experiences with graphics programming, and because I do it strictly for fun - I am NOT using OpenGL, no sir - I use Gosu. No display lists for me :(

Thanks a lot.
Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests