TranslationGeometry is the class that applies a translation to a given geometry patch. More...
#include <TranslationGeometry.hpp>
Protected Member Functions | |
void | checkFilter () |
void | swap (TranslationGeometry &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) |
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) |
virtual void | plotOptionalResults () |
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< MimmoObject > | m_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
TranslationGeometry is the class that applies a translation to a given geometry patch.
The used parameters are the translation value and the direction of the translation axis.
Ports available in TranslationGeometry Class :
Port Input | ||
---|---|---|
PortType | variable/function | DataType |
M_AXIS | setDirection | (MC_ARRAY3, MD_FLOAT) |
M_VALUED | setTranslation | (MC_SCALAR, MD_FLOAT) |
M_FILTER | setFilter | (MC_SCALAR, MD_MPVECFLOAT_) |
M_GEOM | setGeometry | (MC_SCALAR, MD_MIMMO_) |
Port Output | ||
---|---|---|
PortType | variable/function | DataType |
M_GDISPLS | getDisplacements | (MC_SCALAR, MD_MPVECARR3FLOAT_) |
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.TranslationGeometry
; - Priority: uint marking priority in multi-chain execution;
- Apply: boolean 0/1 activate apply deformation result on target geometry directly in execution;
Proper of the class:
- Direction: axis direction coordinates (space separated);
- Translation: translation value in length unity.
Geometry has to be mandatorily passed through port.
- Examples
- manipulators_example_00001.cpp.
Definition at line 75 of file TranslationGeometry.hpp.
Constructor & Destructor Documentation
◆ TranslationGeometry() [1/3]
mimmo::TranslationGeometry::TranslationGeometry | ( | darray3E | direction = { {0, 0, 0} } | ) |
Default constructor of TranslationGeometry
Definition at line 32 of file TranslationGeometry.cpp.
◆ TranslationGeometry() [2/3]
mimmo::TranslationGeometry::TranslationGeometry | ( | const bitpit::Config::Section & | rootXML | ) |
Custom constructor reading xml data
- Parameters
-
[in] rootXML reference to your xml tree section
Definition at line 42 of file TranslationGeometry.cpp.
◆ ~TranslationGeometry()
mimmo::TranslationGeometry::~TranslationGeometry | ( | ) |
Default destructor of TranslationGeometry
Definition at line 60 of file TranslationGeometry.cpp.
◆ TranslationGeometry() [3/3]
mimmo::TranslationGeometry::TranslationGeometry | ( | const TranslationGeometry & | other | ) |
Copy constructor of TranslationGeometry.No result geometry displacements are copied.
Definition at line 64 of file TranslationGeometry.cpp.
Member Function Documentation
◆ absorbSectionXML()
|
virtual |
It sets infos reading from a XML bitpit::Config::section.
- Parameters
-
[in] slotXML bitpit::Config::Section of XML file [in] name name associated to the slot
Reimplemented from mimmo::BaseManipulation.
Definition at line 210 of file TranslationGeometry.cpp.
◆ apply()
|
virtual |
Directly apply deformation field to target geometry.
Reimplemented from mimmo::BaseManipulation.
Definition at line 175 of file TranslationGeometry.cpp.
◆ buildPorts()
|
virtual |
It builds the input/output ports of the object
Implements mimmo::BaseManipulation.
Definition at line 93 of file TranslationGeometry.cpp.
◆ checkFilter()
|
protected |
Check if the filter is related to the target geometry. If not create a unitary filter field.
Definition at line 184 of file TranslationGeometry.cpp.
◆ execute()
|
virtual |
Execution command. It perform the translation by computing the displacements of the points of the geometry. It applies a filter field eventually set as input.
Implements mimmo::BaseManipulation.
Definition at line 146 of file TranslationGeometry.cpp.
◆ flushSectionXML()
|
virtual |
It sets infos from class members in a XML bitpit::Config::section.
- Parameters
-
[in] slotXML bitpit::Config::Section of XML file [in] name name associated to the slot
Reimplemented from mimmo::BaseManipulation.
Definition at line 246 of file TranslationGeometry.cpp.
◆ getDisplacements()
dmpvecarr3E * mimmo::TranslationGeometry::getDisplacements | ( | ) |
Return actual computed displacements field (if any) for the geometry linked.
- Returns
- deformation field
Definition at line 138 of file TranslationGeometry.cpp.
◆ operator=()
TranslationGeometry & mimmo::TranslationGeometry::operator= | ( | TranslationGeometry | other | ) |
Assignment operator of TranslationGeometry.No result geometry displacements are copied.
Definition at line 72 of file TranslationGeometry.cpp.
◆ setDirection()
void mimmo::TranslationGeometry::setDirection | ( | darray3E | direction | ) |
It sets the direction of the translation axis.
- Parameters
-
[in] direction Direction of translation axis.
- Examples
- manipulators_example_00001.cpp.
Definition at line 108 of file TranslationGeometry.cpp.
◆ setFilter()
void mimmo::TranslationGeometry::setFilter | ( | dmpvector1D * | filter | ) |
It sets the filter field to modulate the displacements of the vertices of the target geometry.
- Parameters
-
[in] filter Filter field defined on geometry vertices.
Definition at line 128 of file TranslationGeometry.cpp.
◆ setTranslation()
void mimmo::TranslationGeometry::setTranslation | ( | double | alpha | ) |
It sets the value of the translation.
- Parameters
-
[in] alpha Value of translation in length unity.
- Examples
- manipulators_example_00001.cpp.
Definition at line 119 of file TranslationGeometry.cpp.
◆ swap()
|
protectednoexcept |
Swap function
- Parameters
-
[in] x object to be swapped
Definition at line 81 of file TranslationGeometry.cpp.
The documentation for this class was generated from the following files:
- src/manipulators/TranslationGeometry.hpp
- src/manipulators/TranslationGeometry.cpp