mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-24 17:21:11 -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
23
src/igl/shortest_edge_and_midpoint.cpp
Normal file
23
src/igl/shortest_edge_and_midpoint.cpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// 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 "shortest_edge_and_midpoint.h"
|
||||
|
||||
IGL_INLINE void igl::shortest_edge_and_midpoint(
|
||||
const int e,
|
||||
const Eigen::MatrixXd & V,
|
||||
const Eigen::MatrixXi & /*F*/,
|
||||
const Eigen::MatrixXi & E,
|
||||
const Eigen::VectorXi & /*EMAP*/,
|
||||
const Eigen::MatrixXi & /*EF*/,
|
||||
const Eigen::MatrixXi & /*EI*/,
|
||||
double & cost,
|
||||
Eigen::RowVectorXd & p)
|
||||
{
|
||||
cost = (V.row(E(e,0))-V.row(E(e,1))).norm();
|
||||
p = 0.5*(V.row(E(e,0))+V.row(E(e,1)));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue