non-gon
    Preparing search index...

    Function VertexEdgeTestFunction

    • Performs a Vertex-Edge test as part of a collision detection algorithm between two cylinders.

      The function transforms 2D representations of the vertices of two cylinders' cross-sections and calculates potential intersection points in the transformed space. It then validates those points via a helper function (checkVertices) to determine whether a vertex-edge intersection occurs.

      Parameters

      • s1: number

        Half-height of the first cylinder.

      • s2: number

        Half-height of the second cylinder.

      • r1: number

        Radius of the first cylinder.

      • r2: number

        Radius of the second cylinder.

      • a: number

        Scalar parameter used in geometric transformation (commonly center-to-center distance).

      • b: number

        Scalar offset parameter used in transformation.

      • c: number

        Scalar offset parameter used in transformation.

      • alpha: number

        Angle (in degrees) between the cylinder axes projected in 2D.

      • cylinder1: Cylinder

        The first cylinder object.

      • cylinder2: Cylinder

        The second cylinder object.

      • commonNormal: Vector3

        The shortest vector between the axes of the two cylinders.

      Returns boolean

      True if a vertex-edge intersection is detected; false otherwise.

      • Uses ApplyTransformation to convert local vertex coordinates into a shared frame.
      • Checks two possible roots (u1, u2) from solving the cylinder-circle intersection equation.
      • Delegates detailed geometric checks to checkVertices.
      • Assumes the use of a coordinate space where both cylinders have simplified square cross-sections.