예제 #1
0
    def points_to_pixel_coords(self, points):
        distance_ratios = np.divide(self.camera_distance,
                                    self.camera_distance - points[:, 2])
        scale_factors = interpolate(0, 1, distance_ratios)
        adjusted_points = np.array(points)
        for i in 0, 1:
            adjusted_points[:, i] *= scale_factors

        return Camera.points_to_pixel_coords(self, adjusted_points)
예제 #2
0
 def points_to_pixel_coords(self, points):
     return Camera.points_to_pixel_coords(self, np.apply_along_axis(self.mapping_func, 1, points))
예제 #3
0
    def points_to_pixel_coords(self, points):
        matrix = self.get_view_transformation_matrix()
        new_points = np.dot(points, matrix.T)
        self.space_center = self.moving_center.points[0]

        return Camera.points_to_pixel_coords(self, new_points)
예제 #4
0
 def points_to_pixel_coords(self, points):
     return Camera.points_to_pixel_coords(self, np.apply_along_axis(self.mapping_func, 1, points))