Ejemplo n.º 1
0
    def test_rotation(self):
        transformed_points = _TransformPoints(self.points,
                                              self.rotation.matrix())
        expected_rotated_points = np.array([[-1, 1, 0], [-1, 2, 0]]).T

        self.assertTrue(
            np.allclose(transformed_points, expected_rotated_points))
Ejemplo n.º 2
0
    def test_translation(self):
        transformed_points = _TransformPoints(self.points,
                                              self.translation.matrix())
        expected_translated_points = np.array([[2, 3, 3], [3, 3, 3]]).T

        self.assertTrue(
            np.allclose(transformed_points, expected_translated_points))