jakke-graphics-ts
    Preparing search index...

    Function getCollisionLineWithTriangleSurface

    • Calculates the intersection point between a line and the surface of a triangle in 3D space.

      The function returns the intersection point as a Vertex3d if the line intersects the triangle surface, or undefined if there is no valid intersection (e.g., the intersection point lies outside the triangle).

      Parameters

      • line: Line

        The line to test for intersection, represented by two points (p0 and p1).

      • triangle: Triangle

        The triangle surface, represented by three vertices (p0, p1, and p2).

      Returns undefined | Vertex3d

      The intersection point as a Vertex3d if the line intersects the triangle surface, otherwise undefined.