def set_rotation_with_rotation_mat(
        self, rotation_mat, check_rotation=True
    ):
        """Set the camera rotation using a rotation matrix."""
        if check_rotation:
            assert is_rotation_mat(rotation_mat)
        self._rotation_mat = rotation_mat
        # We must change the quaternion as well.
        self._quaternion = Camera.rotation_matrix_to_quaternion(rotation_mat)
Set the camera rotation using a rotation matrix.
photogrammetry_importer/types/camera.py