File: outer_element.h

package info (click to toggle)
meshlab 2022.02%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 47,348 kB
  • sloc: cpp: 536,635; ansic: 27,783; sh: 539; makefile: 36
file content (83 lines) | stat: -rw-r--r-- 2,999 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// This file is part of libigl, a simple c++ geometry processing library.
// 
// Copyright (C) 2015 Qingan Zhou <qnzhou@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/.
#ifndef IGL_COPYLEFT_CGAL_OUTER_ELEMENT_H
#define IGL_COPYLEFT_CGAL_OUTER_ELEMENT_H
#include "../../igl_inline.h"
#include <Eigen/Core>
namespace igl
{
  namespace copyleft
  {
    namespace cgal
    {
      // Find a vertex that is reachable from infinite without crossing any faces.
      // Such vertex is called "outer vertex."
      //
      // Precondition: The input mesh must have all self-intersection resolved and
      // no duplicated vertices.  See cgal::remesh_self_intersections.h for how to
      // obtain such input.
      //
      // Inputs:
      //   V  #V by 3 list of vertex positions
      //   F  #F by 3 list of triangle indices into V
      //   I  #I list of facets to consider
      // Outputs:
      //   v_index  index of outer vertex
      //   A  #A list of facets incident to the outer vertex
      template <
          typename DerivedV,
          typename DerivedF,
          typename DerivedI,
          typename IndexType,
          typename DerivedA
          >
      IGL_INLINE void outer_vertex(
              const Eigen::PlainObjectBase<DerivedV> & V,
              const Eigen::PlainObjectBase<DerivedF> & F,
              const Eigen::PlainObjectBase<DerivedI> & I,
              IndexType & v_index,
              Eigen::PlainObjectBase<DerivedA> & A);
      // Find an edge that is reachable from infinity without crossing any faces.
      // Such edge is called "outer edge."
      //
      // Precondition: The input mesh must have all self-intersection resolved
      // and no duplicated vertices.  The correctness of the output depends on
      // the fact that there is no edge overlap.  See
      // cgal::remesh_self_intersections.h for how to obtain such input.
      //
      // Inputs:
      //   V  #V by 3 list of vertex positions
      //   F  #F by 3 list of triangle indices into V
      //   I  #I list of facets to consider
      // Outputs:
      //   v1 index of the first end point of outer edge
      //   v2 index of the second end point of outer edge
      //   A  #A list of facets incident to the outer edge
      template<
          typename DerivedV,
          typename DerivedF,
          typename DerivedI,
          typename IndexType,
          typename DerivedA
          >
      IGL_INLINE void outer_edge(
              const Eigen::PlainObjectBase<DerivedV> & V,
              const Eigen::PlainObjectBase<DerivedF> & F,
              const Eigen::PlainObjectBase<DerivedI> & I,
              IndexType & v1,
              IndexType & v2,
              Eigen::PlainObjectBase<DerivedA> & A);

    }
  }
}

#ifndef IGL_STATIC_LIBRARY
#  include "outer_element.cpp"
#endif
#endif