libigl v2.5.0
Loading...
Searching...
No Matches
project_to_line.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_H
9#define IGL_PROJECT_TO_LINE_H
10#include "igl_inline.h"
11#include <Eigen/Core>
12
13namespace igl
14{
28 template <
29 typename DerivedP,
30 typename DerivedS,
31 typename DerivedD,
32 typename Derivedt,
33 typename DerivedsqrD>
35 const Eigen::MatrixBase<DerivedP> & P,
36 const Eigen::MatrixBase<DerivedS> & S,
37 const Eigen::MatrixBase<DerivedD> & D,
38 Eigen::PlainObjectBase<Derivedt> & t,
39 Eigen::PlainObjectBase<DerivedsqrD> & sqrD);
42 template <typename Scalar>
44 const Scalar px,
45 const Scalar py,
46 const Scalar pz,
47 const Scalar sx,
48 const Scalar sy,
49 const Scalar sz,
50 const Scalar dx,
51 const Scalar dy,
52 const Scalar dz,
53 Scalar & projpx,
54 Scalar & projpy,
55 Scalar & projpz,
56 Scalar & t,
57 Scalar & sqrd);
59 template <typename Scalar>
61 const Scalar px,
62 const Scalar py,
63 const Scalar pz,
64 const Scalar sx,
65 const Scalar sy,
66 const Scalar sz,
67 const Scalar dx,
68 const Scalar dy,
69 const Scalar dz,
70 Scalar & t,
71 Scalar & sqrd);
72
73}
74
75#ifndef IGL_STATIC_LIBRARY
76# include "project_to_line.cpp"
77#endif
78
79#endif
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void project_to_line(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).