views:

116

answers:

2

I need a library that can manage polygon modeling and basic transformation like rotating and translating. I'd rather not redevelop everything from scratch Thanks

+1  A: 

Is there anything wrong with CGPath and CGAffineTransform? You can use CGPathApply to get data back out of transformed paths.

Ed Marty
It's for opengl. I need to give opengl the vertex already rotated/transformed.
CodeFlakes
My suggestion, using the CGPath framework, would be to create the path using normal methods, use CGPathApplyAffineTransform, then call CGPathApply to get the transformed path to send to opengl. If you need to be doing that a lot, though, you will probably want to use something else.
Ed Marty
That's an interesting idea. Surely not what CGPath was intend to do but I could give it a try. I wonder what the performance would be though.
CodeFlakes
A: 

Answering my own question. Another way would be to use an open source physic engine. I only need 2D to Box2D and Chipmunk are some candidate though it's a bit overkill as I only need the polygon manipulation stuff and not the physics

CodeFlakes