//#####################################################################
// Copyright 2021, Craig Schroeder.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
#ifndef __Visit_Ray_Grid__
#define __Visit_Ray_Grid__

#include <Core/Vectors/VECTOR.h>
#include <functional>
namespace PhysBAM{

template<class TV> class GRID;
template<class TV> class RAY;

// Visit grid cells along the ray in order, calling func on each cell visited.
// If func returns false, finish early.
template<class TV> void
Visit_Ray_Grid(const RAY<TV>& ray,const GRID<TV>& grid,int ghost,
    const std::function<bool(const VECTOR<int,TV::m>&,typename TV::SCALAR,typename TV::SCALAR)>& func);
}
#endif
