def get_window_pos(self): normalized_pos = (GameMath.inverse_lerp(0, Settings.SCREEN_WIDTH, self.x), GameMath.inverse_lerp(0, Settings.SCREEN_HEIGHT, self.y)) return (GameMath.no_clamp_lerp(0, Settings.WINDOW_WIDTH, normalized_pos[0]), GameMath.no_clamp_lerp(0, Settings.WINDOW_HEIGHT, normalized_pos[1]))
def get_window_vertices(self): window_verts = [] for v in self.get_camera_vertices(): normalized_vert = (GameMath.inverse_lerp(0, Settings.SCREEN_WIDTH, v[0]), GameMath.inverse_lerp(0, Settings.SCREEN_HEIGHT, v[1])) window_verts.append( (GameMath.no_clamp_lerp(0, Settings.WINDOW_WIDTH, normalized_vert[0]), GameMath.no_clamp_lerp(0, Settings.WINDOW_HEIGHT, normalized_vert[1]))) return window_verts