Update ChainShape API

--HG--
branch : box2d-update
This commit is contained in:
Bill Meltsner
2011-09-23 22:32:39 -04:00
parent 367dbc2ecc
commit 6e7d83d7ea
4 changed files with 23 additions and 3 deletions
+9 -3
View File
@@ -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