# Source code for tabletree.src.api.view_util.arrow

    from typing import Self

    from .point import Vector3

    class Arrow:
        _head: list[float]
        _tail: list[float]
        _double_headed: bool
        _reverse_headed: bool
        _head_length: float | None

        def __init__(
            self,
            head: Vector3,
            tail: Vector3,
        ):
            """Create an arrow.

            Args:
                head:
                    Where the arrow ends.
                tail:
                    Where the arrow starts.
            """
            self._head = list(head)
            self._tail = list(tail)
            self._double_headed = False
            self._reverse_headed = False
            self._head_length = None

        def set_options(
            self,
            double_headed: bool = False,
            reverse_headed: bool = False,
            head_length: float = -1.0,
        ) -> Self:
            """Set options for the arrow.

            Args:
                double_headed:
                    If true, arrowheads are drawn at both ends of the arrow.
                reverse_headed:
                    If true, the arrow becomes inward-headed.
                head_length:
                    The length of the arrowhead(s).
            """
            self._double_headed = double_headed
            self._reverse_headed = reverse_headed
            self._head_length = head_length
            return self