// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2014 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 "random_points_on_mesh.h" #include "random_points_on_mesh_intrinsic.h" #include "doublearea.h" template < typename DerivedV, typename DerivedF, typename DerivedB, typename DerivedFI, typename DerivedX, typename URBG> IGL_INLINE void igl::random_points_on_mesh( const int n, const Eigen::MatrixBase & V, const Eigen::MatrixBase & F, Eigen::PlainObjectBase & B, Eigen::PlainObjectBase & FI, Eigen::PlainObjectBase & X, URBG && urbg) { using namespace Eigen; using namespace std; typedef typename DerivedV::Scalar Scalar; typedef Matrix VectorXs; VectorXs dblA; doublearea(V,F,dblA); random_points_on_mesh_intrinsic(n,dblA,B,FI,urbg); X = DerivedX::Zero(B.rows(),V.cols()); for(int x = 0;x, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, std::mt19937_64&>(int, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::mt19937_64&); template void igl::random_points_on_mesh, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, std::minstd_rand0&>(int, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::minstd_rand0&); template void igl::random_points_on_mesh, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, std::minstd_rand&>(int, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::minstd_rand&); template void igl::random_points_on_mesh, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, std::mt19937 >(int, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::mt19937&&); template void igl::random_points_on_mesh, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, std::mt19937&>(int, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::mt19937&); template void igl::random_points_on_mesh, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, std::mt19937_64&>(int, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::mt19937_64&); template void igl::random_points_on_mesh, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, std::mt19937 >(int, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::mt19937&&); template void igl::random_points_on_mesh, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, std::mt19937&>(int, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::mt19937&); #endif