Box2D Forums

It is currently Thu Jul 31, 2014 8:41 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Sep 14, 2011 7:12 pm 
Offline

Joined: Wed Sep 14, 2011 6:37 pm
Posts: 1
Hi,

I am a newbie using Box2D, and I have a doubt about the b2Body m_fixtureList attribute..

When we create a b2Body and create a fixture for it, we can get the fixture using GetFixtureList() method. The name fixtureList suggests we can have more than a fixture to compose a rigid body (to build a body by combination of shapes and material properties). But looking at the source code, the attribute m_fixtureCount parameter is private, and I've tried to add more than one fixture and then run the fixtureList with getNext() method, but it seems that it stores only one fixture per body. The question is: is the fixtureList* attribute really a list (a dynamic array of fixtures) or it stores only one fixture?

thanks


Top
 Profile  
 
PostPosted: Sat Sep 17, 2011 1:17 pm 
Offline

Joined: Sat Jul 26, 2008 5:04 pm
Posts: 28
it is a list.


Top
 Profile  
 
PostPosted: Tue Sep 27, 2011 1:01 pm 
Offline

Joined: Mon Apr 28, 2008 8:46 am
Posts: 19
As I understand it the fixture list is stored as a linked list instead of an array, meaning that each individual fixture stores the pointer to the next fixture on the list.
http://en.wikipedia.org/wiki/Linked_list


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group