How to get the list of body co-ordinates in my box2d world in Processing
<p>I need to get the list of co-ordinates for my box2d world- I'm trying to get a wrap around effect so that particles that go off the side of the screen appear on the opposite side. box2d is not well documented for Processing and the only example I could find was in java (I know its the parent language but it needs translating). This is <a href="http://www.emanueleferonato.com/2012/08/23/box2d-and-the-wraparound-effect/" rel="nofollow">here</a>. </p>

<p>I think the action is here:</p>



<pre class="lang-java prettyprint-override"><code>private function updateWorld(e:Event):void {
            world.Step(1/30,10,10);
            world.ClearForces();
            for (var b:b2Body=world.GetBodyList(); b; b=b.GetNext()) {
                if (b.GetType()==b2Body.b2_dynamicBody) {
                    if (b.GetJointList()==null) {
                        if (b.GetPosition().x*worldScale&gt;640) {
                            b.SetPosition(new b2Vec2(0,b.GetPosition().y));
                        }
                        if (b.GetPosition().x*worldScale&lt;0) {
                            b.SetPosition(new b2Vec2(640/worldScale,b.GetPosition().y));
                        }
                    }
                }
            }
            world.DrawDebugData();
        }
</code></pre>

<p>So I have tried translating this although I get stuck at the point of <code>world.GetBodyList</code>
I assume world is the instantiated box2d world I have created. I that is so, Processing doesn't seem to recognise this. Basically how to I just get an array of all the particle co-ordinates. Should be easier....</p>