mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-24 09:11:23 -06:00
Building igl statically and moving to the dep scripts
Fixing dep build script on Windows and removing some warnings. Use bundled igl by default. Not building with the dependency scripts if not explicitly stated. This way, it will stay in Fix the libigl patch to include C source files in header only mode.
This commit is contained in:
parent
89e39e3895
commit
2ae2672ee9
1095 changed files with 181 additions and 5 deletions
93
src/libigl/igl/max_faces_stopping_condition.cpp
Normal file
93
src/libigl/igl/max_faces_stopping_condition.cpp
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
// This file is part of libigl, a simple c++ geometry processing library.
|
||||
//
|
||||
// Copyright (C) 2016 Alec Jacobson <alecjacobson@gmail.com>
|
||||
//
|
||||
// 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 "max_faces_stopping_condition.h"
|
||||
|
||||
IGL_INLINE void igl::max_faces_stopping_condition(
|
||||
int & m,
|
||||
const int orig_m,
|
||||
const int max_m,
|
||||
std::function<bool(
|
||||
const Eigen::MatrixXd &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::VectorXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const std::set<std::pair<double,int> > &,
|
||||
const std::vector<std::set<std::pair<double,int> >::iterator > &,
|
||||
const Eigen::MatrixXd &,
|
||||
const int,
|
||||
const int,
|
||||
const int,
|
||||
const int,
|
||||
const int)> & stopping_condition)
|
||||
{
|
||||
stopping_condition =
|
||||
[orig_m,max_m,&m](
|
||||
const Eigen::MatrixXd &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::VectorXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const std::set<std::pair<double,int> > &,
|
||||
const std::vector<std::set<std::pair<double,int> >::iterator > &,
|
||||
const Eigen::MatrixXd &,
|
||||
const int,
|
||||
const int,
|
||||
const int,
|
||||
const int f1,
|
||||
const int f2)->bool
|
||||
{
|
||||
// Only subtract if we're collapsing a real face
|
||||
if(f1 < orig_m) m-=1;
|
||||
if(f2 < orig_m) m-=1;
|
||||
return m<=(int)max_m;
|
||||
};
|
||||
}
|
||||
|
||||
IGL_INLINE
|
||||
std::function<bool(
|
||||
const Eigen::MatrixXd &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::VectorXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const std::set<std::pair<double,int> > &,
|
||||
const std::vector<std::set<std::pair<double,int> >::iterator > &,
|
||||
const Eigen::MatrixXd &,
|
||||
const int,
|
||||
const int,
|
||||
const int,
|
||||
const int,
|
||||
const int)>
|
||||
igl::max_faces_stopping_condition(
|
||||
int & m,
|
||||
const int orig_m,
|
||||
const int max_m)
|
||||
{
|
||||
std::function<bool(
|
||||
const Eigen::MatrixXd &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::VectorXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const Eigen::MatrixXi &,
|
||||
const std::set<std::pair<double,int> > &,
|
||||
const std::vector<std::set<std::pair<double,int> >::iterator > &,
|
||||
const Eigen::MatrixXd &,
|
||||
const int,
|
||||
const int,
|
||||
const int,
|
||||
const int,
|
||||
const int)> stopping_condition;
|
||||
max_faces_stopping_condition(
|
||||
m,orig_m,max_m,stopping_condition);
|
||||
return stopping_condition;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue