Glass thickness and index measurement using optical sampling by cavity tuning.