RotationAxes is the class that applies a rotation to a given reference system. More...

#include <RotationAxes.hpp>

Inheritance diagram for mimmo::RotationAxes:
Collaboration diagram for mimmo::RotationAxes:

Public Member Functions

 RotationAxes (const bitpit::Config::Section &rootXML)
 
 RotationAxes (const RotationAxes &other)
 
 RotationAxes (darray3E origin={ {0, 0, 0} }, darray3E direction={ {0, 0, 0} })
 
 ~RotationAxes ()
 
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="")
 
dmatrix33E getRotatedAxes ()
 
darray3E getRotatedOrigin ()
 
RotationAxesoperator= (RotationAxes other)
 
void setAxes (dmatrix33E axes)
 
void setAxesOrigin (darray3E axes_origin)
 
void setAxis (darray3E origin, darray3E direction)
 
void setDirection (darray3E direction)
 
void setOrigin (darray3E origin)
 
void setRotation (double alpha)
 
- 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 (RotationAxes &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)
 
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)
 

Protected Attributes

double m_alpha
 
dmatrix33E m_axes
 
darray3E m_axes_origin
 
darray3E m_direction
 
darray3E m_origin
 
dmatrix33E m_rotax
 
darray3E m_rotax_origin
 
- 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
 

Additional Inherited Members

- Public Types inherited from mimmo::BaseManipulation
typedef std::unordered_map< BaseManipulation *, int > bmumap
 
typedef pin::ConnectionType ConnectionType
 
typedef std::string PortID
 
- Static Protected Attributes inherited from mimmo::BaseManipulation
static int sm_baseManipulationCounter
 

Detailed Description

RotationAxes is the class that applies a rotation to a given reference system.

The used parameters are the rotation value (in randians), the rotation axis direction and origin.

Ports available in GenericInput Class :


Port Input
PortType variable/function DataType
M_POINT setOrigin (MC_ARRAY3, MD_FLOAT)
M_AXIS setDirection (MC_ARRAY3, MD_FLOAT)
M_VALUED setRotation (MC_SCALAR, MD_FLOAT)
M_POINT2 setAxesOrigin (MC_ARRAY3, MD_FLOAT)
M_AXES setAxes (MC_ARR3ARR3, MD_FLOAT)
Port Output
PortType variable/function DataType
M_POINT getRotatedOrigin (MC_ARRAY3, MD_FLOAT)
M_AXES getRotatedAxes (MC_ARR3ARR3, MD_FLOAT)


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

Inherited from BaseManipulation:

  • ClassName: name of the class as mimmo.RotationAxes;
  • Priority: uint marking priority in multi-chain execution;

Proper of the class:

  • Origin: rotation axis origin coordinates (space separated);
  • Direction: axis direction coordinates (space separated);
  • Rotation: rotation angle in radians. Positive on counterclockwise rotations around reference axis;
  • RefSystem: axes of current shape reference system. written in XML as:
    <RefSystem>
       <axis0> 1.0 0.0 0.0 </axis0>
       <axis1> 0.0 1.0 0.0 </axis1>
       <axis2> 0.0 0.0 1.0 </axis2>
    </RefSystem>


  • OriginRS: origin coordinates of the target reference system to be rotated (space separated);
Examples
utils_example_00004.cpp.

Definition at line 82 of file RotationAxes.hpp.

Constructor & Destructor Documentation

◆ RotationAxes() [1/3]

mimmo::RotationAxes::RotationAxes ( darray3E  origin = { {0, 0, 0} },
darray3E  direction = { {0, 0, 0} } 
)

Default constructor of RotationAxes

Definition at line 32 of file RotationAxes.cpp.

◆ RotationAxes() [2/3]

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

Custom constructor reading xml data

Parameters
[in]rootXMLreference to your xml tree section

Definition at line 57 of file RotationAxes.cpp.

◆ ~RotationAxes()

mimmo::RotationAxes::~RotationAxes ( )

Default destructor of RotationAxes

Definition at line 92 of file RotationAxes.cpp.

◆ RotationAxes() [3/3]

mimmo::RotationAxes::RotationAxes ( const RotationAxes other)

Copy constructor of RotationAxes.

Definition at line 96 of file RotationAxes.cpp.

Member Function Documentation

◆ absorbSectionXML()

void mimmo::RotationAxes::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 253 of file RotationAxes.cpp.

◆ buildPorts()

void mimmo::RotationAxes::buildPorts ( )
virtual

It builds the input/output ports of the object

Implements mimmo::BaseManipulation.

Definition at line 136 of file RotationAxes.cpp.

◆ execute()

void mimmo::RotationAxes::execute ( )
virtual

Execution command. It saves in "rot"-terms the modified axes and origin, by the rotation conditions. This terms can be recovered and passed by a pin to a child object by the related get-methods.

Implements mimmo::BaseManipulation.

Definition at line 223 of file RotationAxes.cpp.

◆ flushSectionXML()

void mimmo::RotationAxes::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 330 of file RotationAxes.cpp.

◆ getRotatedAxes()

dmatrix33E mimmo::RotationAxes::getRotatedAxes ( )

It gets the rotated reference system.

Returns
Rotated reference system.

Definition at line 206 of file RotationAxes.cpp.

◆ getRotatedOrigin()

darray3E mimmo::RotationAxes::getRotatedOrigin ( )

It gets the rotated origin of the reference system.

Returns
Rotated origin of reference system.

Definition at line 214 of file RotationAxes.cpp.

◆ operator=()

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

Assignement operator of RotationAxes.

Definition at line 112 of file RotationAxes.cpp.

◆ setAxes()

void mimmo::RotationAxes::setAxes ( dmatrix33E  axes)

It sets the reference system to be rotated.

Parameters
[in]axesOriginal reference system.
Examples
utils_example_00004.cpp.

Definition at line 190 of file RotationAxes.cpp.

◆ setAxesOrigin()

void mimmo::RotationAxes::setAxesOrigin ( darray3E  axes_origin)

It sets the origin of the reference system to be rotated.

Parameters
[in]axes_originOrigin of reference system.
Examples
utils_example_00004.cpp.

Definition at line 198 of file RotationAxes.cpp.

◆ setAxis()

void mimmo::RotationAxes::setAxis ( darray3E  origin,
darray3E  direction 
)

It sets the origin and direction of the rotation axis.

Parameters
[in]originOrigin of rotation axis.
[in]directionDirection of rotation axis.

Definition at line 153 of file RotationAxes.cpp.

◆ setDirection()

void mimmo::RotationAxes::setDirection ( darray3E  direction)

It sets the direction of the rotation axis.

Parameters
[in]directionDirection of rotation axis.
Examples
utils_example_00004.cpp.

Definition at line 170 of file RotationAxes.cpp.

◆ setOrigin()

void mimmo::RotationAxes::setOrigin ( darray3E  origin)

It sets the origin of the rotation axis.

Parameters
[in]originOrigin of rotation axis.
Examples
utils_example_00004.cpp.

Definition at line 162 of file RotationAxes.cpp.

◆ setRotation()

void mimmo::RotationAxes::setRotation ( double  alpha)

It sets the value of the rotation.

Parameters
[in]alphaValue of rotation axis.
Examples
utils_example_00004.cpp.

Definition at line 182 of file RotationAxes.cpp.

◆ swap()

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

Swap function

Parameters
[in]xobject to be swapped

Definition at line 122 of file RotationAxes.cpp.

Member Data Documentation

◆ m_alpha

double mimmo::RotationAxes::m_alpha
protected

Rotation angle.

Definition at line 92 of file RotationAxes.hpp.

◆ m_axes

dmatrix33E mimmo::RotationAxes::m_axes
protected

Axes of box to be deformed.

Definition at line 88 of file RotationAxes.hpp.

◆ m_axes_origin

darray3E mimmo::RotationAxes::m_axes_origin
protected

Origin of the axes to be rotated.

Definition at line 89 of file RotationAxes.hpp.

◆ m_direction

darray3E mimmo::RotationAxes::m_direction
protected

Components of the rotation axis.

Definition at line 87 of file RotationAxes.hpp.

◆ m_origin

darray3E mimmo::RotationAxes::m_origin
protected

Origin of the rotation axis.

Definition at line 86 of file RotationAxes.hpp.

◆ m_rotax

dmatrix33E mimmo::RotationAxes::m_rotax
protected

Axes of box deformed.

Definition at line 90 of file RotationAxes.hpp.

◆ m_rotax_origin

darray3E mimmo::RotationAxes::m_rotax_origin
protected

Origin of the axes rotated.

Definition at line 91 of file RotationAxes.hpp.


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