TriangleMeshToSDF.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: TriangleMeshToSDF.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Generates signed-distance field out of given triangle mesh.
6 > Created Time: 2017/08/24
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 // This code is ported from Christopher Batty's SDFGen software.
10 // (https://github.com/christopherbatty/SDFGen)
11 //
12 // The MIT License (MIT)
13 //
14 // Copyright (c) 2015, Christopher Batty
15 //
16 // Permission is hereby granted, free of charge, to any person obtaining a copy
17 // of this software and associated documentation files (the "Software"), to deal
18 // in the Software without restriction, including without limitation the rights
19 // to use, copy, modify, merge, publish, distribute, sub-license, and/or sell
20 // copies of the Software, and to permit persons to whom the Software is
21 // furnished to do so, subject to the following conditions:
22 // The above copyright notice and this permission notice shall be included in
23 // all copies or substantial portions of the Software.
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 // SOFTWARE.
31 
32 #ifndef CUBBYFLOW_TRIANGLE_MESH_TO_SDF_H
33 #define CUBBYFLOW_TRIANGLE_MESH_TO_SDF_H
34 
36 #include <Core/Grid/ScalarGrid3.h>
37 
38 namespace CubbyFlow
39 {
64  void TriangleMeshToSDF(
65  const TriangleMesh3& mesh,
66  ScalarGrid3* sdf,
67  const unsigned int exactBand = 1);
68 }
69 
70 #endif
Definition: pybind11Utils.h:24
void TriangleMeshToSDF(const TriangleMesh3 &mesh, ScalarGrid3 *sdf, const unsigned int exactBand=1)
Generates signed-distance field out of given triangle mesh.