Hi,
Is there a way to check joint type with an unmodified Chipmunk distribution?
thanks in advance
cpJoint type
-
- Posts: 13
- Joined: Thu Jan 03, 2008 11:27 am
- Contact:
Re: cpJoint type
I think you can define a method for each joint class which return the joint type.
In ruby, you can also use the .class method, which return the class of the object:
In ruby, you can also use the .class method, which return the class of the object:
Code: Select all
joint = CP::Joint::Pin.new
joint.class
=> CP::Joint::Pin
-
- Posts: 22
- Joined: Thu Jan 03, 2008 1:36 pm
- Contact:
Re: cpJoint type
sorry, I forgot to say my question was for the C interface.
-
- Posts: 3
- Joined: Fri Jan 04, 2008 4:02 am
- Contact:
Re: cpJoint type
I know you said you wanted it for an unmodified version, but W. P. van Paassen made an easily-applied patch --you just swap out cpJoint.h and cpJoint.c and recompile. You can find it here: http://www.slembcke.net/forums/viewtopic.php?f=3&t=17
If you need it compiled as a lib or a dll for Windows, I have patched copies of both lying around.
If you need it compiled as a lib or a dll for Windows, I have patched copies of both lying around.
-
- Posts: 22
- Joined: Thu Jan 03, 2008 1:36 pm
- Contact:
Re: cpJoint type
I have seen this post, but the reason I want to use an unchanged Chipmunk is because I'm writing a language binding, so I don't want every user to have to patch Chipmunk.
I would prefer to make it simple for users.
I would prefer to make it simple for users.
Who is online
Users browsing this forum: No registered users and 10 guests