libigl v2.5.0
Loading...
Searching...
No Matches
project_to_line_segment.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8#ifndef IGL_PROJECT_TO_LINE_SEGMENT_H
9#define IGL_PROJECT_TO_LINE_SEGMENT_H
10#include "igl_inline.h"
11#include <Eigen/Core>
12
13namespace igl
14{
25 template <
26 typename DerivedP,
27 typename DerivedS,
28 typename DerivedD,
29 typename Derivedt,
30 typename DerivedsqrD>
32 const Eigen::MatrixBase<DerivedP> & P,
33 const Eigen::MatrixBase<DerivedS> & S,
34 const Eigen::MatrixBase<DerivedD> & D,
35 Eigen::PlainObjectBase<Derivedt> & t,
36 Eigen::PlainObjectBase<DerivedsqrD> & sqrD);
37}
38
39#ifndef IGL_STATIC_LIBRARY
40# include "project_to_line_segment.cpp"
41#endif
42
43#endif
44
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void project_to_line_segment(const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedS > &S, const Eigen::MatrixBase< DerivedD > &D, Eigen::PlainObjectBase< Derivedt > &t, Eigen::PlainObjectBase< DerivedsqrD > &sqrD)
Project points onto vectors, that is find the parameter t for a point p such that proj_p = (y-x).