Oriented Bounding Box calculator. More...
#include <OBBox.hpp>


Public Member Functions | |
| OBBox () | |
| OBBox (const bitpit::Config::Section &rootXML) | |
| OBBox (const OBBox &other) | |
| virtual | ~OBBox () | 
| virtual void | absorbSectionXML (const bitpit::Config::Section &slotXML, std::string name="") | 
| void | buildPorts () | 
| void | clearOBBox () | 
| void | execute () | 
| virtual void | flushSectionXML (bitpit::Config::Section &slotXML, std::string name="") | 
| dmatrix33E | getAxes () | 
| std::vector< MimmoSharedPointer< MimmoObject > > | getGeometries () | 
| OBBStrategy | getOBBStrategy () | 
| darray3E | getOrigin () | 
| darray3E | getSpan () | 
| bool | isForcedAABB () | 
| void | plot (std::string directory, std::string filename, int counter, bool binary) | 
| void | setForceAABB (bool flag) | 
| void | setGeometries (std::vector< MimmoSharedPointer< MimmoObject > > listgeo) | 
| void | setGeometry (MimmoSharedPointer< MimmoObject > geo) | 
| void | setOBBStrategy (OBBStrategy strategy) | 
| void | setOBBStrategyInt (int strategyflag) | 
| void | setWriteInfo (bool flag) | 
  Public Member Functions inherited from mimmo::BaseManipulation | |
| BaseManipulation () | |
| BaseManipulation (const BaseManipulation &other) | |
| virtual | ~BaseManipulation () | 
| void | activate () | 
| bool | arePortsBuilt () | 
| void | clear () | 
| void | disable () | 
| void | exec () | 
| BaseManipulation * | getChild (int i=0) | 
| ConnectionType | getConnectionType () | 
| MimmoSharedPointer< MimmoObject > | getGeometry () | 
| MimmoSharedPointer< MimmoObject > & | getGeometryReference () | 
| int | getId () | 
| bitpit::Logger & | getLog () | 
| std::string | getName () | 
| int | getNChild () | 
| int | getNParent () | 
| int | getNPortsIn () | 
| int | getNPortsOut () | 
| BaseManipulation * | getParent (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 () | 
| BaseManipulation & | operator= (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 | computeAABB (std::vector< MimmoSharedPointer< MimmoObject >> &vector_listgeo, darray3E &origin, darray3E &span, dmatrix33E &axes) | 
| void | computeOBB (std::vector< MimmoSharedPointer< MimmoObject >> &vector_listgeo, darray3E &origin, darray3E &span, dmatrix33E &axes) | 
| dmatrix33E | inverse (const dmatrix33E &mat) | 
| virtual void | plotOptionalResults () | 
| void | swap (OBBox &x) noexcept | 
| dmatrix33E | transpose (const dmatrix33E &mat) | 
  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) | 
Protected Attributes | |
| dmatrix33E | m_axes | 
| std::unordered_map< MimmoSharedPointer< MimmoObject >, int > | m_listgeo | 
| darray3E | m_origin | 
| darray3E | m_span | 
| OBBStrategy | m_strategy | 
| bool | m_writeInfo | 
  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 | 
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
Oriented Bounding Box calculator.
Builds the oriented bounding box of a 3D object. Formats allowed are surface meshes, point clouds or 3D curves, passed as MimmoObjects. No volume meshes are allowed.
Ports available in OBBox Class :
| Port Input | ||
|---|---|---|
| PortType | variable/function | DataType | 
| M_GEOM | m_geometry | (MC_SCALAR, MD_MIMMO_) | 
| M_VECGEOM | setGeometries | (MC_VECTOR, MD_MIMMO_) | 
| Port Output | ||
|---|---|---|
| PortType | variable/function | DataType | 
| M_POINT | getOrigin | (MC_ARRAY3, MD_FLOAT) | 
| M_AXES | getAxes | (MC_ARR3ARR3, MD_FLOAT) | 
| M_SPAN | getSpan | (MC_ARRAY3, MD_FLOAT) | 
 
The xml available parameters, sections and subsections are the following :
Inherited from BaseManipulation:
- ClassName: name of the class as 
mimmo.OBBox - Priority: uint marking priority in multi-chain execution;
 - PlotInExecution: boolean 0/1 print optional results of the class.
 - OutputPlot: target directory for optional results writing.
 
Proper of the class:
- OBBStrategy: enum 0-get OBB, 1-get AABB, 2-get the min Volume solution between OBB and AABB
 - WriteInfo: boolean(0/1) if true write info of OBB on file, in plotOptionalResults directory, false do nothing.
 
Geometries have to be mandatorily added/passed through ports.
- Examples
 - utils_example_00004.cpp.
 
Constructor & Destructor Documentation
◆ OBBox() [1/3]
◆ OBBox() [2/3]
| mimmo::OBBox::OBBox | ( | const bitpit::Config::Section & | rootXML | ) | 
◆ ~OBBox()
◆ OBBox() [3/3]
| mimmo::OBBox::OBBox | ( | const OBBox & | other | ) | 
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.
◆ buildPorts()
      
  | 
  virtual | 
It builds the input/output ports of the object
Implements mimmo::BaseManipulation.
◆ clearOBBox()
| void mimmo::OBBox::clearOBBox | ( | ) | 
◆ computeAABB()
      
  | 
  protected | 
◆ computeOBB()
      
  | 
  protected | 
◆ execute()
      
  | 
  virtual | 
Execute your object, calculate the OBBox of your geometry. If forced externally, evaluate the AABB, no matter what. Implementation of pure virtual BaseManipulation::execute
Implements mimmo::BaseManipulation.
◆ 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.
◆ getAxes()
| dmatrix33E mimmo::OBBox::getAxes | ( | ) | 
◆ getGeometries()
| std::vector< MimmoSharedPointer< MimmoObject > > mimmo::OBBox::getGeometries | ( | ) | 
◆ getOBBStrategy()
| OBBStrategy mimmo::OBBox::getOBBStrategy | ( | ) | 
◆ getOrigin()
| darray3E mimmo::OBBox::getOrigin | ( | ) | 
◆ getSpan()
| darray3E mimmo::OBBox::getSpan | ( | ) | 
◆ inverse()
      
  | 
  protected | 
◆ isForcedAABB()
| bool mimmo::OBBox::isForcedAABB | ( | ) | 
◆ plot()
| void mimmo::OBBox::plot | ( | std::string | directory, | 
| std::string | filename, | ||
| int | counter, | ||
| bool | binary | ||
| ) | 
◆ plotOptionalResults()
      
  | 
  protectedvirtual | 
Plot Optional results of the class, that is the oriented bounding box as *.vtu mesh
Reimplemented from mimmo::BaseManipulation.
◆ setForceAABB()
| void mimmo::OBBox::setForceAABB | ( | bool | flag | ) | 
◆ setGeometries()
| void mimmo::OBBox::setGeometries | ( | std::vector< MimmoSharedPointer< MimmoObject > > | listgeo | ) | 
◆ setGeometry()
| void mimmo::OBBox::setGeometry | ( | MimmoSharedPointer< MimmoObject > | geo | ) | 
- Add your target geometry to the list of target geometries. Not supported volumetric tessellations(type =2). Reimplemented from BaseManipulation::setGeometry(). 
- Parameters
 - 
  
[in] geo pointer to target geometry  
 
◆ setOBBStrategy()
| void mimmo::OBBox::setOBBStrategy | ( | OBBStrategy | strategy | ) | 
◆ setOBBStrategyInt()
| void mimmo::OBBox::setOBBStrategyInt | ( | int | strategyflag | ) | 
◆ setWriteInfo()
| void mimmo::OBBox::setWriteInfo | ( | bool | flag | ) | 
Force class to write OBB calculated origin, axes and span to file(in the plotOptionalResults directory)
- Parameters
 - 
  
[in] flag true, write the OBB info on file.  
- Examples
 - utils_example_00004.cpp.
 
◆ swap()
      
  | 
  protectednoexcept | 
◆ transpose()
      
  | 
  protected | 
Member Data Documentation
◆ m_axes
      
  | 
  protected | 
◆ m_listgeo
      
  | 
  protected | 
◆ m_origin
      
  | 
  protected | 
◆ m_span
◆ m_strategy
      
  | 
  protected | 
◆ m_writeInfo
      
  | 
  protected | 
The documentation for this class was generated from the following files:
 1.8.17
    
 Public Member Functions inherited from