Beispiel #1
0
 def draw_collisions(self):
     x1, y1 = self.body.local_to_world(self.segment.a)
     x2, y2 = self.body.local_to_world(self.segment.b)
     draw.line(x1, y1, x2, y2)
     r = self.circle.radius
     x, y = self.body.local_to_world(self.circle.center)
     draw.ellipse_outline(x-r, y-r, x+r, y+r)
Beispiel #2
0
 def draw_collisions(self):
     if self.line_length != 0:
         x1, y1 = self.gluebody.body.local_to_world(self.segment.a)
         x2, y2 = self.gluebody.body.local_to_world(self.segment.b)
         draw.line(x1, y1, x2, y2)
     if self.circle2_rad > 0:
         r = self.circle2.radius
         x, y = self.gluebody.body.local_to_world(self.circle2.center)
         draw.ellipse_outline(x-r, y-r, x+r, y+r)
     r = self.circle.radius
     x, y = self.gluebody.body.local_to_world(self.circle.center)
     draw.ellipse_outline(x-r, y-r, x+r, y+r)
Beispiel #3
0
 def draw_collisions(self):
     r = self.circle.radius
     x, y = physics.static_body.local_to_world(self.circle.center)
     draw.ellipse_outline(x - r, y - r, x + r, y + r)