libigl v2.5.0
Loading...
Searching...
No Matches
marching_tets.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) 2018 Francis Williams <francis@fwilliams.info>
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
9#ifndef IGL_MARCHING_TETS_H
10#define IGL_MARCHING_TETS_H
11
12#include "igl_inline.h"
13#include <Eigen/Core>
14#include <Eigen/Sparse>
15
16namespace igl {
30 template <typename DerivedTV,
31 typename DerivedTT,
32 typename DerivedS,
33 typename DerivedSV,
34 typename DerivedSF,
35 typename DerivedJ,
36 typename BCType>
38 const Eigen::MatrixBase<DerivedTV>& TV,
39 const Eigen::MatrixBase<DerivedTT>& TT,
40 const Eigen::MatrixBase<DerivedS>& S,
41 const typename DerivedS::Scalar isovalue,
42 Eigen::PlainObjectBase<DerivedSV>& SV,
43 Eigen::PlainObjectBase<DerivedSF>& SF,
44 Eigen::PlainObjectBase<DerivedJ>& J,
45 Eigen::SparseMatrix<BCType>& BC);
48 template <typename DerivedTV,
49 typename DerivedTT,
50 typename DerivedS,
51 typename DerivedSV,
52 typename DerivedSF,
53 typename DerivedJ,
54 typename BCType>
56 const Eigen::MatrixBase<DerivedTV>& TV,
57 const Eigen::MatrixBase<DerivedTT>& TT,
58 const Eigen::MatrixBase<DerivedS>& S,
59 Eigen::PlainObjectBase<DerivedSV>& SV,
60 Eigen::PlainObjectBase<DerivedSF>& SF,
61 Eigen::PlainObjectBase<DerivedJ>& J,
62 Eigen::SparseMatrix<BCType>& BC) {
63 return igl::marching_tets(TV, TT, S, 0.0, SV, SF, J, BC);
64 }
66 template <typename DerivedTV,
67 typename DerivedTT,
68 typename DerivedS,
69 typename DerivedSV,
70 typename DerivedSF,
71 typename DerivedJ>
73 const Eigen::MatrixBase<DerivedTV>& TV,
74 const Eigen::MatrixBase<DerivedTT>& TT,
75 const Eigen::MatrixBase<DerivedS>& S,
76 const typename DerivedS::Scalar isovalue,
77 Eigen::PlainObjectBase<DerivedSV>& SV,
78 Eigen::PlainObjectBase<DerivedSF>& SF,
79 Eigen::PlainObjectBase<DerivedJ>& J) {
80 Eigen::SparseMatrix<typename DerivedSV::Scalar> _BC;
81 return igl::marching_tets(TV, TT, S, isovalue, SV, SF, J, _BC);
82 }
84 template <typename DerivedTV,
85 typename DerivedTT,
86 typename DerivedS,
87 typename DerivedSV,
88 typename DerivedSF,
89 typename BCType>
91 const Eigen::MatrixBase<DerivedTV>& TV,
92 const Eigen::MatrixBase<DerivedTT>& TT,
93 const Eigen::MatrixBase<DerivedS>& S,
94 const typename DerivedS::Scalar isovalue,
95 Eigen::PlainObjectBase<DerivedSV>& SV,
96 Eigen::PlainObjectBase<DerivedSF>& SF,
97 Eigen::SparseMatrix<BCType>& BC) {
98 Eigen::VectorXi _J;
99 return igl::marching_tets(TV, TT, S, isovalue, SV, SF, _J, BC);
100 }
102 template <typename DerivedTV,
103 typename DerivedTT,
104 typename DerivedS,
105 typename DerivedSV,
106 typename DerivedSF>
108 const Eigen::MatrixBase<DerivedTV>& TV,
109 const Eigen::MatrixBase<DerivedTT>& TT,
110 const Eigen::MatrixBase<DerivedS>& S,
111 const typename DerivedS::Scalar isovalue,
112 Eigen::PlainObjectBase<DerivedSV>& SV,
113 Eigen::PlainObjectBase<DerivedSF>& SF) {
114 Eigen::VectorXi _J;
115 Eigen::SparseMatrix<typename DerivedSV::Scalar> _BC;
116 return igl::marching_tets(TV, TT, S, isovalue, SV, SF, _J, _BC);
117 }
118
119}
120
121#ifndef IGL_STATIC_LIBRARY
122# include "marching_tets.cpp"
123#endif
124
125#endif // IGL_MARCHING_TETS_H
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void marching_tets(const Eigen::MatrixBase< DerivedTV > &TV, const Eigen::MatrixBase< DerivedTT > &TT, const Eigen::MatrixBase< DerivedS > &S, const typename DerivedS::Scalar isovalue, Eigen::PlainObjectBase< DerivedSV > &SV, Eigen::PlainObjectBase< DerivedSF > &SF, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::SparseMatrix< BCType > &BC)
Performs the marching tetrahedra algorithm on a tet mesh defined by TV and TT with scalar values defi...