Unified theoretical model for calculating laser-induced wavefront distortion in optical materials