Modeling charge-sharing effects in pixellated CZT detectors