def get_world_vertices(self): world_verts = [] for v in self.vertices: s_x = v[0] * self.scale s_y = v[1] * self.scale scaled_vert = (s_x, s_y) r_x = scaled_vert[0] * math.cos( self.rotation - self.y) + scaled_vert[1] * math.sin(self.rotation - self.y) r_y = -scaled_vert[0] * math.sin( self.rotation - self.y) + scaled_vert[1] * math.cos(self.rotation - self.y) cart_pos = GameMath.cil2cart(self.x, self.y) panned_x = r_x + cart_pos[0] panned_y = r_y + cart_pos[1] world_verts.append((panned_x, panned_y)) return world_verts
def get_world_pos(self): return GameMath.cil2cart(self.x, self.y)