ContactList Ordering?

Jun 29, 2010 at 2:11 AM
Edited Jun 29, 2010 at 2:55 AM

So I am having a problem with understanding what the ContactList Does, I have this code
<!-- m -->http://pastebin.com/KBFuVFma<!-- m -->

I have 9 balls on the bottom of the screen, with each userdata set from 0 to 9, so you have
0,1,2,3,4,5,6,7,8,9 for all the balls.

my question is how does Contactlist work or is there a bug somewhere? Ball 0 is not touching ball 2, and ball 2 is not touching ball 0.



So here is what i get, when i trace it out.

'0 and 2' '0 and 1'
'1 and 2' '0 and 1'
'0 and 2' '2 and 3' '1 and 2'
'3 and 4' '2 and 3'
'4 and 5' '3 and 4'
'5 and 6' '4 and 5'
'6 and 7' '5 and 6'
'7 and 8' '6 and 7'
'8 and 9' '7 and 8'
'8 and 9'

image
<!-- m -->http://imgur.com/uopzG.png<!-- m -->

Coordinator
Jun 29, 2010 at 6:46 AM

What does your output mean?  I can't tell from the source code you linked, it doesn't try to output anything or touch user data.

ContactList is a linked list of ContactEdge's which contains the information for a contact point between two bodies (and in particular two fixtures).

When you talk about setting user data from 0 to 9 are you talking about user data on the fixture or on the body?  These user data values are set independently.

Jun 29, 2010 at 7:55 AM
nfurtwangler wrote:

What does your output mean?  I can't tell from the source code you linked, it doesn't try to output anything or touch user data.

ContactList is a linked list of ContactEdge's which contains the information for a contact point between two bodies (and in particular two fixtures).

When you talk about setting user data from 0 to 9 are you talking about user data on the fixture or on the body?  These user data values are set independently.

Nevermind, I just can't count.