Minimum lap-time planning (MLTP) is a well-established problem in the race car industry to provide guidelines for drivers and optimize the vehicle's setup. In this paper, we tackle the 3D nature of the problem in its full extension, making no simplifying assumptions on the mechanics of the system. We propose a multibody vehicle model, described by rigorous dynamical equations. To effectively handle the resulting complexity, we devised an efficient direct dynamics computational method based on Featherstone's articulated-body algorithm (ABA). To solve the MLTP, we employed a direct-collocation technique, discretizing the problem so that all information of the 3D track is pre-processed and directly embedded into the discrete problem. This discretization approach turns out to be perfectly compatible with our vehicle model, leading to a solution in accessible computational time frames. The high level of detail of the model makes the proposed approach most useful for in-depth vehicle dynamics analyses on complex tracks. To substantiate the analysis, we provide a comparison with the results obtained by a double-track model on the Nürburgring Nordschleife circuit. Consistently with the average trend defined by the double track, the proposed model features a more dynamically rich behavior, realistically capturing the higher-order effects elicited by the sharp corners and the highly variable slope of the track. [ABSTRACT FROM AUTHOR]