mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-05 18:31:52 +03:00
update bundled_deps
This commit is contained in:
23
bundled_deps/libigl/igl/shortest_edge_and_midpoint.cpp
Normal file
23
bundled_deps/libigl/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)));
|
||||
}
|
||||
Reference in New Issue
Block a user