I need to render the Jbox bodies, and I'm struggling to find a way to extract the needed information.
How do I loop through the bodies, and check what shape they are?
I found this method jBoxWorld.getBodyList(); and it returns Body class, and as I looked at the source code, that body class is supposed to be a list of jBox bodies, and the comments in the source code tell me that I should use bodyList.m_next to loop through the bodies, which are also Body class.
JBox2D is extremely confusing. I have no idea how to get any information out from the bodies or the JBox world.
Also, once I get the bodies, how do I check what shape they have?
And how do I get the information of custom shaped polygon's corners' positions?
How do I loop through the bodies, and check what shape they are?
I found this method jBoxWorld.getBodyList(); and it returns Body class, and as I looked at the source code, that body class is supposed to be a list of jBox bodies, and the comments in the source code tell me that I should use bodyList.m_next to loop through the bodies, which are also Body class.
JBox2D is extremely confusing. I have no idea how to get any information out from the bodies or the JBox world.
Also, once I get the bodies, how do I check what shape they have?
And how do I get the information of custom shaped polygon's corners' positions?