src/mcrt/photon_map.cc
// Sorts the photon map based on the current kd-node's splitting axis.
Sorts the photon map based on the current kd-node's splitting axis.
Sorts the photon map based on the current kd - node ' s splitting axis .
void mcrt::PhotonMap::KdNode::sort(std::vector<const Photon*>& photons) {
    std::sort(photons.begin(), photons.end(),
              [this](const Photon* a, const Photon* b) {
        return a->position[axis] < b->position[axis];
    });
}
void mcrt :: PhotonMap :: KdNode :: sort ( std :: vector < const Photon * > & photons ) { std :: sort ( photons . begin ( ) , photons . end ( ) , [ this ] ( const Photon * a , const Photon * b ) { return a -> position [ axis ] < b -> position [ axis ] ; } ) ; }
Sorts the photon map based on the current kd-node's splitting axis.
Sorts the photon map based on the current kd - node ' s splitting axis .