tools/physicalModeling/mesh2faust/vega/libraries/volumetricMesh/generateSurfaceMesh.h
raw symbols SCIP| 1 | /************************************************************************* |
| 2 | * * |
| 3 | * Vega FEM Simulation Library Version 3.1 * |
| 4 | * * |
| 5 | * "volumetricMesh" library , Copyright (C) 2007 CMU, 2009 MIT, 2016 USC * |
| 6 | * All rights reserved. * |
| 7 | * * |
| 8 | * Code authors: Jernej Barbic, Yijing Li * |
| 9 | * http://www.jernejbarbic.com/code * |
| 10 | * * |
| 11 | * Research: Jernej Barbic, Fun Shing Sin, Daniel Schroeder, * |
| 12 | * Doug L. James, Jovan Popovic * |
| 13 | * * |
| 14 | * Funding: National Science Foundation, Link Foundation, * |
| 15 | * Singapore-MIT GAMBIT Game Lab, * |
| 16 | * Zumberge Research and Innovation Fund at USC * |
| 17 | * * |
| 18 | * This library is free software; you can redistribute it and/or * |
| 19 | * modify it under the terms of the BSD-style license that is * |
| 20 | * included with this library in the file LICENSE.txt * |
| 21 | * * |
| 22 | * This library is distributed in the hope that it will be useful, * |
| 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file * |
| 25 | * LICENSE.TXT for more details. * |
| 26 | * * |
| 27 | *************************************************************************/ |
| 28 | |
| 29 | /* |
| 30 | Creates the surface mesh of the given volumetric mesh. |
| 31 | Note: interior volumetric mesh vertices are kept in the surface mesh (as isolated vertices). |
| 32 | So, the vertex set of the volumetric mesh is identical to the surface mesh vertex set, |
| 33 | with the same order. |
| 34 | */ |
| 35 | |
| 36 | #ifndef _GENERATESURFACEMESH_H_ |
| 37 | #define _GENERATESURFACEMESH_H_ |
| 38 | |
| 39 | #include <stdlib.h> |
| 40 | #include <stdio.h> |
| 41 | #include <math.h> |
| 42 | #include "volumetricMesh.h" |
| 43 | #include "objMesh.h" |
| 44 | |
| 45 | |
| 46 | class GenerateSurfaceMesh |
| 47 | { |
| 48 | public: |
| 49 | // The output surface mesh is usually a triangle mesh, but can also be a quad mesh for cubic meshes. |
| 50 | // The last argument specifies whether output mesh should be quads or triangles (in the case of cubic volumetric meshes). |
| 51 | // All vertices of the volumetric mesh are included in the output surface mesh, even if they don't touch any surface triangle (e.g., vertices in the interior of the volumetric mesh). |
| 52 | static ObjMesh * ComputeMesh(const VolumetricMesh * volumetricMesh, bool triangulateOutputMesh=false); |
| 53 | |
| 54 | static ObjMesh * ComputeMesh(const VolumetricMesh * volumetricMesh, const ObjMesh * superMesh, bool triangulateOutputMesh=false); // computes the surface of the mesh, but only the part which is also the outer surface of the given super mesh (advanced routine) |
| 55 | }; |
| 56 | |
| 57 | #endif |
| 58 |