| 211 | } |
| 212 | |
| 213 | PhysicsBody* PhysicsBody::createPolygon(const Vec2* points, |
| 214 | int count, |
| 215 | const PhysicsMaterial& material, |
| 216 | const Vec2& offset) |
| 217 | { |
| 218 | PhysicsBody* body = new PhysicsBody(); |
| 219 | if (body->init()) |
| 220 | { |
| 221 | body->addShape(PhysicsShapePolygon::create(points, count, material, offset)); |
| 222 | body->autorelease(); |
| 223 | return body; |
| 224 | } |
| 225 | |
| 226 | AX_SAFE_DELETE(body); |
| 227 | return nullptr; |
| 228 | } |
| 229 | |
| 230 | PhysicsBody* PhysicsBody::createEdgeSegment(const Vec2& a, |
| 231 | const Vec2& b, |
nothing calls this directly
no test coverage detected