We propose a new approach towards determining the distribution of mechanical and acoustic wave energy in complex built-up structures. The technique interpolates between standard statistical energy analysis (SEA) and full ray tracing containing both these methods as limiting cases. By writing the flow of ray trajectories in terms of linear phase space operators, it is suggested to reformulate ray-tracing algorithms in terms of boundary operators containing only short ray segments. SEA can now be identified as a low resolution ray-tracing algorithm and typical SEA assumptions can be quantified in terms of the properties of the ray dynamics. The new technique presented here enhances the range of applicability of standard SEA considerably by systematically incorporating dynamical correlations wherever necessary. Some of the inefficiencies inherent in typical ray-tracing methods can be avoided using only a limited amount of the geometrical ray information. The new dynamical theory— dynamical energy analysis (DEA)—thus provides a universal approach towards determining wave energy distributions in complex structures in the high-frequency limit.