CreatePointCloud.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 __CREATEPOINTCLOUD_HPP__
26 #define __CREATEPOINTCLOUD_HPP__
27 
28 #include "BaseManipulation.hpp"
29 
30 namespace mimmo{
31 
92 protected:
93  //members
101 public:
103  virtual ~CreatePointCloud();
104  CreatePointCloud(const bitpit::Config::Section & rootXML);
105  CreatePointCloud(const CreatePointCloud & other);
107 
110 
111  void setRawPoints(dvecarr3E rawPoints);
112  void setRawScalarField(dvector1D rawScalarField);
113  void setRawVectorField(dvecarr3E rawVectorField);
114 
115  void setRawPoints(dmpvecarr3E *rawPoints);
116  void setRawScalarField(dmpvector1D *rawScalarField);
117  void setRawVectorField(dmpvecarr3E *rawVectorField);
118 
119  void clear();
120 
121  void execute();
122 
123  virtual void absorbSectionXML(const bitpit::Config::Section & slotXML, std::string name = "");
124  virtual void flushSectionXML(bitpit::Config::Section & slotXML, std::string name= "");
125 
126 protected:
127  void swap(CreatePointCloud & x) noexcept;
128  void buildPorts();
129  void plotOptionalResults();
130 
131 private:
132  //disabling interface method
133  void setGeometry(MimmoSharedPointer<MimmoObject> geometry){BaseManipulation::setGeometry(geometry);};
134 };
135 
136 REGISTER_PORT(M_COORDS, MC_VECARR3, MD_FLOAT,__CREATEPOINTCLOUD_HPP__)
137 REGISTER_PORT(M_DISPLS, MC_VECARR3, MD_FLOAT,__CREATEPOINTCLOUD_HPP__)
138 REGISTER_PORT(M_DATAFIELD, MC_VECTOR, MD_FLOAT,__CREATEPOINTCLOUD_HPP__)
139 REGISTER_PORT(M_SCALARFIELD, MC_SCALAR, MD_MPVECFLOAT_,__CREATEPOINTCLOUD_HPP__)
140 REGISTER_PORT(M_VECTORFIELD, MC_SCALAR, MD_MPVECARR3FLOAT_,__CREATEPOINTCLOUD_HPP__)
141 REGISTER_PORT(M_VECTORFIELD2, MC_SCALAR, MD_MPVECARR3FLOAT_,__CREATEPOINTCLOUD_HPP__)
142 REGISTER_PORT(M_GEOM, MC_SCALAR, MD_MIMMO_ ,__CREATEPOINTCLOUD_HPP__)
143 
144 REGISTER(BaseManipulation, CreatePointCloud, "mimmo.CreatePointCloud")
145 }
146 
147 #endif /* __CREATEPOINTCLOUD_HPP__ */
void setRawVectorField(dvecarr3E rawVectorField)
#define M_DATAFIELD
#define M_DISPLS
#define M_GEOM
#define MD_FLOAT
dmpvecarr3E * getVectorField()
std::vector< darray3E > dvecarr3E
BaseManipulation is the base class of any manipulation object of the library.
virtual void flushSectionXML(bitpit::Config::Section &slotXML, std::string name="")
#define M_VECTORFIELD
dmpvector1D * getScalarField()
#define MC_SCALAR
#define MD_MPVECARR3FLOAT_
#define REGISTER_PORT(Name, Container, Datatype, ManipBlock)
virtual void absorbSectionXML(const bitpit::Config::Section &slotXML, std::string name="")
void setRawPoints(dvecarr3E rawPoints)
std::vector< double > dvector1D
#define MC_VECTOR
#define MD_MIMMO_
#define MD_MPVECFLOAT_
#define M_SCALARFIELD
void setGeometry(MimmoSharedPointer< MimmoObject > geometry)
#define M_VECTORFIELD2
CreatePointCloud & operator=(CreatePointCloud other)
MimmoSharedPointer is a custom implementation of shared pointer.
void swap(CreatePointCloud &x) noexcept
CreatePointCloud manages cloud point data in raw format to create a MimmoObject Point Cloud container...
#define M_COORDS
#define MC_VECARR3
void setRawScalarField(dvector1D rawScalarField)
#define REGISTER(Base, Derived, name)
Definition: factory.hpp:206