# Path: sunds/core/tf_geometry/cameras.py
# class AbstractCamera(abc.ABC):
# class PinholeCamera(AbstractCamera):
#   def project(self, points: TensorLike) -> tf.Tensor:
#   def unproject(self,
#                 points: Optional[TensorLike] = None,
#                 to_rays: bool = True) -> tf.Tensor:
#   def pixel_centers(self) -> tf.Tensor:
#   def __post_init__(self):
#   def from_fov(
#       cls,
#       *,
#       image_width: int,
#       image_height: int,
#       horizontal_fov_in_degrees: float,
#       vertical_fov_in_degrees: Optional[float] = None) -> 'PinholeCamera':
#     def focal_length_from_fov(image_size, fov_in_degrees):
#   def from_intrinsics(
#       cls,
#       *,
#       image_size_in_pixels: Tuple[int, int],
#       focal_length_in_pixels: Tuple[float, float],
#       principal_point_in_pixels: Optional[Tuple[float, float]] = None,
#       skew: float = 0.0,
#   ) -> 'PinholeCamera':
#   def project(self, points: TensorLike) -> tf.Tensor:
#   def unproject(self,
#                 points: Optional[TensorLike] = None,
#                 to_rays: bool = True) -> tf.Tensor:
#   def pixel_centers(self) -> tf.Tensor:
#   K: TensorLike  # pylint: disable=invalid-name
# 
# Path: sunds/core/tf_geometry/isometry.py
# class Isometry:
#   R: TensorLike  # pylint: disable=invalid-name
#   def __post_init__(self):
#   def from_matrix(cls, matrix: TensorLike) -> 'Isometry':
#   def matrix3x4(self) -> tf.Tensor:
#   def matrix4x4(self) -> tf.Tensor:
#   def inverse(self) -> 'Isometry':
#   def compose(self, other: 'Isometry') -> 'Isometry':
#   def transform_points(self, points: TensorLike) -> tf.Tensor:
#   def __mul__(
#       self, other: Union['Isometry',
#                          TensorLike]) -> Union['Isometry', tf.Tensor]:


from typing import Dict
from sunds.core.tf_geometry import cameras
from sunds.core.tf_geometry import isometry
import tensorflow as tf
# Copyright 2022 The sunds Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Geometry functions related to 3D rays."""



TensorLike = tf.types.experimental.TensorLike

TensorDict = Dict[str, tf.Tensor]


def rays_from_image_points(camera: cameras.CameraType,

# Path: sunds/core/tf_geometry/cameras.py
# class AbstractCamera(abc.ABC):
# class PinholeCamera(AbstractCamera):
#   def project(self, points: TensorLike) -> tf.Tensor:
#   def unproject(self,
#                 points: Optional[TensorLike] = None,
#                 to_rays: bool = True) -> tf.Tensor:
#   def pixel_centers(self) -> tf.Tensor:
#   def __post_init__(self):
#   def from_fov(
#       cls,
#       *,
#       image_width: int,
#       image_height: int,
#       horizontal_fov_in_degrees: float,
#       vertical_fov_in_degrees: Optional[float] = None) -> 'PinholeCamera':
#     def focal_length_from_fov(image_size, fov_in_degrees):
#   def from_intrinsics(
#       cls,
#       *,
#       image_size_in_pixels: Tuple[int, int],
#       focal_length_in_pixels: Tuple[float, float],
#       principal_point_in_pixels: Optional[Tuple[float, float]] = None,
#       skew: float = 0.0,
#   ) -> 'PinholeCamera':
#   def project(self, points: TensorLike) -> tf.Tensor:
#   def unproject(self,
#                 points: Optional[TensorLike] = None,
#                 to_rays: bool = True) -> tf.Tensor:
#   def pixel_centers(self) -> tf.Tensor:
#   K: TensorLike  # pylint: disable=invalid-name
# 
# Path: sunds/core/tf_geometry/isometry.py
# class Isometry:
#   R: TensorLike  # pylint: disable=invalid-name
#   def __post_init__(self):
#   def from_matrix(cls, matrix: TensorLike) -> 'Isometry':
#   def matrix3x4(self) -> tf.Tensor:
#   def matrix4x4(self) -> tf.Tensor:
#   def inverse(self) -> 'Isometry':
#   def compose(self, other: 'Isometry') -> 'Isometry':
#   def transform_points(self, points: TensorLike) -> tf.Tensor:
#   def __mul__(
#       self, other: Union['Isometry',
#                          TensorLike]) -> Union['Isometry', tf.Tensor]:


# Path: sunds/core/tf_geometry/rays.py
from typing import Dict
from sunds.core.tf_geometry import cameras
from sunds.core.tf_geometry import isometry
import tensorflow as tf

# Copyright 2022 The sunds Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Geometry functions related to 3D rays."""



TensorLike = tf.types.experimental.TensorLike

TensorDict = Dict[str, tf.Tensor]


def rays_from_image_points(camera: cameras.CameraType,

                           world_from_camera: isometry.Isometry,