# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405
r"""
Individual point operations.

Provides equality testing within a configurable tolerance, midpoint
computation between two points, 2D/3D get_circumcenter of three points, and
applying a 4x4 affine transformation matrix to a single point.
"""

import collections.abc
from raygeo.geo import types
import typing
__all__ = [
    "are_points_equal_3d",
    "get_circumcenter",
    "get_circumcenter_3d",
    "get_midpoint_3d",
    "rotate_point",
    "transform_point_3d",
]

def are_points_equal_3d(p1: types.Point3D, p2: types.Point3D, tolerance: float) -> bool:
    r"""
    Check if two 3D points are equal within tolerance.
    
    :param p1: First point (x, y, z).
    :param p2: Second point (x, y, z).
    :param tolerance: Maximum allowed difference.
    :returns: True if points are equal within tolerance.
    :complexity: O(1) time, O(1) space
    """

def get_circumcenter(a: types.Point, b: types.Point, c: types.Point) -> tuple[types.Point, float]:
    r"""
    Compute the get_circumcenter and radius of three 2D points.
    
    Returns the center of the unique circle passing through all three
    points along with its radius. Returns ``((0.0, 0.0), -1.0)`` when
    the points are collinear.
    
    :param a: First point (x, y).
    :param b: Second point (x, y).
    :param c: Third point (x, y).
    :returns: ``(center, radius)`` where center is ``(x, y)``.
    :complexity: O(1) time, O(1) space
    """

def get_circumcenter_3d(a: types.Point3D, b: types.Point3D, c: types.Point3D) -> typing.Optional[types.Point3D]:
    r"""
    Compute the get_circumcenter of three 3D points.
    
    Returns the center of the unique circle passing through all three
    points.  Returns ``None`` when the points are collinear.
    
    :param a: First point (x, y, z).
    :param b: Second point (x, y, z).
    :param c: Third point (x, y, z).
    :returns: Circumcenter (x, y, z) or ``None`` if collinear.
    :complexity: O(1) time, O(1) space
    """

def get_midpoint_3d(p1: types.Point3D, p2: types.Point3D) -> types.Point3D:
    r"""
    Get the midpoint between two 3D points.
    
    :param p1: First point (x, y, z).
    :param p2: Second point (x, y, z).
    :returns: Midpoint (x, y, z).
    :complexity: O(1) time, O(1) space
    """

def rotate_point(point: types.Point, angle: float) -> types.Point:
    r"""
    Rotate a 2D point around the origin.
    
    :param point: Point (x, y) to rotate.
    :param angle: Rotation angle in radians (counter-clockwise).
    :returns: Rotated point (x, y).
    :complexity: O(1) time, O(1) space
    """

def transform_point_3d(matrix: collections.abc.Sequence[collections.abc.Sequence[float]], x: float, y: float, z: float) -> types.Point3D:
    r"""
    Apply an affine transformation matrix to a 3D point.
    
    :param matrix: 4x4 affine transformation matrix.
    :param x: X coordinate.
    :param y: Y coordinate.
    :param z: Z coordinate.
    :returns: Transformed point (x, y, z).
    :complexity: O(1) time, O(1) space
    """

