AndEngine
                                
                                
                                
                                    AndEngine copied to clipboard
                            
                            
                            
                        Polygon implementation
I've just realized you've added Mesh and Polygon classes which I had already implemented. Please review what I have done so far and let me know what changes you'd like me to add, if any, so we won't do the same work twice.
BTW, I have some working examples in AndEngineExamples.
Hey,
I'm aware of your branch and it is highly appreciated! I'm concerned though about the heavy usage of (permament and temporary(->GC)) Vector2 objects (every single object in Java/Android has sth like ... 24 Bytes of overhead!), which is impossible to use for large games like DreamZoo ( https://market.android.com/details?id=com.zynga.dreamzoo ) where you have a shitload of huge VBOs and permanently fear running out of memory. So instead the stuff I'm doing works on float[]s, which can be directly passed into the VBO. I'll try to leverage as much of the stuff that you've done :) !!!
Btw there already is a Triangulation algorithm in the physics extension, but it also works on Vector2d objects, so I'm going to fix that one to work on a float[] too.
Thanks again!
I know what you mean, I've also faced the nasty out of memory exception in one my apps. ;)
I didn't know about the triangulation algorithm in the physics extension, are you planning to move that code to AndEngine ? Otherwise filled Polygons would need to be an extension too.
Your Mesh and my PolygonBase class are pretty much the same (except for the Vector2d stuff and the ability to update the mesh ), so it should be pretty straight forward to update the Ellipse, PolyLine and Line code to use your class. I can do the port if you're ok. However, I'll wait to update the Polygon class as it needs the triangulation algorithm.
Yes, I planning to move more stuff from the PhysicsExtension down to AndEngine itself. (Mainly the hull and triangulation algorithms)
Also updating the ShapeCollisionChecker to work on float[]s and vertexOffsetX/vertexOffsetY/vertexStride parameters as we speak.
The stuff I'm doing should be pretty much stable by the end of today. =)
Excellent! I'll pull your commits tomorrow morning. Getting asleep as we speak LOL.
I have just updated Ellipse and PolyLine to use the Mesh class. I'll update (filled) Polygons as soon as the triangulation algorithm goes into AndEngine. Have a nice weekend!
I've just updated Polygon class to use your Mesh class. It currently uses EarClippingTriangulator from Box2d, but once you've found a home sweet home for the triangulation algorithm in Andengine, I'll update the import.
I would love incorporate this into the my current AndEngine app (it's a CAD system that provides user-alterable polygons) but cannot apply the patch any longer. I wouldn't mind helping out after graduation (in a few weeks) to reconcile everything, I just need to know a desired game plan. What would help the situation? Or, conversely, is the issue dead and another solution implemented?
P.S. - Thanks for all the hard work that has been done on this project... it's great!