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
49
src/libigl/igl/ramer_douglas_peucker.h
Normal file
49
src/libigl/igl/ramer_douglas_peucker.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#ifndef IGL_RAMER_DOUGLAS_PEUCKER_H
|
||||
#define IGL_RAMER_DOUGLAS_PEUCKER_H
|
||||
#include "igl_inline.h"
|
||||
#include <Eigen/Core>
|
||||
namespace igl
|
||||
{
|
||||
// Ramer-Douglas-Peucker piecewise-linear curve simplification.
|
||||
//
|
||||
// Inputs:
|
||||
// P #P by dim ordered list of vertices along the curve
|
||||
// tol tolerance (maximal euclidean distance allowed between the new line
|
||||
// and a vertex)
|
||||
// Outputs:
|
||||
// S #S by dim ordered list of points along the curve
|
||||
// J #S list of indices into P so that S = P(J,:)
|
||||
template <typename DerivedP, typename DerivedS, typename DerivedJ>
|
||||
IGL_INLINE void ramer_douglas_peucker(
|
||||
const Eigen::MatrixBase<DerivedP> & P,
|
||||
const typename DerivedP::Scalar tol,
|
||||
Eigen::PlainObjectBase<DerivedS> & S,
|
||||
Eigen::PlainObjectBase<DerivedJ> & J);
|
||||
// Run (Ramer-)Duglass-Peucker curve simplification but keep track of where
|
||||
// every point on the original curve maps to on the simplified curve.
|
||||
//
|
||||
// Inputs:
|
||||
// P #P by dim list of points, (use P([1:end 1],:) for loops)
|
||||
// tol DP tolerance
|
||||
// Outputs:
|
||||
// S #S by dim list of points along simplified curve
|
||||
// J #S indices into P of simplified points
|
||||
// Q #P by dim list of points mapping along simplified curve
|
||||
//
|
||||
template <
|
||||
typename DerivedP,
|
||||
typename DerivedS,
|
||||
typename DerivedJ,
|
||||
typename DerivedQ>
|
||||
IGL_INLINE void ramer_douglas_peucker(
|
||||
const Eigen::MatrixBase<DerivedP> & P,
|
||||
const typename DerivedP::Scalar tol,
|
||||
Eigen::PlainObjectBase<DerivedS> & S,
|
||||
Eigen::PlainObjectBase<DerivedJ> & J,
|
||||
Eigen::PlainObjectBase<DerivedQ> & Q);
|
||||
|
||||
}
|
||||
#ifndef IGL_STATIC_LIBRARY
|
||||
# include "ramer_douglas_peucker.cpp"
|
||||
#endif
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue