嗨,在 BOX2d 中,我有一个夹具,我通过以下方式知道它的多边形:
b2Shape *sh = fixture->GetShape();
NSLog(@"Type %d", sh->GetType());
//this returns 1, means its a polygon.
现在如何获取顶点以便确切地知道它具有什么形状,即矩形正方形等。
嗨,在 BOX2d 中,我有一个夹具,我通过以下方式知道它的多边形:
b2Shape *sh = fixture->GetShape();
NSLog(@"Type %d", sh->GetType());
//this returns 1, means its a polygon.
现在如何获取顶点以便确切地知道它具有什么形状,即矩形正方形等。