Pātuhitia tēnei: The structure of affine buildings