Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Function lineLineIntersection

    • An internal helper method for computing the intersection between two infinite-length lines. Adapted from http://paulbourke.net/geometry/pointlineplane/.

      Parameters

      • a: Point

        The first endpoint of segment AB

      • b: Point

        The second endpoint of segment AB

      • c: Point

        The first endpoint of segment CD

      • d: Point

        The second endpoint of segment CD

      • Optionaloptions: { t1?: boolean } = {}

        Options which affect the intersection test

        • Optionalt1?: boolean

          Return the optional vector distance from C to D on CD

      Returns LineIntersection | null

      An intersection point, or null if no intersection occurred