// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2016 Alec Jacobson // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. #include "flood_fill.h" #include template IGL_INLINE void igl::flood_fill( const Eigen::MatrixBase& res, Eigen::PlainObjectBase & S) { using namespace Eigen; using namespace std; typedef typename DerivedS::Scalar Scalar; const auto flood = [&res,&S] ( const int xi, const int yi, const int zi, const int signed_xi, const int signed_yi, const int signed_zi, const Scalar s) { // flood fill this value back on this row for(int bxi = xi;signed_xi<--bxi;) { S(bxi+res(0)*(yi + res(1)*zi)) = s; } // flood fill this value back on any previous rows for(int byi = yi;signed_yi<--byi;) { for(int xi = 0;xi::quiet_NaN(); for(int zi = 0;zi, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template void igl::flood_fill, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template void igl::flood_fill, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&); // generated by autoexplicit.sh template void igl::flood_fill, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&); template void igl::flood_fill, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&); #endif