|
| 1 | +/* |
| 2 | + * Copyright (c) 2019 - 2021 Geode-solutions |
| 3 | + * |
| 4 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | + * of this software and associated documentation files (the "Software"), to deal |
| 6 | + * in the Software without restriction, including without limitation the rights |
| 7 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 8 | + * copies of the Software, and to permit persons to whom the Software is |
| 9 | + * furnished to do so, subject to the following conditions: |
| 10 | + * |
| 11 | + * The above copyright notice and this permission notice shall be included in |
| 12 | + * all copies or substantial portions of the Software. |
| 13 | + * |
| 14 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 17 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 18 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 19 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 20 | + * SOFTWARE. |
| 21 | + * |
| 22 | + */ |
| 23 | + |
| 24 | +#pragma once |
| 25 | + |
| 26 | +#include <geode/basic/pimpl.h> |
| 27 | + |
| 28 | +#include <geode/inspector/common.h> |
| 29 | + |
| 30 | +namespace geode |
| 31 | +{ |
| 32 | + FORWARD_DECLARATION_DIMENSION_CLASS( SurfaceMesh ); |
| 33 | + FORWARD_DECLARATION_DIMENSION_CLASS( SolidMesh ); |
| 34 | +} // namespace geode |
| 35 | + |
| 36 | +namespace geode |
| 37 | +{ |
| 38 | + namespace inspector |
| 39 | + { |
| 40 | + /*! |
| 41 | + * Class for inspecting the degeneration of a SurfaceMesh |
| 42 | + */ |
| 43 | + template < index_t dimension > |
| 44 | + class opengeode_inspector_inspector_api SurfaceMeshDegeneration |
| 45 | + { |
| 46 | + public: |
| 47 | + SurfaceMeshDegeneration() = default; |
| 48 | + SurfaceMeshDegeneration( SurfaceMeshDegeneration&& other ); |
| 49 | + ~SurfaceMeshDegeneration(); |
| 50 | + |
| 51 | + bool is_mesh_degenerated( |
| 52 | + const SurfaceMesh< dimension >& mesh ) const; |
| 53 | + |
| 54 | + index_t nb_degenerated_edges( |
| 55 | + const SurfaceMesh< dimension >& mesh ) const; |
| 56 | + |
| 57 | + const std::vector< index_t > degenerated_edges( |
| 58 | + const SurfaceMesh< dimension >& mesh ) const; |
| 59 | + |
| 60 | + private: |
| 61 | + IMPLEMENTATION_MEMBER( impl_ ); |
| 62 | + }; |
| 63 | + ALIAS_2D_AND_3D( SurfaceMeshDegeneration ); |
| 64 | + |
| 65 | + // template < index_t dimension > |
| 66 | + // class SolidMeshDegeneration |
| 67 | + // { |
| 68 | + // public: |
| 69 | + // SolidMeshDegeneration(); |
| 70 | + // SolidMeshDegeneration( SolidMeshDegeneration&& other ); |
| 71 | + // ~SolidMeshDegeneration(); |
| 72 | + |
| 73 | + // bool is_mesh_degenerated( |
| 74 | + // const SolidMesh< dimension >& mesh ) const; |
| 75 | + |
| 76 | + // index_t nb_degenerated_edges( |
| 77 | + // const SolidMesh< dimension >& mesh ) const; |
| 78 | + |
| 79 | + // const std::vector< index_t > degenerated_edges( |
| 80 | + // const SolidMesh< dimension >& mesh ) const; |
| 81 | + |
| 82 | + // private: |
| 83 | + // IMPLEMENTATION_MEMBER( impl_ ); |
| 84 | + // }; |
| 85 | + // ALIAS_2D_AND_3D( SolidMeshDegeneration ); |
| 86 | + } // namespace inspector |
| 87 | +} // namespace geode |
0 commit comments