mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Update ChainShape API
--HG-- branch : box2d-update
This commit is contained in:
@@ -71,23 +71,29 @@ namespace box2d
|
||||
return new EdgeShape(&e);
|
||||
}
|
||||
|
||||
int ChainShape::getChildCount() const
|
||||
{
|
||||
b2ChainShape * c = (b2ChainShape *)shape;
|
||||
return c->GetChildCount();
|
||||
}
|
||||
|
||||
int ChainShape::getVertexCount() const
|
||||
{
|
||||
b2ChainShape * c = (b2ChainShape *)shape;
|
||||
return c->GetVertexCount();
|
||||
return c->m_count;
|
||||
}
|
||||
|
||||
b2Vec2 ChainShape::getVertex(int index) const
|
||||
{
|
||||
b2ChainShape * c = (b2ChainShape *)shape;
|
||||
const b2Vec2 & v = c->GetVertex(index);
|
||||
const b2Vec2 & v = c->m_vertices[index];
|
||||
return Physics::scaleUp(v);
|
||||
}
|
||||
|
||||
const b2Vec2 * ChainShape::getVertices() const
|
||||
{
|
||||
b2ChainShape * c = (b2ChainShape *)shape;
|
||||
return c->GetVertices();
|
||||
return c->m_vertices;
|
||||
}
|
||||
|
||||
} // box2d
|
||||
|
||||
Reference in New Issue
Block a user