コード例 #1
0
ファイル: shape.py プロジェクト: ddunwoody/cayley
 def draw(self, body):
     vertices = ()
     for vertex in self.shape.getVertices_b2Vec2():
         vertices += body.GetWorldPoint(vertex).tuple()
     set_color(self.colour)
     draw_polygon(vertices)
コード例 #2
0
ファイル: shape.py プロジェクト: ddunwoody/cayley
 def draw(self, body):
     center = body.GetWorldPoint(self.shape.localPosition).tuple()
     axis = body.angle
     radius = self.shape.radius
     set_color(self.colour)
     draw_circle(center, axis, radius)