Triangulate a target MimmoObject non-homogeneous and/or non-triangular surface mesh. More...

#include <SurfaceTriangulator.hpp>

Inheritance diagram for mimmo::SurfaceTriangulator:
Collaboration diagram for mimmo::SurfaceTriangulator:

Public Member Functions

 SurfaceTriangulator ()
 
 SurfaceTriangulator (const bitpit::Config::Section &rootXML)
 
 SurfaceTriangulator (const SurfaceTriangulator &other)
 
virtual ~SurfaceTriangulator ()
 
virtual void absorbSectionXML (const bitpit::Config::Section &slotXML, std::string name="")
 
void buildPorts ()
 
void execute ()
 
virtual void flushSectionXML (bitpit::Config::Section &slotXML, std::string name="")
 
mimmo::MimmoSharedPointer< MimmoObjectgetGeometry ()
 
bool isWorkingOnTarget ()
 
SurfaceTriangulatoroperator= (SurfaceTriangulator other)
 
virtual void plotOptionalResults ()
 
void setGeometry (mimmo::MimmoSharedPointer< MimmoObject > geo)
 
void setWorkOnTarget (bool flag=false)
 
- Public Member Functions inherited from mimmo::BaseManipulation
 BaseManipulation ()
 
 BaseManipulation (const BaseManipulation &other)
 
virtual ~BaseManipulation ()
 
void activate ()
 
bool arePortsBuilt ()
 
void clear ()
 
void disable ()
 
void exec ()
 
BaseManipulationgetChild (int i=0)
 
ConnectionType getConnectionType ()
 
MimmoSharedPointer< MimmoObjectgetGeometry ()
 
MimmoSharedPointer< MimmoObject > & getGeometryReference ()
 
int getId ()
 
bitpit::Logger & getLog ()
 
std::string getName ()
 
int getNChild ()
 
int getNParent ()
 
int getNPortsIn ()
 
int getNPortsOut ()
 
BaseManipulationgetParent (int i=0)
 
std::unordered_map< PortID, PortIn * > getPortsIn ()
 
std::unordered_map< PortID, PortOut * > getPortsOut ()
 
uint getPriority ()
 
virtual std::vector< BaseManipulation * > getSubBlocksEmbedded ()
 
bool isActive ()
 
bool isApply ()
 
bool isChild (BaseManipulation *, int &)
 
bool isParent (BaseManipulation *, int &)
 
bool isPlotInExecution ()
 
BaseManipulationoperator= (const BaseManipulation &other)
 
void removePins ()
 
void removePinsIn ()
 
void removePinsOut ()
 
void setApply (bool flag=true)
 
void setGeometry (MimmoSharedPointer< MimmoObject > geometry)
 
void setId (int)
 
void setLog (bitpit::Logger &log)
 
void setName (std::string name)
 
void setOutputPlot (std::string path)
 
void setPlotInExecution (bool)
 
void setPriority (uint priority)
 
void unsetGeometry ()
 

Protected Member Functions

void swap (SurfaceTriangulator &x) noexcept
 
- Protected Member Functions inherited from mimmo::BaseManipulation
void _apply (MimmoPiercedVector< darray3E > &displacements)
 
void addChild (BaseManipulation *child)
 
void addParent (BaseManipulation *parent)
 
void addPinIn (BaseManipulation *objIn, PortID portR)
 
void addPinOut (BaseManipulation *objOut, PortID portS, PortID portR)
 
virtual void apply ()
 
void cleanBufferIn (PortID port)
 
template<typename T , typename O >
bool createPortIn (O *obj, void(O::*setVar_)(T), PortID portR, bool mandatory=false, int family=0)
 
template<typename T , typename O >
bool createPortIn (T *var_, PortID portR, bool mandatory=false, int family=0)
 
template<typename T , typename O >
bool createPortOut (O *obj, T(O::*getVar_)(), PortID portS)
 
template<typename T , typename O >
bool createPortOut (T *var_, PortID portS)
 
void deletePorts ()
 
PortID findPinIn (PortIn &pin)
 
PortID findPinOut (PortOut &pin)
 
void initializeLogger (bool logexists)
 
void readBufferIn (PortID port)
 
void removePinIn (BaseManipulation *objIn, PortID portR)
 
void removePinIn (PortID portR, int j)
 
void removePinOut (BaseManipulation *objOut, PortID portS)
 
void removePinOut (PortID portS, int j)
 
void setBufferIn (PortID port, mimmo::IBinaryStream &input)
 
void swap (BaseManipulation &x) noexcept
 
void unsetChild (BaseManipulation *child)
 
void unsetParent (BaseManipulation *parent)
 
void write (MimmoSharedPointer< MimmoObject > geometry)
 
template<typename mpv_t >
void write (MimmoSharedPointer< MimmoObject > geometry, MimmoPiercedVector< mpv_t > &data)
 
template<typename mpv_t , typename... Args>
void write (MimmoSharedPointer< MimmoObject > geometry, MimmoPiercedVector< mpv_t > &data, Args ... args)
 
template<typename mpv_t >
void write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t > * > &data)
 
template<typename mpv_t , typename... Args>
void write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t > * > &data, Args ... args)
 
template<typename mpv_t >
void write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t >> &data)
 
template<typename mpv_t , typename... Args>
void write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t >> &data, Args ... args)
 

Additional Inherited Members

- Public Types inherited from mimmo::BaseManipulation
typedef std::unordered_map< BaseManipulation *, int > bmumap
 
typedef pin::ConnectionType ConnectionType
 
typedef std::string PortID
 
- Protected Attributes inherited from mimmo::BaseManipulation
bool m_active
 
bool m_apply
 
bool m_arePortsBuilt
 
bmumap m_child
 
int m_counter
 
bool m_execPlot
 
MimmoSharedPointer< MimmoObjectm_geometry
 
bitpit::Logger * m_log
 
std::string m_name
 
std::string m_outputPlot
 
bmumap m_parent
 
std::unordered_map< PortID, PortIn * > m_portIn
 
std::unordered_map< PortID, PortOut * > m_portOut
 
ConnectionType m_portsType
 
uint m_priority
 
- Static Protected Attributes inherited from mimmo::BaseManipulation
static int sm_baseManipulationCounter
 

Detailed Description

Triangulate a target MimmoObject non-homogeneous and/or non-triangular surface mesh.

Class force a given 3D surface tessellation to be a full homogeneous triangular one. By default class create a new indipendent copy of the target geometry and triangulate it. A workOnTarget option can be activated if the User want to apply modifications directly on the target mesh.

Ports available in SurfaceTriangulator Class :


Port Input
PortType variable/function DataType
M_GEOM setGeometry (MC_SCALAR, MD_MIMMO_)
Port Output
PortType variable/function DataType
M_GEOM getGeometry (MC_SCALAR, MD_MIMMO_)

The xml available parameters, sections and subsections are the following :

Inherited from BaseManipulation:

  • ClassName : name of the class as mimmo.SurfaceTriangulator;
  • Priority : uint marking priority in multi-chain execution;
  • PlotInExecution : plot optional results in execution;
  • OutputPlot : path to store optional results.

Proper of the class:

  • WorkOnTarget : 0 -create a new homogeneously triangulated and independent copy of target mesh, 1 - modify directly the target mesh;

Geometry has to be mandatorily passed through ports.

Examples
geohandlers_example_00004.cpp.

Definition at line 74 of file SurfaceTriangulator.hpp.

Constructor & Destructor Documentation

◆ SurfaceTriangulator() [1/3]

mimmo::SurfaceTriangulator::SurfaceTriangulator ( )

Constructor

Definition at line 32 of file SurfaceTriangulator.cpp.

◆ SurfaceTriangulator() [2/3]

mimmo::SurfaceTriangulator::SurfaceTriangulator ( const bitpit::Config::Section &  rootXML)

Custom constructor reading xml data

Parameters
[in]rootXMLreference to your xml tree section

Definition at line 42 of file SurfaceTriangulator.cpp.

◆ ~SurfaceTriangulator()

mimmo::SurfaceTriangulator::~SurfaceTriangulator ( )
virtual

Destructor;

Definition at line 60 of file SurfaceTriangulator.cpp.

◆ SurfaceTriangulator() [3/3]

mimmo::SurfaceTriangulator::SurfaceTriangulator ( const SurfaceTriangulator other)

Copy constructor. Internal geometry data structure is not copied.

Definition at line 65 of file SurfaceTriangulator.cpp.

Member Function Documentation

◆ absorbSectionXML()

void mimmo::SurfaceTriangulator::absorbSectionXML ( const bitpit::Config::Section &  slotXML,
std::string  name = "" 
)
virtual

It sets infos reading from a XML bitpit::Config::section.

Parameters
[in]slotXMLbitpit::Config::Section of XML file
[in]namename associated to the slot

Reimplemented from mimmo::BaseManipulation.

Definition at line 170 of file SurfaceTriangulator.cpp.

◆ buildPorts()

void mimmo::SurfaceTriangulator::buildPorts ( )
virtual

It builds the input/output ports of the object

Implements mimmo::BaseManipulation.

Definition at line 91 of file SurfaceTriangulator.cpp.

◆ execute()

void mimmo::SurfaceTriangulator::execute ( )
virtual

Triangulate your target non-homogeneous surface.

Implements mimmo::BaseManipulation.

Definition at line 139 of file SurfaceTriangulator.cpp.

◆ flushSectionXML()

void mimmo::SurfaceTriangulator::flushSectionXML ( bitpit::Config::Section &  slotXML,
std::string  name = "" 
)
virtual

It sets infos from class members in a XML bitpit::Config::section.

Parameters
[in]slotXMLbitpit::Config::Section of XML file
[in]namename associated to the slot

Reimplemented from mimmo::BaseManipulation.

Definition at line 195 of file SurfaceTriangulator.cpp.

◆ getGeometry()

mimmo::MimmoSharedPointer< MimmoObject > mimmo::SurfaceTriangulator::getGeometry ( )
Returns
pointer to geometry resulting by class manipulation

Definition at line 103 of file SurfaceTriangulator.cpp.

◆ isWorkingOnTarget()

bool mimmo::SurfaceTriangulator::isWorkingOnTarget ( )
Returns
true if the class is directly applying on target mesh, false if the class is creating a newly indipendent patch.

Definition at line 112 of file SurfaceTriangulator.cpp.

◆ operator=()

SurfaceTriangulator & mimmo::SurfaceTriangulator::operator= ( SurfaceTriangulator  other)

Assignment operator of the class. Copy class data as relative copy constructor.

Definition at line 72 of file SurfaceTriangulator.cpp.

◆ plotOptionalResults()

void mimmo::SurfaceTriangulator::plotOptionalResults ( )
virtual

Plot optional results during execution, that is the newly triangulated surface

Reimplemented from mimmo::BaseManipulation.

Definition at line 159 of file SurfaceTriangulator.cpp.

◆ setGeometry()

void mimmo::SurfaceTriangulator::setGeometry ( mimmo::MimmoSharedPointer< MimmoObject geo)

Set reference geometry for your SurfaceTriangulator class. Geometry must be a surface tessellation.

Parameters
[in]geopointer to target geometry

Definition at line 121 of file SurfaceTriangulator.cpp.

◆ setWorkOnTarget()

void mimmo::SurfaceTriangulator::setWorkOnTarget ( bool  flag = false)

If true, activate option to apply triangulator directly on the target geometry object linked to the class with setGeometry method. If false, create internally an indipendent clone of the target geometry and work on it. False is default.

Parameters
[in]flagactivation flag

Definition at line 132 of file SurfaceTriangulator.cpp.

◆ swap()

void mimmo::SurfaceTriangulator::swap ( SurfaceTriangulator x)
protectednoexcept

Swap function.

Parameters
[in]xobject to be swapped

Definition at line 81 of file SurfaceTriangulator.cpp.


The documentation for this class was generated from the following files: