
Untitled
By: a guest on
Aug 10th, 2012 | syntax:
None | size: 0.47 KB | hits: 6 | expires: Never
What's the transform parameter in b2PolygonShape::TestPoint(p1, p2)?
b2PolygonShape polygon;
b2Vec2 vertices[] =
{
b2Vec2(300, 400),
b2Vec2(350, 400),
b2Vec2(300, 500),
b2Vec2(350, 500)
};
polygon.Set(vertices, 4);
if(polygon.TestPoint(b2Transform(), b2Vec2(301, 405)))
{
CCLOG(@"Point is inside");
}
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const;
btTransform identity; identity.SetIdentity();
polygon.TestPoint(identity, ...