The km3 simulation package is the standard software suite used by the ANTARES collaboration to simulate the emission and detection of Cherenkov photons. Here, the three programs comprising km3 are described, and the performance of km3's latest revision evaluated. Particular focus is paid to the use of the one-particle approximation, by which Cherenkov emission from hadronic cascades is simulated, and its applicability to ANTARES, KM3NeT, and ORCA.