libigl v2.5.0
Loading...
Searching...
No Matches
cdt.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) 2014 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_COPYLEFT_TETGEN_CDT_H
9#define IGL_COPYLEFT_TETGEN_CDT_H
10#include "../../igl_inline.h"
11
12#include <Eigen/Core>
13#include <string>
14#ifndef TETLIBRARY
15# define TETLIBRARY
16#endif
17#include <tetgen.h> // Defined REAL
18
19namespace igl
20{
21 namespace copyleft
22 {
23 namespace tetgen
24 {
26 struct CDTParam
27 {
31 bool use_bounding_box = false;
34 double bounding_box_scale = 1.01;
36 std::string flags = "Y";
37 };
48 template <
49 typename DerivedV,
50 typename DerivedF,
51 typename DerivedTV,
52 typename DerivedTT,
53 typename DerivedTF>
55 const Eigen::PlainObjectBase<DerivedV>& V,
56 const Eigen::PlainObjectBase<DerivedF>& F,
57 const CDTParam & param,
58 Eigen::PlainObjectBase<DerivedTV>& TV,
59 Eigen::PlainObjectBase<DerivedTT>& TT,
60 Eigen::PlainObjectBase<DerivedTF>& TF);
61 }
62 }
63}
64
65
66#ifndef IGL_STATIC_LIBRARY
67# include "cdt.cpp"
68#endif
69
70#endif
71
72
#define IGL_INLINE
Definition igl_inline.h:15
bool cdt(const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const CDTParam &param, Eigen::PlainObjectBase< DerivedTV > &TV, Eigen::PlainObjectBase< DerivedTT > &TT, Eigen::PlainObjectBase< DerivedTF > &TF)
Create a constrained delaunay tessellation containing convex hull of the given non-selfintersecting m...
Definition AABB.h:17
Parameters for controling the CDT.
Definition cdt.h:27
std::string flags
Flags to tetgen. Do not include the "c" flag here! {"Y"}.
Definition cdt.h:36
double bounding_box_scale
Scale the bounding box a bit so that vertices near it do not give tetgen problems.
Definition cdt.h:34
bool use_bounding_box
Tetgen can compute mesh of convex hull of input (i.e.
Definition cdt.h:31