SurfaceTriangulator.hpp
1 /*---------------------------------------------------------------------------*\
2  *
3  * mimmo
4  *
5  * Copyright (C) 2015-2021 OPTIMAD engineering Srl
6  *
7  * -------------------------------------------------------------------------
8  * License
9  * This file is part of mimmo.
10  *
11  * mimmo is free software: you can redistribute it and/or modify it
12  * under the terms of the GNU Lesser General Public License v3 (LGPL)
13  * as published by the Free Software Foundation.
14  *
15  * mimmo is distributed in the hope that it will be useful, but WITHOUT
16  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18  * License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with mimmo. If not, see <http://www.gnu.org/licenses/>.
22  *
23 \*---------------------------------------------------------------------------*/
24 
25 #ifndef __SURFACETRIANGULATOR_HPP__
26 #define __SURFACETRIANGULATOR_HPP__
27 
28 #include "BaseManipulation.hpp"
29 
30 namespace mimmo{
31 
75 
76 private:
77 
78  bool m_workOnTarget;
81 public:
82 
84  SurfaceTriangulator(const bitpit::Config::Section & rootXML);
85  virtual ~SurfaceTriangulator();
88 
89  void buildPorts();
90 
91  //get-set methods
93  bool isWorkingOnTarget();
94 
96  void setWorkOnTarget(bool flag = false);
97 
98  //execute
99  void execute();
100 
101  //XML utilities from reading writing settings to file
102  virtual void absorbSectionXML(const bitpit::Config::Section & slotXML, std::string name="");
103  virtual void flushSectionXML(bitpit::Config::Section & slotXML, std::string name="");
104  virtual void plotOptionalResults();
105 
106 protected:
107  void swap(SurfaceTriangulator & x) noexcept;
108 };
109 
110 REGISTER_PORT(M_GEOM, MC_SCALAR, MD_MIMMO_,__SURFACETRIANGULATOR_HPP__)
111 REGISTER(BaseManipulation, SurfaceTriangulator, "mimmo.SurfaceTriangulator")
112 
113 };
114 
115 #endif /* __SURFACETRIANGULATOR_HPP__ */
#define M_GEOM
void swap(SurfaceTriangulator &x) noexcept
SurfaceTriangulator & operator=(SurfaceTriangulator other)
virtual void flushSectionXML(bitpit::Config::Section &slotXML, std::string name="")
virtual void absorbSectionXML(const bitpit::Config::Section &slotXML, std::string name="")
BaseManipulation is the base class of any manipulation object of the library.
#define MC_SCALAR
#define REGISTER_PORT(Name, Container, Datatype, ManipBlock)
void setGeometry(mimmo::MimmoSharedPointer< MimmoObject > geo)
#define MD_MIMMO_
Triangulate a target MimmoObject non-homogeneous and/or non-triangular surface mesh.
void setWorkOnTarget(bool flag=false)
MimmoSharedPointer is a custom implementation of shared pointer.
mimmo::MimmoSharedPointer< MimmoObject > getGeometry()
#define REGISTER(Base, Derived, name)
Definition: factory.hpp:206