MCPcopy Create free account
hub / github.com/axmolengine/axmol / createEdgePolygon

Method createEdgePolygon

core/physics/PhysicsBody.cpp:267–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267PhysicsBody* PhysicsBody::createEdgePolygon(const Vec2* points,
268 int count,
269 const PhysicsMaterial& material,
270 float border /* = 1*/)
271{
272 PhysicsBody* body = new PhysicsBody();
273 if (body->init())
274 {
275 body->addShape(PhysicsShapeEdgePolygon::create(points, count, material, border));
276 body->setDynamic(false);
277 body->autorelease();
278 return body;
279 }
280
281 AX_SAFE_DELETE(body);
282
283 return nullptr;
284}
285
286PhysicsBody* PhysicsBody::createEdgeChain(const Vec2* points,
287 int count,

Callers

nothing calls this directly

Calls 5

createFunction · 0.85
autoreleaseMethod · 0.80
initMethod · 0.45
addShapeMethod · 0.45
setDynamicMethod · 0.45

Tested by

no test coverage detected