mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 10:11:10 -06:00
Merged branch 'dev_native' into lm_sla_supports_auto
Added igl library files
This commit is contained in:
commit
7681d00ee5
2865 changed files with 142806 additions and 22325 deletions
45
src/igl/min_size.cpp
Normal file
45
src/igl/min_size.cpp
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
// This file is part of libigl, a simple c++ geometry processing library.
|
||||
//
|
||||
// Copyright (C) 2013 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 "min_size.h"
|
||||
|
||||
template <typename T>
|
||||
IGL_INLINE int igl::min_size(const std::vector<T> & V)
|
||||
{
|
||||
int min_size = -1;
|
||||
for(
|
||||
typename std::vector<T>::const_iterator iter = V.begin();
|
||||
iter != V.end();
|
||||
iter++)
|
||||
{
|
||||
int size = (int)iter->size();
|
||||
// have to handle base case
|
||||
if(min_size == -1)
|
||||
{
|
||||
min_size = size;
|
||||
}else{
|
||||
min_size = (min_size < size ? min_size : size);
|
||||
}
|
||||
}
|
||||
return min_size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef IGL_STATIC_LIBRARY
|
||||
// Explicit template instantiation
|
||||
// generated by autoexplicit.sh
|
||||
template int igl::min_size<std::vector<long, std::allocator<long> > >(std::vector<std::vector<long, std::allocator<long> >, std::allocator<std::vector<long, std::allocator<long> > > > const&);
|
||||
// generated by autoexplicit.sh
|
||||
template int igl::min_size<std::vector<unsigned int, std::allocator<unsigned int> > >(std::vector<std::vector<unsigned int, std::allocator<unsigned int> >, std::allocator<std::vector<unsigned int, std::allocator<unsigned int> > > > const&);
|
||||
// generated by autoexplicit.sh
|
||||
template int igl::min_size<std::vector<int, std::allocator<int> > >(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&);
|
||||
// generated by autoexplicit.sh
|
||||
template int igl::min_size<std::vector<double, std::allocator<double> > >(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > const&);
|
||||
template int igl::min_size<std::vector<bool, std::allocator<bool> > >(std::vector<std::vector<bool, std::allocator<bool> >, std::allocator<std::vector<bool, std::allocator<bool> > > > const&);
|
||||
template int igl::min_size<std::vector<float, std::allocator<float> > >(std::vector<std::vector<float, std::allocator<float> >, std::allocator<std::vector<float, std::allocator<float> > > > const&);
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue