Function worldToRTCPositions

  • Converts a flat array of World-space positions to RTC positions.

    This function computes the RTC positions for an entire array of World-space coordinates. It returns both the RTC positions and the RTC center, ensuring the data is aligned with the RTC grid. If conversion is not needed, the function will return false.

    Parameters

    • worldPositions: FloatArrayParam

      A flat array of World-space 3D positions.

    • rtcPositions: FloatArrayParam

      The resulting flat array of RTC positions.

    • rtcCenter: FloatArrayParam

      The computed RTC center position.

    • OptionalcellSize: number = RTC_CELL_SIZE

      The size of each coordinate cell within the RTC system.

    Returns boolean

    Returns true if conversion to RTC was needed, otherwise false.