non-gon
    Preparing search index...

    Function ApplyTransformation

    • Applies a 2D geometric transformation based on the spatial relationship between two cylinders.

      This function computes the transformed 2D coordinates (v1, v2) for a given vertex pair, factoring in the relative cylinder heights (s1, s2), offsets (b, c), and angle alpha. The result is used to simulate the projection of 3D geometry into a 2D plane for collision analysis.

      Parameters

      • v1Ands1Signs: Vector2

        Sign multipliers for x and y components of the first cylinder vertex and its height (s1).

      • v2Ands2Signs: Vector2

        Sign multipliers for x and y components of the second cylinder vertex and its height (s2).

      • s1: number

        Half-height of the first cylinder.

      • s2: number

        Half-height of the second cylinder.

      • b: number

        Scalar offset along the common normal.

      • c: number

        Additional scalar shift in the coordinate system.

      • alpha: number

        Angle (in radians) between the projected axes of the two cylinders in 2D.

      Returns Vector2

      The transformed 2D coordinates corresponding to the input vertex pair.

      • Converts signs and scaling information into actual spatial positions.
      • Projects and rotates those positions based on the angle between axes (alpha).
      • Typically used in Vertex-Edge collision tests between cylinders.