Both the forward and inverse problems of electrocardiography rely on the precise modelling of the anatomic and electrical properties of the thoracic tissues. This, in turn, requires good knowledge of the electrical anisotropy as well as conductivity inhomogeneity of the heart, lungs and the rest of the thorax. Cardiac electrical anisotropy is related to its microstructure (fibre length, density and orientation). We hereby present detailed three-dimensional (3D) meshes of the thorax and heart, using image data from contiguous 2D magnetic resonance (MR) imaging slices as well as a realistic 3D cardiac fibre orientation model that derives its data from high-resolution ex vivo human heart MR images and from histology specimens of heart tissue. Using specific software, we integrated the 3D thorax and heart meshes in one that addresses the related modelling requirements for the solution of the forward and inverse problems of electrocardiography.