1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 3 of the License, or (at your
14 option) any later version.
16 cfMesh is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
28 Decomposition of a face into triangles
33 \*---------------------------------------------------------------------------*/
35 #ifndef faceDecomposition_H
36 #define faceDecomposition_H
39 #include "pointField.H"
44 /*---------------------------------------------------------------------------*\
45 Class faceDecomposition Declaration
46 \*---------------------------------------------------------------------------*/
48 class faceDecomposition
53 const pointField& points_;
55 // private member functions
56 //- find concave vertex and return its position
58 label concaveVertex() const;
60 //- decomposes the face into triangle starting from
62 faceList decomposeFaceIntoTriangles(const label cv) const;
64 //- disallows bitwise construct
65 void operator=(const faceDecomposition&);
68 faceDecomposition(const faceDecomposition&);
74 //- construct components
85 //- check if the face is convex
86 bool isFaceConvex() const;
88 //- check if the face is planar
89 bool isFacePlanar() const;
90 bool isFacePlanar(const scalar tol) const;
92 //- decompose face into triangles
93 faceList decomposeFaceIntoTriangles() const;
95 //- decompose face into the minimal number
97 faceList decomposeFace() const;
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 } // End namespace Foam
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 // ************************************************************************* //